> For the complete documentation index, see [llms.txt](https://docs.osero.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.osero.com/osero-product/overview/flow-of-funds.md).

# Flow of Funds

Osero Earn connects your platform to the Sky Savings Rate through a simple flow.

Here’s how funds move from the stablecoins your users already hold into sUSDS, and what Osero handles along the way.

## The Flow

<figure><img src="https://3154682613-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCGGOxx2n6al0aPdL1Zq6%2Fuploads%2FgG7dghAYVMqddGFCojVo%2FOS_Image_TheFlow.png?alt=media&amp;token=ccf968de-191b-4dd0-a45f-ad6e53d4723a" alt=""><figcaption></figcaption></figure>

## Step-by-step

{% stepper %}
{% step %}

### User deposits a stablecoin

The user chooses the stablecoin and amount they want to put into savings. The platform uses the `@osero/client` SDK to start the deposit flow.
{% endstep %}

{% step %}

### Osero prepares the route

The SDK determines the required route and prepares the transactions needed to move the user’s funds into sUSDS.

The exact flow depends on the stablecoin and network. Osero handles the underlying conversions, routing, and contract interactions, so the platform doesn’t need to build this logic itself.
{% endstep %}

{% step %}

### User approves the transactions

The required transactions are sent to the user’s wallet for approval and executed in the correct order. Depending on the route, more than one wallet action may be required.
{% endstep %}

{% step %}

### User receives sUSDS

Once the transactions are complete, the user receives sUSDS, the yield-bearing savings token issued by Sky.

sUSDS earns the Sky Savings Rate automatically, so no additional action is required to start earning.
{% endstep %}

{% step %}

### User withdraws

When the user wants to withdraw, Osero handles the process in reverse. The user’s sUSDS is converted back into their chosen stablecoin, including the value of the yield earned over time.
{% endstep %}
{% endstepper %}

## What Osero Handles Behind the Scenes

| Complexity                             | Handled by Osero Earn |
| -------------------------------------- | --------------------- |
| Chain-specific contract routing        | ✔️                    |
| PSM fee reads (tin / tout)             | ✔️                    |
| ERC-20 approval management             | ✔️                    |
| ERC-4626 vault deposit/redeem logic    | ✔️                    |
| Multi-step execution sequencing        | ✔️                    |
| Preview / quote before execution       | ✔️                    |
| Balance reads across tokens and chains | ✔️                    |
| Typed error handling                   | ✔️                    |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.osero.com/osero-product/overview/flow-of-funds.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
