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

# StoxFi

## Abstract

StoxFi is a **confidential settlement layer for tokenized equities**, designed to keep onchain balances and transfer amounts encrypted while preserving a verifiable path back to the underlying asset.

The protocol separates **public asset custody** from **confidential execution**. A tokenized stock ERC-20 is locked in StoxVault on Robinhood Chain, and a corresponding confidential balance is created on Ethereum. Cross-chain instructions are carried through Chainlink CCIP, while fully homomorphic encryption powered by Zama FHEVM enables balances and transfers to be processed as encrypted values.

The underlying asset does not cross chains. It remains locked in StoxVault while its confidential representation is active. On Ethereum, balances are represented as encrypted `euint64` values, allowing transfers to update balances without revealing the transferred amount in plaintext.

When a holder exits the confidential environment, the encrypted amount is burned and the redemption amount is decrypted through the FHE layer's threshold-decryption process. Once the resulting proof is verified onchain, a return cross-chain instruction authorizes StoxVault to release the corresponding underlying tokens.

StoxFi provides **confidentiality of balances and transfer amounts, not anonymity of participants**. Addresses, asset type, transaction timing, shield amounts, and unshield amounts remain publicly observable. Within the confidential settlement layer, balances remain encrypted and transfer amounts are hidden from public view.

The system is built around three principal contracts:

* **StoxVault:** custody and release of underlying assets.
* **ConfidentialStock:** encrypted balances, confidential transfers, and redemption.
* **StoxRegistry:** discovery of supported assets.

Together, these contracts establish a structurally backed relationship between collateral locked on Robinhood Chain and confidential positions represented on Ethereum.

The complete StoxFi implementation has been deployed and demonstrated end-to-end on **Robinhood Chain testnet and Ethereum Sepolia**, covering the full lifecycle from collateral deposit through confidential transfer to redemption and release. The current demonstration uses stand-in ERC-20 stock tokens rather than real tokenized equities, and the implementation has been exercised through a test suite with **81 passing tests and 0 failures**.

StoxFi brings confidential settlement to tokenized equity positions by combining locked collateral, encrypted onchain balances, confidential transfers, cross-chain messaging, and verifiable redemption within a single architecture.


---

# 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://stoxfi.gitbook.io/stoxfi-docs/stoxfi.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.
