# 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 across adapters proportionally.
{% endstep %}

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

{% step %}
The vault mints opal-PT-sUSDe-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-PT-sUSDe 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 PT-sUSDe back to USDT0).
{% endstep %}

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

{% step %}
sUSDe 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 PT-sUSDe.
{% endstep %}

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

{% step %}
Borrow USDT 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 USDT, 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: 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:

```
GET https://docs.origami.finance/the-third-fold-opal/opal-perpetual-pt-collection/perpetual-susde-pt-plasma/token-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
