> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fhenix.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Source code

> The confidential trading smart contract on GitHub, with its tests and design reference.

The confidential trading contract, `ConfidentialOTC`, is open source under the MIT license, in [FhenixProtocol/confidential-trading](https://github.com/FhenixProtocol/confidential-trading) on GitHub.

## What the repository holds

| Path | What it holds |
| - | - |
| `contracts/OTC/ConfidentialOTC.sol` | The trading contract: orders, escrow, fills, size tier reveals, bonds, and the protocol fee |
| `contracts/interfaces/` | The interfaces it calls: `IFHERC20`, `IERC7984`, and `AggregatorV3Interface` for price feeds |
| `contracts/FHERC20/`, `contracts/utils/` | The FHERC20 token the tests trade against |
| `test/ConfidentialOTC.test.ts` | The Hardhat test suite, run against CoFHE mocks |
| `docs/OTC_REFERENCE.md` | The design reference: roles, order lifecycle, bonds and bounties, pricing, size tiers, and security properties |

The repository README explains how to install the dependencies and run the tests.

## Read more

* [How confidential trading works](https://docs.fhenix.io/app/trading.md): the public and private parts of an order, size tiers, the two-transaction design, and the fill bond.
* [FHERC20](https://docs.fhenix.io/cofhe/fhe-library/confidential-contracts/fherc20/overview.md): the confidential token standard the contract trades.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.