> 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/introduction-and-problem-statement.md).

# Introduction & Problem Statement

### The Transparency Problem

Tokenized equities inherit the transparency of the blockchain infrastructure on which they operate.

A standard ERC-20 represents balances as public values and records transfers onchain. This allows an observer to inspect an address and see its token balance, transaction history, transfer amounts, and interactions with other addresses.

For tokenized equity positions, this creates a fundamental confidentiality problem.

A user's position size can be publicly inspected. Transfers between addresses can be followed. Transaction timing and frequency remain permanently observable. Direct transfers also expose the relationship between sender and recipient.

StoxFi addresses a specific part of this problem:

> **How can tokenized equity positions remain verifiable and redeemable onchain without requiring balances and transfer amounts to remain publicly visible throughout their lifecycle?**

### From Public Balances to Encrypted Positions

StoxFi introduces a confidential representation of a tokenized equity position.

Instead of storing a user's confidential balance as an ordinary public integer, StoxFi represents it as an encrypted `euint64` value within its ConfidentialStock contracts.

This allows the system to perform operations directly on encrypted data.

During a confidential transfer, StoxFi can evaluate whether sufficient funds exist, determine whether the receiving balance has sufficient capacity, debit one encrypted balance, and credit another without revealing the transferred amount.

The transaction itself remains visible on Ethereum.

The sender remains visible.

The recipient remains visible.

The asset remains identifiable.

**The amount does not.**

This distinction is central to StoxFi. The protocol is designed to provide **confidential financial values**, rather than anonymity of participants.

### Public Entry, Confidential Settlement, Public Exit

StoxFi does not attempt to conceal the entire lifecycle of the underlying asset.

The underlying token remains a standard ERC-20 on Robinhood Chain. Entering StoxFi requires an exact quantity of that asset to be transferred into StoxVault.

That shield amount is public.

The corresponding amount is then used to create the confidential representation on Ethereum. Once inside the confidential environment, balances and transfer amounts can remain encrypted.

Exiting requires the reverse transition. A confidential amount is burned, its redemption value becomes publicly decryptable, and the corresponding quantity of the underlying ERC-20 is released from StoxVault.

The privacy boundary is therefore:

```
PUBLIC                      CONFIDENTIAL                       PUBLIC

Tokenized stock      →      Confidential position      →      Tokenized stock
Public balance              Encrypted balance                 Public balance
Visible shield amount       Hidden transfer amounts           Visible unshield amount
                             Visible participants
```

StoxFi protects the **confidential interval between entry and exit**.

It does not claim that shielding is private, and it does not conceal the amount being returned when a position is unshielded.

### Separating Custody from Confidential Execution

The architecture separates two responsibilities.

#### Public Asset Custody

StoxVault operates on Robinhood Chain and holds the underlying ERC-20 collateral.

When a user shields an asset, the vault receives the tokens, performs the required decimal conversion, records the locked collateral, and initiates the cross-chain instruction that creates the confidential representation.

The underlying asset remains in the vault throughout the confidential lifecycle.

It is not transferred to Ethereum.

#### Confidential Execution

On Ethereum, ConfidentialStock maintains the encrypted representation of the position.

Balances are stored as ciphertext, and transfers operate directly on those encrypted values. The FHE layer makes it possible to update financial state without requiring the contract to read the underlying plaintext amounts.

#### Cross-Chain Coordination

Chainlink CCIP connects the custody and confidential execution environments.

StoxFi uses CCIP in **arbitrary-messaging mode**, not token-transfer mode. The messages communicate instructions between the two sides of the system while the underlying collateral remains locked on Robinhood Chain.

The basic lifecycle is:

<figure><img src="https://2963579709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdIccUwMy0hIW7yzdERSR%2Fuploads%2FhMgprMiyel9LRXEN7Y5a%2Fstoxfi-transaction-lifecycle%20(1).png?alt=media&amp;token=cda42dcf-aaf5-4a1f-b760-377b417cb6f5" alt=""><figcaption></figcaption></figure>

\
*StoxFi separates public collateral custody from confidential execution. The underlying asset remains on Robinhood Chain while confidential balances and transfers operate on Ethereum.*

### Structural Backing

Confidentiality does not remove the relationship between the encrypted representation and the underlying asset.

A confidential balance can only be minted through a cross-chain message from the bound StoxVault after collateral has been received. ConfidentialStock has **no administrative mint function**.

When a user redeems, the confidential amount is burned before the release process begins. The redemption value is then verified before a cross-chain release instruction is dispatched.

On the vault side, releases are capped by the collateral recorded for the corresponding stock.

This creates a structural relationship between:

**underlying collateral locked in StoxVault**

and

**the live confidential representation of that asset.**

For an 18-decimal underlying asset represented with 6 confidential decimals, StoxFi converts between the two using:

`rate = 10^(18 − 6) = 10^12`

Any remainder below one confidential unit is refunded during the deposit rather than accumulating inside the vault.

### What Confidentiality Means in StoxFi

StoxFi conceals two core financial values during confidential settlement:

* **Confidential balances**
* **Confidential transfer amounts**

A public observer cannot determine a user's encrypted balance or read the amount transferred between two users.

However, StoxFi does not conceal participation itself.

An observer can still determine:

* The participating addresses.
* The asset involved.
* The exact shield amount.
* The exact unshield amount.
* Sender and recipient relationships.
* Transaction timing and frequency.
* Gas payer information.
* Total collateral locked for an asset.

This means StoxFi should be understood as a system for **confidential amounts and encrypted balances**, rather than an anonymous or untraceable transaction system.

### Current Implementation

The complete shield → confidential transfer → unshield lifecycle has been implemented and demonstrated across **Robinhood Chain testnet and Ethereum Sepolia**.

The demonstrated system includes:

* ERC-20 collateral custody through StoxVault.
* Decimal conversion between the underlying and confidential representations.
* Cross-chain shield instructions.
* Encrypted balances.
* Confidential transfers.
* Burn-first redemption.
* Threshold-decryption verification.
* Cross-chain release instructions.
* Release of the underlying collateral.

The current testnet deployment uses StoxFi-deployed stand-in tokens representing NVDA, TSLA, and NFLX. These are demonstration assets and do **not** represent real NVIDIA, Tesla, or Netflix equity exposure.

StoxFi is therefore currently a **working testnet implementation of confidential settlement infrastructure for tokenized equities**, with the complete transaction lifecycle demonstrated end-to-end.


---

# 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/introduction-and-problem-statement.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.
