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

# Smart-Contract Modules

The on-chain system is a set of modules with distinct responsibilities. Separating them keeps each one auditable in isolation and limits the blast radius of any single fault.

Token module. QFI is issued on two chains. On TRON it is a TRC-20 token; on BNB Chain it is a BEP-20 token. Decimals and the verified contract address for each chain are published under Deployment Network. QFI is not required as a settlement asset for lending or borrowing, but it may be posted as collateral by delegates on the same terms as other accepted collateral assets, valued through the same Chainlink price feeds used for coverage monitoring elsewhere in the protocol.

**Pool module.** Each pool is an on-chain contract that holds lender deposits in the settlement asset, tracks each lender's pro-rata claim, records deployed principal and repayments, and enforces the pool's parameters: capacity, fee schedule, first-loss accounting, and the per-default liquidation limit. Pool state is the source of truth for a lender's position.

**Loan module.** Loans record the terms agreed at structuring — principal, tenor, cost of capital, collateral, and covenants — and the events over a facility's life: drawdowns, interest accrual, repayments, and status changes through to closure or default. Loan records reference the off-chain MLA that makes the obligation enforceable.

**Collateral and liquidation module.** Where a facility is secured, this module tracks posted collateral, values it against **Chainlink price feeds**, monitors coverage against the required ratio, and executes liquidation within the pool's per-default limit when a position breaches its terms.

**First-loss module.** The delegate's subordinated capital is held and accounted here, and it is this module that enforces the loss order: losses are applied to first-loss capital before lender principal, up to the committed amount.

**Access-control module.** Roles and privileged actions are defined and enforced here — who can originate, who can set parameters, who can pause. Privileged actions, including emergency pause and protocol parameter changes, are protected by **multisig approval and a timelock delay** rather than resting with any single key — the specific signer set and timelock duration are published alongside the contract addresses under Deployment Network so they can be independently verified rather than taken on trust. This module is the on-chain expression of the permission matrix in the Participants section.
