> 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/security-and-operational-resilience/smart-contract-security.md).

# Smart-contract security

The contracts are the highest-value target, and their security starts with how they are structured. Module separation keeps each contract small enough to audit in isolation and bounds what any single fault can affect: a problem in the collateral and liquidation logic cannot drain the token contract, and a problem in one pool cannot reach another pool's balances.

Within each module, the contracts follow conservative engineering: external calls and value transfers are handled defensively, state-changing functions are protected against reentrancy, arithmetic is checked, and authorization is enforced at every trust boundary. Deposits and withdrawals move a pool's settlement asset — PYUSD or USDT, depending on the pool — and those paths receive the most scrutiny because they are where value enters and leaves.

Collateral valuation and liquidation carry particular weight, since a mispriced or stale feed is a common route to loss in lending protocols. Collateral is valued using Chainlink price feeds, coverage is monitored continuously against each loan's required ratio, and liquidation is bounded by the per-default limit configured on each pool, so a single liquidation event cannot cascade beyond a known ceiling.

The protocol's policy is that every contract holding funds is independently reviewed before it goes live, and any change to a live contract is reviewed before it ships. The interfaces and deployed addresses needed to verify the running code are published under Deployment Network, so the code in production can be checked against its source.
