> For the complete documentation index, see [llms.txt](https://docs.origami.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.origami.finance/the-third-fold-opal/opal-perpetual-pt-collection/liquid-leverage-susde-usde-plasma/token-flow.md).

# Token Flow

#### Deposit Flow

{% stepper %}
{% step %}
User approves sUSDe (or any whitelisted asset via zap) spend for the vault contract.
{% endstep %}

{% step %}
User calls `join()` with the desired sUSDe amount.
{% endstep %}

{% step %}
`OpalManager` distributes sUSDe and USDe evenly as collateral in the adapter.
{% endstep %}

{% step %}
The Aave V3 adapter uses the sUSDe to acquire USDe (via swap), supplies sUSDe as collateral, and borrows additional USDT0 to acquire more sUSDe (via swap) to achieve the target leverage.
{% endstep %}

{% step %}
The vault mints opal-sUSDe-merkl-PLASMA-a shares to the user proportional to the vault's current holdings.
{% endstep %}
{% endstepper %}

#### Withdrawal Flow

{% stepper %}
{% step %}
User calls `exit()` with the number of opal-sUSDe-merkl-PLASMA-a shares and USDT0 to redeem.
{% endstep %}

{% step %}
`OpalManager` reclaims from each adapter proportionally.
{% endstep %}

{% step %}
The Aave V3 adapter unwinds a proportional share of the leveraged position (repay debt, withdraw collateral, swap sUSDe back to USDT0).
{% endstep %}

{% step %}
The vault burns the user's opal-sUSDe-merkl-PLASMA-a shares.
{% endstep %}

{% step %}
sUSDe and USDe is transferred to the user.
{% endstep %}
{% endstepper %}

#### Managed Rebalance Flow (Leverage Adjustment)

{% stepper %}
{% step %}
Flash loan USDT0 from Aave V3.
{% endstep %}

{% step %}
Swap USDT0 to sUSDe.
{% endstep %}

{% step %}
Supply sUSDe as additional collateral.
{% endstep %}

{% step %}
Borrow USDT0 against the new collateral.
{% endstep %}

{% step %}
Repay the flash loan.
{% endstep %}

{% step %}
Assert the post-rebalance balance sheet.
{% endstep %}
{% endstepper %}

For a leverage decrease, the steps are reversed: flash loan, repay debt, withdraw collateral, swap to USDT0, repay flash loan, assert balance sheet.

{% hint style="info" %}
Users do not need to take any action during a managed rebalance. Share balances and redemption rights are unaffected.
{% endhint %}


---

# 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://docs.origami.finance/the-third-fold-opal/opal-perpetual-pt-collection/liquid-leverage-susde-usde-plasma/token-flow.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.
