Smart Contracts
Who this is for: Integrators and auditors who need the contract layout and behavior of Mento V3 (FPMM pools, oracles, limits, strategies). The Mento protocol consists of a set of smart contracts deployed on supported chains (e.g. Celo).
For app and frontend developers: This section describes the Solidity internals and is intended for smart contract developers. To quote swaps, discover pools, and execute trades from JavaScript/TypeScript, the Mento SDK is usually the easiest path. Each contract page below includes code snippets showing how to call the contracts directly from Solidity when you are building on-chain integrations or tooling.
See also: Integration — integration paths; Mento SDK — JS/TS library; Deployments — addresses and verification.
Mento V3: FPMM-based exchange
In V3, the main exchange is built from FPMM (Fixed-Price Market Maker) pools. The following pages give precise contract-level documentation:
FPMM
Pool: two-token reserves, swap at oracle rate (minus fee), value protection, mint/burn, rebalance by allowlisted strategies, TradingLimitsV2.
OracleAdapter
Supplies the pool with a valid rate: getFXRateIfValid(rateFeedID); combines SortedOracles, BreakerBox (trading mode), and FX market hours.
Router
Quoting (getAmountsOut) and executing swaps; multihop via pool getAmountOut; uses FactoryRegistry and default factory.
Liquidity strategies
Base + ReserveLiquidityStrategy + CDPLiquidityStrategy; who may call rebalance, callback flow, incentive split.
BreakerBox
Circuit breakers; OracleAdapter reads trading mode; FPMM reverts when rate invalid.
CDPs
Collateralized debt positions (troves): borrow stables against collateral. Mento CDPs are a fork of Liquity v2 — see Liquity v2 docs for full contract and protocol documentation.
Contracts: mento-protocol/mento-core
Last updated