> For the complete documentation index, see [llms.txt](https://docs.enzyme.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enzyme.finance/onyx-protocol/general-flows/assets.md).

# 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" %}
```


---

# 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.enzyme.finance/onyx-protocol/general-flows/assets.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.
