# Assets

All tokens flow through the `Shares` contract, which acts as a safe for tokens that are collected or provisioned for use within the system:

* deposit handlers send fulfilled token deposits to `Shares`
* redeem handlers withdraw tokens from `Shares` to fulfill redemptions
* fee handler withdraws tokens from `Shares` to pay fees

To access tokens stored in `Shares`, admins must call `Shares.withdrawAssetTo().`&#x20;

To provide tokens to `Shares` for Onyx use, tokens must be transferred from external wallets to `Shares`. e.g.:

* after fulfilling a new batch of deposits `Shares` has a balance of 5 ETH
* there are 3,000 USDC in fees owed
* there are 3 ETH of redeem requests to fulfill
* the shortfall in `Shares` is 3,000 USDC for fees and 2 ETH for redemptions
* a manager would transfer these amounts from an asset management wallet to `Shares`

**This creates a hard division between asset management holdings (external to Onyx) and shares holdings, where stealing the former via Onyx is impossible.**

## **Asset Flows Diagram**

{% @mermaid/diagram content="graph LR
Users\[Investor]

```
subgraph Onyx[Onyx Protocol]
    DH[Deposit Handler]
    SC[Shares]
    RH[Redeem Handler]
    FH[Fee Handler]
    SPACER2[ ]
end

AMW[External Wallet]
FR[Fee Recipients]
Admins[Admins]

Users --> DH
DH --> SC
AMW --> SC

Admins -.->|"withdrawAssetTo()" | SC
SC -.->|"via withdrawAssetTo()" | AMW

SC --> RH
SC --> FH

RH --> Users
FH --> FR

style SC fill:#e3f2fd,stroke:#1976d2,stroke-width:3px
style AMW fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
style SPACER2 fill:transparent,stroke:none" %}
```
