> For the complete documentation index, see [llms.txt](https://yokifinance.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yokifinance.gitbook.io/docs/dollar-cost-averaging/architecture.md).

# Architecture

Yoki Finance uses a set of already established and trusted solutions to facilitate the development process.

<figure><img src="/files/ysSCLFmKilWHiSARpQzm" alt=""><figcaption></figcaption></figure>

### **Authorization**

The authorization process with Web3 wallets with **Metamask** or **WalletConnect** is accustomed to every Web3 Enthusiast. Future integration with **Web3Auth** helps non-Web3 people with onboarding by authorizing using their social graph.&#x20;

### **Strategy creation**

In the widget interface users with a connected wallet could set up the recurring token purchase strategy. For every scenario, Yoki Finance creates a separate smart contract with information about the transaction parameters. At the same time, the data about the strategy schedule is stored on the workers' side. Workers are initially stored on Yoki Finance's backend but then changed to decentralized workers in the next releases (e.g **Chainlink Automation**, **Gelato Automation)**. Using **decentralized workers** helps us to be assured that user strategy will be executed in time and be stored decentralized.

User funds are stored in his wallet and are not accessed by Yoki smart contracts besides the purchase time.

### **Strategy execution**

When the time for the next transaction comes our workers refer to the smart contract with the users' strategy data, which executes the swap on **Uniswap** (later on the liquidity aggregators such as **1inch** and **Kyberswap)**. Using liquidity aggregators routes the trade through the Decentralized Exchanges with the best available price, splitting the trade across multiple DEXs if necessary to achieve the best possible price for the user.

As a result of the transaction user wallet receives the purchased tokens and the analytical data is loaded into the widget.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://yokifinance.gitbook.io/docs/dollar-cost-averaging/architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
