# Developer documentation > Official Curve developer documentation. Read individual Markdown pages for focused retrieval. Source links identify the canonical documentation. ## Developer documentation - [Cryptoswap: In Depth](https://docs.curve.finance/developer/amm/cryptoswap-in-depth.md): Cryptoswap is an automated market maker (AMM) pool developed by Curve for swapping between uncorrelated assets, such as ETH and USDT, where the exchange rate between these... - [Curve AMM](https://docs.curve.finance/developer/amm/curve-amm-overview.md): Curve's Automated Market Maker (AMM) is built around two core invariants — StableSwap for assets that trade near parity, and CryptoSwap for volatile asset pairs. Both... - [Pool Factory Overview](https://docs.curve.finance/developer/amm/factory/overview.md): A Pool Factory enables the permissionless deployment of liquidity pools, gauges, and LP tokens. - [Stableswap-NG Factory: Deployer API](https://docs.curve.finance/developer/amm/factory/stableswap-ng/deployer-api.md): The input values of _name or _symbol are obviously non-trivial for the performance of the pool. These parameters should visualize, what kind of tokens are included in the pool. - [Stableswap-NG Factory: Overview](https://docs.curve.finance/developer/amm/factory/stableswap-ng/overview.md): The CurveStableswapFactoryNG.vy allows the permissionless deployment of up to eight-coin plain- and metapools, as well as gauges. **Liquidity pool and LP token share the same... - [deployer-api](https://docs.curve.finance/developer/amm/factory/tricrypto-ng/deployer-api.md): The transaction will revert if the following requirements are not met. - [Pool Factory: Overview](https://docs.curve.finance/developer/amm/factory/tricrypto-ng/overview.md): The Tricrypto-NG Factory allows the permissionless deployment of two-coin volatile asset pools, as well as gauges. **The liquidity pool and LP token share the same... - [Pool Factory: Deployer API](https://docs.curve.finance/developer/amm/factory/twocrypto-ng/deployer-api.md): Function to deploy a Twocrypto-NG liquidity pool. - [Pool Factory: Overview](https://docs.curve.finance/developer/amm/factory/twocrypto-ng/overview.md): The Twocrypto-NG Factory allows the permissionless deployment of two-coin volatile asset pools, as well as gauges. **The liquidity pool and LP token share the same... - [DonationStreamer](https://docs.curve.finance/developer/amm/fxswap/automation/donation-streamer.md): The DonationStreamer contract enables permissionless, scheduled refuels for FXSwap pools. Refuel providers deposit tokens and ETH rewards upfront to create streams that add... - [Automating FXSwap Refuels](https://docs.curve.finance/developer/amm/fxswap/automation/overview.md): The permissionless refuel-automation contracts let a provider escrow token amounts and ETH execution rewards, release refuels on a schedule, and pay any account that executes... - [StreamExecutor](https://docs.curve.finance/developer/amm/fxswap/automation/stream-executor.md): The StreamExecutor is a convenience contract that batch-executes all due refuel streams in a single call and forwards the earned ETH rewards to the caller. It queries the... - [Building on FXSwap](https://docs.curve.finance/developer/amm/fxswap/guides/building.md): Protocols can compose FXSwap swaps and LP positions into vaults, strategies, collateral systems, and other financial applications. Safe composition requires separating... - [Integrating FXSwap](https://docs.curve.finance/developer/amm/fxswap/guides/integration.md): FXSwap keeps the common two-coin Curve routing surface: coins, get_dy, get_dx, exchange, exchange_received, and TokenExchange. The important integration work is identifying the... - [FXSwap](https://docs.curve.finance/developer/amm/fxswap/overview.md): FXSwap is Curve's two-asset automated market maker (AMM) for markets whose primary price discovery happens elsewhere. It is designed to keep passive liquidity concentrated... - [FXSwap Pool](https://docs.curve.finance/developer/amm/fxswap/pools/fxswap.md): This reference covers the verified public ABI of deployed FXSwap v2.1.0d pools. Unless stated otherwise, amounts are raw token or LP-token units, indices are uint256, and the... - [FXSwap Mechanism and Parameter Design](https://docs.curve.finance/developer/amm/fxswap/pools/mechanism.md): FXSwap concentrates passive, full-range liquidity around a moving price_scale. It is designed for two-asset markets whose primary price discovery happens outside the pool and... - [FXSwap Oracles](https://docs.curve.finance/developer/amm/fxswap/pools/oracles.md): FXSwap uses an exponential moving average (EMA) of its own observed prices to guide gradual changes to the center of liquidity. The oracle is AMM state: it helps the pool... - [FXSwap Refuels](https://docs.curve.finance/developer/amm/fxswap/pools/refuels.md): A refuel is liquidity added to a finite rebalancing buffer without giving the provider a withdrawable LP position. The pool records the resulting shares in donation_shares,... - [FXSwap Math Contract](https://docs.curve.finance/developer/amm/fxswap/utility-contracts/math.md): The FXSwap Math contract implements the two-coin StableSwap-style invariant used by deployed FXSwap pools. It is not the TwocryptoMath.vy contract used by ordinary Twocrypto-NG... - [FXSwap Views Contract](https://docs.curve.finance/developer/amm/fxswap/utility-contracts/views.md): The FXSwap Views contract supplies quote and liquidity-calculation methods used by the pool. These methods are useful for offchain search, routing, and simulation, but some are... - [CryptoSwap Exchange: Overview](https://docs.curve.finance/developer/amm/legacy/cryptoswap-overview.md): The Automatic Market-Making with Dynamic Peg (CryptoSwap) algorithm introduces a new approach for creating liquidity for assets which are not necessarily pegged to each other. - [lp-token-v5](https://docs.curve.finance/developer/amm/legacy/cryptoswap/lp-tokens/lp-token-v5.md): The LP token and exchange contract for two-coin CryptoSwap pools are two separate contracts from each other. Newer versions, like Tricrypto-NG, combine both the LP token and... - [overview](https://docs.curve.finance/developer/amm/legacy/cryptoswap/lp-tokens/overview.md): In exchange for depositing coins into a Curve pool, liquidity providers receive pool LP (liquidity pool) tokens. A Curve pool LP token is an ERC20 contract specific to the... - [](https://docs.curve.finance/developer/amm/legacy/cryptoswap/pools/admin-controls.md): **The following functions are admin-only functions.**Pools created through the Factory are 'owned' by the factory admin(DAO). Ownership can be transferred only within the... - [crypto-pool](https://docs.curve.finance/developer/amm/legacy/cryptoswap/pools/crypto-pool.md): **Crypto-Pools are exchange contracts containing two volatile (non-pegged) assets.**These exchange contracts are deployed via the CryptoSwap Factory. Unlike newer Factory... - [deployer-api](https://docs.curve.finance/developer/amm/legacy/factory/cryptoswap/deployer-api.md): The transaction will revert if the following requirements are not met. - [implementations](https://docs.curve.finance/developer/amm/legacy/factory/cryptoswap/implementations.md): The CryptoSwap Factory makes use of the create_forwarder_to function to deploy its contracts from the implementations.:::warning - [overview](https://docs.curve.finance/developer/amm/legacy/factory/cryptoswap/overview.md): The CryptoSwap Factory allows the permissionless deployment of two-coin volatile asset pools, LP tokens, and liquidity gauges. Liquidity pool and LP token share the same... - [deployer-api](https://docs.curve.finance/developer/amm/legacy/factory/stableswap/deployer-api.md): Transaction will fail if the requirements are not met. - [implementations](https://docs.curve.finance/developer/amm/legacy/factory/stableswap/implementations.md): The Stableswap Factory utilizes the create_forwarder_to function to deploy its contracts from the implementations.:::warning - [overview](https://docs.curve.finance/developer/amm/legacy/factory/stableswap/overview.md): The Metapool Factory, which was the first Curve Factory, allows the permissionless deployment of regular stableswap plain and metapools, LP tokens, and liquidity gauges.... - [Curve StableSwap Exchange: Overview](https://docs.curve.finance/developer/amm/legacy/stableswap-overview.md): The StableSwap algorithm integrates features of both the constant sum and constant product formulas, adjusting between these models based on the balance of assets in the pool.... - [overview](https://docs.curve.finance/developer/amm/legacy/stableswap/cross-asset-swaps/overview.md): Curve integrates with Synthetix to allow large scale swaps between different asset classes with minimal slippage. Utilizing Synthetix’ zero-slippage synth conversions and... - [synthswap-exchange](https://docs.curve.finance/developer/amm/legacy/stableswap/cross-asset-swaps/synthswap-exchange.md): This section discusses the different methods in the Curve SynthSwap contract. - [lending-pool-deposits](https://docs.curve.finance/developer/amm/legacy/stableswap/deposit-contracts/lending-pool-deposits.md): While Curve lending pools support swaps in both the wrapped and underlying coins, not all lending pools allow liquidity providers to deposit or withdraw the underlying coin. - [metapool-deposits](https://docs.curve.finance/developer/amm/legacy/stableswap/deposit-contracts/metapool-deposits.md): While Curve metapools support swaps between base pool coins, the base pool LP token and metapool coins, they do not allow liquidity providers to deposit and/or withdraw base... - [overview](https://docs.curve.finance/developer/amm/legacy/stableswap/deposit-contracts/overview.md): Curve pools may rely on a different contract, called a deposit zap for the addition and removal of underlying coins. This is particularly useful for lending pools, which may... - [curve-token-v1](https://docs.curve.finance/developer/amm/legacy/stableswap/lp-tokens/curve-token-v1.md): Get token name. - [curve-token-v2](https://docs.curve.finance/developer/amm/legacy/stableswap/lp-tokens/curve-token-v2.md): The implementation for a Curve Token V2 may be viewed on GitHub. - [curve-token-v3](https://docs.curve.finance/developer/amm/legacy/stableswap/lp-tokens/curve-token-v3.md): The Curve Token V3 is more gas efficient than versions 1 and 2. The implementation for a Curve Token V3 may be viewed on GitHub. - [overview](https://docs.curve.finance/developer/amm/legacy/stableswap/lp-tokens/overview.md): In exchange for depositing coins into a Curve pool, liquidity providers receive pool LP (liquidity pool) tokens. A Curve pool LP token is an ERC20 contract specific to the... - [Curve Stableswap Exchange: Overview](https://docs.curve.finance/developer/amm/legacy/stableswap/overview.md): Curve achieves extremely efficient stablecoin trades by implementing the Stableswap invariant, which has significantly lower slippage for stablecoin trades than many other... - [admin-pool-settings](https://docs.curve.finance/developer/amm/legacy/stableswap/pools/admin-pool-settings.md): The following are methods that may only be called by the pool admin (owner). - [lending-pools](https://docs.curve.finance/developer/amm/legacy/stableswap/pools/lending-pools.md): Curve pools may contain lending functionality, whereby the underlying tokens are lent out on other protocols (e.g., Compound or Yearn). Hence, the main difference to a plain... - [metapools](https://docs.curve.finance/developer/amm/legacy/stableswap/pools/metapools.md): A metapool is a pool where a stablecoin is paired against the LP token from another pool, a so-called base pool. - [overview](https://docs.curve.finance/developer/amm/legacy/stableswap/pools/overview.md): A Curve pool is a smart contract that implements the Stableswap invariant and thereby allows for the exchange of two or more tokens. - [plain-pools](https://docs.curve.finance/developer/amm/legacy/stableswap/pools/plain-pools.md): The simplest Curve pool is a plain pool, which is an implementation of the Stableswap invariant for two or more tokens. The key characteristic of a plain pool is that the pool... - [Curve Registry Exchange Contract](https://docs.curve.finance/developer/amm/router/curve-registry-exchange.md): The CurveRegistryExchange contract serves as a router for Curve liquidity pools. Users can utilize this contract to find pools, query exchange rates, and execute swaps directly. - [Curve Router NG](https://docs.curve.finance/developer/amm/router/curve-router-ng.md): The CurveRouterNG is used to perform token exchanges. It can swap up to five tokens in a single transaction. - [Plain and Meta-Pool Implementation with Custom Admin Controls](https://docs.curve.finance/developer/amm/stableswap-ng/implementations/custom1.md): This implementation enables **arbitrary assignment of an admin and admin_fee**for a specific pool. The Factory.admin() is, and will always remain, one of the pool’s... - [Stableswap-NG: Overview](https://docs.curve.finance/developer/amm/stableswap-ng/overview.md): Source code is available on GitHub. The following documentation covers source code up until commit number 5f582a6. - [metapool](https://docs.curve.finance/developer/amm/stableswap-ng/pools/metapool.md): A metapool is a pool where a stablecoin is paired against the LP token from another pool, a so-called base pool. - [Stableswap-NG Oracles](https://docs.curve.finance/developer/amm/stableswap-ng/pools/oracles.md): A specific AMM implementation of stableswap-ng has a bug that can cause the price oracle to change sharply if the tokens within the AMM do not all have the same token decimal... - [plainpool](https://docs.curve.finance/developer/amm/stableswap-ng/pools/plainpool.md): Plain pools are liquidity exchange contracts which contain at least 2 and up to 8 coins. - [Math Contract](https://docs.curve.finance/developer/amm/stableswap-ng/utility-contracts/math.md): The Math Contract provides AMM Math for Stableswap-NG Pools. - [Views Contract](https://docs.curve.finance/developer/amm/stableswap-ng/utility-contracts/views.md): This contract contains view-only external methods which can be gas-inefficient when called from smart contracts. - [Tricrypto-NG Overview](https://docs.curve.finance/developer/amm/tricrypto-ng/overview.md): Source code is available on GitHub. The following documentation covers source code up until commit number 33707fc. - [](https://docs.curve.finance/developer/amm/tricrypto-ng/pools/admin-controls.md): Applying new parameters or transferring the ownership of the factory involves a two-step model. In the first step, changes need to be committed. The second step involves... - [Tricrypto-NG Oracles](https://docs.curve.finance/developer/amm/tricrypto-ng/pools/oracles.md): Tricrypto-NG pools have the following oracle: - [CurveTricryptoOptimized](https://docs.curve.finance/developer/amm/tricrypto-ng/pools/tricrypto.md): A Tricrypto-NG pool consists of three non-pegged assets. The LP token is an ERC-20 token integrated directly into the liquidity pool. - [Math Contract](https://docs.curve.finance/developer/amm/tricrypto-ng/utility-contracts/math.md): The Math Contract provides AMM Math for 3-coin Curve Cryptoswap Pools. - [Views Contract](https://docs.curve.finance/developer/amm/tricrypto-ng/utility-contracts/views.md): This contract contains view-only external methods which can be gas-inefficient when called from smart contracts. - [overview](https://docs.curve.finance/developer/amm/twocrypto-ng/overview.md): The Twocrypto-NG contract infrastructure represents an optimized version of Curve Finance Crypto pools. - [Pool: Admin Controls](https://docs.curve.finance/developer/amm/twocrypto-ng/pools/admin-controls.md): Liquidity pools are deployed via the Factory. All pools deployed share the same admindefined within the Factory contract. Transfering the ownership of a pool is only possible... - [Twocrypto-NG Oracles](https://docs.curve.finance/developer/amm/twocrypto-ng/pools/oracles.md): Twocrypto-NG pools contain the following built-in oracles: - [Pools: Overview](https://docs.curve.finance/developer/amm/twocrypto-ng/pools/overview.md): New Features Over the Regular Two-Coin CryptoSwap Implementation:- New fee claiming approach - [CurveTwocryptoOptimized](https://docs.curve.finance/developer/amm/twocrypto-ng/pools/twocrypto.md): A Twocrypto-NG pool consists of two non-pegged assets. The LP token is an ERC-20 token integrated directly into the liquidity pool. - [Math Contract](https://docs.curve.finance/developer/amm/twocrypto-ng/utility-contracts/math.md): The Math Contract provides AMM Math for 2-coin Curve Twocrypto-NG Pools. - [Views Contract](https://docs.curve.finance/developer/amm/twocrypto-ng/utility-contracts/views.md): The Views Contract contains view-only external methods, which may be gas-inefficient when called from within smart contracts. However, it can be highly useful for searches,... - [BlockOracle](https://docs.curve.finance/developer/block-oracle/index.md): The BlockOracle contract is a decentralized block hash oracle which implements a threshold-based, multi-committer consensus mechanism for block hash commitments. Trusted... - [HeaderVerifier](https://docs.curve.finance/developer/block-oracle/header-verifier.md): The HeaderVerifier contract decodes RLP-encoded Ethereum block headers and forwards the extracted data to oracle contracts. It uses the BlockHeaderRLPDecoder module to parse... - [LZBlockRelay](https://docs.curve.finance/developer/block-oracle/lz-block-relay.md): The LZBlockRelay contract is a cross-chain block hash relay built on LayerZero's messaging protocol, designed for deployment on multiple EVM-compatible chains alongside the... - [MainnetBlockView](https://docs.curve.finance/developer/block-oracle/mainnet-block-view.md): A viewer contract deployed to Ethereum mainnet that provides access to block numbers and hashes. This contract is useful for cross-chain applications that need to verify block... - [Curve Block Oracle Overview](https://docs.curve.finance/developer/block-oracle/overview.md): Source code for the storage proof architecture is available here: GitHub: storage-proofs - [crvUSD](https://docs.curve.finance/developer/crvusd/index.md): The source code of the crvUSD contract can be found on GitHub. - [LLAMMA](https://docs.curve.finance/developer/crvusd/amm.md): LLAMMA (Lending Liquidating Automated Market Maker Algorithm) is the market-making contract that rebalances the collateral of a loan. It is an algorithm implemented into a... - [Controller](https://docs.curve.finance/developer/crvusd/controller.md): The Controller contract acts as a on-chain interface for creating loans and further managing existing positions. It holds all user debt information. External liquidations are... - [MarketFactory](https://docs.curve.finance/developer/crvusd/factory.md): The crvUSD MarketFactory enables the creation of new marketsand adjustments, including setting a new fee receiver, modifying the debt ceilingof an existing market, or updating... - [FlashLender](https://docs.curve.finance/developer/crvusd/flash-lender.md): The FlashLender.vy contract is an ERC-3156 contract that allows users to take out a flash loan for crvUSD. The flash loan must be repaid within the same transaction; otherwise,... - [LeverageZap.vy](https://docs.curve.finance/developer/crvusd/leverage/leverage-zap.md): This Zap contract is specifically designed to create leveraged loansusing predetermined routes that only utilize Curve pools. - [LeverageZap1inch.vy](https://docs.curve.finance/developer/crvusd/leverage/leverage-zap-1inch.md): This Zap contract is specifically designed to create or repay leveraged loans using the 1inch router. - [LeverageZapOdos](https://docs.curve.finance/developer/crvusd/leverage/llamalend-odos-leverage-zap.md): This Zap contract is specifically designed to create or repay leveraged loans using the Odos router. - [Leverage Overview](https://docs.curve.finance/developer/crvusd/leverage/overview.md): When using leverage, a user uses their borrowed assets (debt) to buy more of the collateral assets. To do this, Curve employs LeverageZap contracts, which automatically loop... - [LLAMMA Explainer](https://docs.curve.finance/developer/crvusd/llamma-explainer.md): Examples used in this section refer to an ETH <> crvUSD market, where ETH is the collateral and crvUSD is the borrowed token. Additionally, the examples in this section... - [Monetary Policy](https://docs.curve.finance/developer/crvusd/monetary-policy/index.md): MonetaryPolicy contracts are integrated into the crvUSD ecosystem, where they play a pivotal role in determining the interest rates for crvUSD markets. - [AggMonetaryPolicy (v4)](https://docs.curve.finance/developer/crvusd/monetary-policy/agg-monetary-policy-v4.md): The AggMonetaryPolicy4 contract is the latest version of the aggregated monetary policy for crvUSD markets. It builds on the original AggMonetaryPolicy with several key... - [Monetary Policy Overview](https://docs.curve.finance/developer/crvusd/monetary-policy/overview.md): Monetary policy contracts determine the borrow interest rate for each crvUSD mint market. They are called by the Controller on every user interaction (rate_write) and can be... - [CryptoFromPoolVaultWAgg](https://docs.curve.finance/developer/crvusd/oracles/crypto-from-pool-vault-w-agg.md): This oracle contract derives the price of ERC-4626 vault token collateral by reading a price oracle from a Curve liquidity pool and applying the vault's redemption rate... - [CryptoFromPoolsRateWAgg](https://docs.curve.finance/developer/crvusd/oracles/crypto-from-pools-rate-w-agg.md): This oracle contract chains together price oracles from multiple Curve liquidity pools and optionally applies stored_rates to account for tokens with rate oracles (e.g.,... - [Overview](https://docs.curve.finance/developer/crvusd/oracles/overview.md): As crvUSD markets use internal oracles, they utilize in-house liquidity pools to aggregate the price of collateral. But there is a possibility to use Chainlink oracle prices as... - [PriceAggregator](https://docs.curve.finance/developer/crvusd/oracles/price-aggregator.md): The AggregateStablePrice.vy contract is designed to get an aggregated price of crvUSD based on multiple stableswap pools weighted by their TVL. - [PriceAggregator (Old)](https://docs.curve.finance/developer/crvusd/oracles/price-aggregator-old.md): The AggregatorStablePrice contract is designed to aggregate the prices of crvUSD based on multiple Curve Stableswap pools. This price is primarily used as an oracle for... - [Curve Stablecoin: Overview](https://docs.curve.finance/developer/crvusd/overview.md): Curve Stablecoin infrastructure enables users to mint crvUSD using a selection of crypto collaterals. Adding new collaterals is subject to DAO approval. - [PegKeepers: Stabilizing the crvUSD Peg](https://docs.curve.finance/developer/crvusd/pegkeepers/overview.md): Source code of all PegKeepers can be found on GitHub. - [PegKeeperRegulator](https://docs.curve.finance/developer/crvusd/pegkeepers/peg-keeper-regulator.md): The regulator contract supervises prices and other parameters telling whether the PegKeeper are allowed to provide or withdraw crvUSD. - [PegKeeperV1](https://docs.curve.finance/developer/crvusd/pegkeepers/peg-keeper-v1.md): PegKeepers are contracts that help stabilize the peg of crvUSD. Each Keeper is allocated a specific amount of crvUSD to secure the peg. The DAO decides this balance and can be... - [PegKeeperV2](https://docs.curve.finance/developer/crvusd/pegkeepers/peg-keeper-v2.md): Source code for the PegKeeperV2.vy contract is available on GitHub. Relevant deployments can be found here. - [Curve DAO Token (CRV)](https://docs.curve.finance/developer/curve-dao/crv-token.md): The Curve DAO Token (CRV) is the protocol's governance token. It is based on the ERC-20 token standard as defined at EIP-20. - [Governance and Voting](https://docs.curve.finance/developer/curve-dao/governance/overview.md): Curve governance and voting is a integral part of the protocol as all relevant contract are in full control of the DAO. Curve uses Aragon for governance and control of the... - [Curve Voting Library](https://docs.curve.finance/developer/curve-dao/governance/voting-library.md): The curve-voting-lib is a Python toolkit for creating and simulating Curve DAO governance votes. Built on titanoboa (a Vyper/EVM execution framework), it replaces the... - [L2 Agents](https://docs.curve.finance/developer/curve-dao/governance/x-gov/agents.md): The Agent contracts acts as a proxy for the agents on Ethereum. Relayed votes are directly executed from the Relayer contract itself. Execution of messages is done... - [Broadcaster](https://docs.curve.finance/developer/curve-dao/governance/x-gov/broadcaster.md): Once a governance vote on Ethereum is successfully passed and executed, a corresponding sequence of messages needs to be communicated to other chains. The Broadcaster contract... - [L1/L2 Governance](https://docs.curve.finance/developer/curve-dao/governance/x-gov/overview.md): For being able to handle and execute governance activities not only on Ethereum but also on other networks such as Arbitrum, Optimism, Base, and many more, Curve has developed... - [L2 Relayer](https://docs.curve.finance/developer/curve-dao/governance/x-gov/relayer.md): The Relayer contract acts as a middleman, receiving messages from the Broadcaster and relaying them to the according Agent (ownership, parameter, or emergency). - [L2 Vault](https://docs.curve.finance/developer/curve-dao/governance/x-gov/vault.md): The Vault is a simple smart contract designed to enable the DAO to manage chain-native assets and ERC-20 tokens across chains other than Ethereum. - [Voting Escrow (veCRV)](https://docs.curve.finance/developer/curve-dao/voting-escrow/index.md): Participating in Curve DAO governance requires that an account have a balance of vote-escrowed CRV (veCRV). veCRV is a non-standard ERC-20 implementation, used within the... - [L2 veCRV Delegation](https://docs.curve.finance/developer/curve-dao/voting-escrow/crosschain/vecrv-delegation.md): The L2veCRVDelegation contract enables users to delegate their veCRV voting power to different addresses on other networks (Layer 2s or sidechains). This is essential for... - [L2 VotingEscrow Oracle](https://docs.curve.finance/developer/curve-dao/voting-escrow/crosschain/vecrv-oracle.md): The L2VotingEscrowOracle contract is used to fetch information from the VotingEscrow from Ethereum. This data can then be used to calculate boost rates for providing liquidity. - [L2 veCRV Verifiers](https://docs.curve.finance/developer/curve-dao/voting-escrow/crosschain/vecrv-verifiers.md): L2 verifier contracts are used to securely synchronize veCRV and related state from Ethereum mainnet (L1) to supported L2s. They validate Merkle proofs and block data from L1,... - [Contract Deployments](https://docs.curve.finance/developer/deployments.md): This page provides a searchable directory of all Curve contract deployments across all supported chains. Use the filters below to find specific contract addresses by chain,... - [Documentation Overview](https://docs.curve.finance/developer/documentation-overview.md): Curve is a decentralized exchange (DEX) and automated market maker (AMM) on Ethereum and EVM-compatible sidechains/L2s, designed for the efficient trading of stablecoins and... - [FastBridgeL2](https://docs.curve.finance/developer/fast-bridge/fast-bridge-l2.md): The FastBridgeL2 contract serves as the Layer 2 coordinator for the FastBridge system, handling the initiation of both native and fast bridge transactions. This contract is... - [FastBridgeVault](https://docs.curve.finance/developer/fast-bridge/fast-bridge-vault.md): The FastBridgeVault is the Ethereum mainnet component of the FastBridge system, responsible for managing pre-minted crvUSD tokens and handling the fast bridge mechanism. This... - [L2MessengerLZ](https://docs.curve.finance/developer/fast-bridge/l2-messenger-lz.md): The L2MessengerLZ contract serves as the LayerZero messaging component for the FastBridge system, handling the fast message delivery from L2 networks to the Ethereum mainnet... - [FastBridge Overview](https://docs.curve.finance/developer/fast-bridge/overview.md): FastBridge is a workaround solution for the 7-day delay from L2 native bridges by pre-minting crvUSD. This system enables fast cross-chain transfers of crvUSD from Layer 2... - [VaultMessengerLZ](https://docs.curve.finance/developer/fast-bridge/vault-messenger-lz.md): The VaultMessengerLZ contract serves as the Ethereum mainnet receiver for LayerZero messages in the FastBridge system. This contract receives fast bridge messages from L2... - [CowSwapBurner](https://docs.curve.finance/developer/fees/cow-swap-burner.md): The CowSwapBurner is an essential component of the fee burning architecture, designed to facilitate the efficient and automated exchange of admin fees using conditional orders... - [FeeAllocator](https://docs.curve.finance/developer/fees/fee-allocator.md): The FeeAllocator is a contract that allocates protocol fees between different receivers based on configurable weights. It sits between the Hooker and the FeeDistributor,... - [FeeCollector](https://docs.curve.finance/developer/fees/fee-collector.md): The FeeCollector serves as an entry point for the fee burning and distribution mechanism, acting as a universal contract that collects all admin fees from various revenue... - [FeeDistributor](https://docs.curve.finance/developer/fees/fee-distributor.md): Fees used to be distributed to veCRV in the form of 3CRV tokens, the LP token of the threepool, which consists of USDT, USDC, and DAI. After the release of Curve's own... - [FeeSplitter](https://docs.curve.finance/developer/fees/fee-splitter.md): The FeeSplitter is a contract that collects and splits accumulated crvUSD fees from crvUSD Controllers1 in a single transaction and distributes them across other contracts... - [Hooker](https://docs.curve.finance/developer/fees/hooker.md): The Hooker contract is a versatile and essential component within the Curve Finance ecosystem, designed to support and manage hooks that interact with the FeeCollector... - [Burner](https://docs.curve.finance/developer/fees/original-architecture/burner.md): Burning is handled on a per-coin basis. The process is initiated by calling the PoolProxy.burn or PoolProxy.burn_many functions. Calling to burn a coin transfers that coin into... - [Distributor](https://docs.curve.finance/developer/fees/original-architecture/distributor.md): Fees are distributed to veCRV holders through the FeeDistributor contract in the form of 3CRV tokens. - [Curve DAO: Fee Collection and Distribution](https://docs.curve.finance/developer/fees/original-architecture/overview.md): In June 2024, Curve deployed a new system to collect, burn, and distribute fees in a much more efficient manner. For full documentation of this system, please read here: Fee... - [Sidechains](https://docs.curve.finance/developer/fees/original-architecture/sidechains.md): Fee collection on sidechains works similarly to that on the Ethereum mainnet. Collected fees are sent to a fee receiver contract and then burned. On most sidechains, tokens are... - [Withdraw & Burn](https://docs.curve.finance/developer/fees/original-architecture/withdraw-and-burn.md): In order to be able to burn admin fees into the fee token, those fees have to be claimed prior. Admin fees can be claimed by anyone. Sometimes, the function to claim the fees... - [Fee Collection, Burning, and Distribution](https://docs.curve.finance/developer/fees/overview.md): The Curve ecosystem generates revenue from various sources, primarily through trading fees from liquidity pools and interest from crvUSD markets. This page explains how these... - [Updater](https://docs.curve.finance/developer/gauges/boosting-sidechains/updater.md): The Updater contract is deployed on Ethereum mainnet and is used to transmit veCRV information across chains to a L2 VotingEscrow Oracle. - [GaugeController](https://docs.curve.finance/developer/gauges/gauge-controller.md): The GaugeController contract is responsible for managing and coordinating the distribution of rewards to liquidity providers in various liquidity pools. It determines the... - [GaugeFactory](https://docs.curve.finance/developer/gauges/gauges/gauge-factory.md): The GaugeFactory contract is used to deploy liquidity gauges for Curve pools on the Ethereum mainnet. Once a liquidity gauge is deployed, it can be added to the GaugeController... - [Liquidity Gauge V6](https://docs.curve.finance/developer/gauges/gauges/liquidity-gauge-v6.md): The source code for the LiquidityGaugeV6.vy contract can be found on GitHub. The contract is written in Vyper version 0.3.10. - [Liquidity Gauges](https://docs.curve.finance/developer/gauges/gauges/overview.md): CRV inflation is directed to users who provide liquidity within the protocol, measured by "Liquidity Gauge" contracts. Each pool has its own liquidity gauge, maintained by the... - [Minter](https://docs.curve.finance/developer/gauges/minter.md): The Minter is responsible for the issuance and distribution of CRV tokens to liquidity providers. It acts as a mechanism to reward users who provide liquidity to Curve's pools.... - [Curve DAO: Liquidity Gauges and Minting CRV](https://docs.curve.finance/developer/gauges/overview.md): Curve is built in a way to incentivise liquidity providers with CRV, the protocols governance token. The protocol works in a way that it directs the inflation of the CRV token... - [Bridger Wrappers](https://docs.curve.finance/developer/gauges/xchain-gauges/bridgers.md): Bridger wrappers are contracts used to transmit ERC-20 tokens and especially CRV emissions across chains. Due to the increasing number of networks to which Curve deploys,... - [Child Gauge Implementation](https://docs.curve.finance/developer/gauges/xchain-gauges/child-gauge.md): The ChildGauge is the liquidity gauge contract on the sidechain. It is used to track the balance of liquidity providers and distribute CRV emissions to them. It is pretty much... - [ChildGaugeFactory](https://docs.curve.finance/developer/gauges/xchain-gauges/child-gauge-factory.md): The ChildGaugeFactory contract is used to deploy liquidity gauges on the child chains. It serves as some sort of registry for the child gauges by storing information such as... - [Curve Crosschain Gauges](https://docs.curve.finance/developer/gauges/xchain-gauges/overview.md): Due to the x-chain gauge system, Curve allows to deploy liquidity gauges on alternate chains which are eligible for receiving CRV emissions and boosts. - [Root Gauge Implementation](https://docs.curve.finance/developer/gauges/xchain-gauges/root-gauge.md): The RootGauge is a simplified liquidity gauge contract on Ethereum used for bridging CRV from Ethereum to a sidechain. This gauge can be, just like any other liquidity gauge,... - [RootGaugeFactory](https://docs.curve.finance/developer/gauges/xchain-gauges/root-gauge-factory.md): The RootGaugeFactory contract is used to deploy liquidity gauges on the Ethereum mainnet. These gauges can then be voted on to be added to the GaugeController. If successful,... - [Address Provider](https://docs.curve.finance/developer/integration/address-provider.md): The AddressProvider serves as the entry point contract for Curve's various registries and is deployed on all chains where Curve is operational. The contract holds the most... - [curve-api API](https://docs.curve.finance/developer/integration/api/curve-api.md) - [curve-prices API](https://docs.curve.finance/developer/integration/api/curve-prices.md) - [Integrating LLAMMA](https://docs.curve.finance/developer/integration/llamma.md): LLAMMA (Lending Liquidating AMM Algorithm) is Curve's band-based AMM used in crvUSD and Curve Lending (Llamalend) markets. Each lending market deploys its own LLAMMA AMM... - [Meta Registry](https://docs.curve.finance/developer/integration/meta-registry.md): The MetaRegistry functions as a Curve Pool Registry Aggregator and offers an on-chain API for various properties of Curve pools by consolidating different registries into a... - [Integration Docs](https://docs.curve.finance/developer/integration/overview.md): This section is targeted at external third parties interested in integrating Curve into their systems. Curve provides various contracts that simplify the integration process,... - [Rate Provider](https://docs.curve.finance/developer/integration/rate-provider.md): The RateProvider contract is designed to provide rates for token swaps. - [Integrating Stableswap-NG](https://docs.curve.finance/developer/integration/stableswap-ng.md): Stableswap-NG is Curve's AMM for trading pegged and correlated assets — stablecoins (USDC/USDT), liquid staking tokens (wstETH/ETH), yield-bearing tokens (sDAI), and other... - [Integrating Tricrypto-NG](https://docs.curve.finance/developer/integration/tricrypto-ng.md): Tricrypto-NG is Curve's AMM for trading three volatile, uncorrelated assets — the canonical example being ETH/BTC/USDT. Like Twocrypto-NG, it uses the Cryptoswap invariant with... - [Integrating Twocrypto-NG](https://docs.curve.finance/developer/integration/twocrypto-ng.md): Twocrypto-NG is Curve's AMM for trading volatile and uncorrelated asset pairs — e.g., ETH/USDC, TOKEN/ETH, or any two tokens that are not expected to maintain a fixed price... - [LLAMMA and Controller](https://docs.curve.finance/developer/lending/contracts/controller-llamma.md): This page documents the LlamaLend v1 Controller V3 and AMM contracts. For LlamaLend v2, use the LendController and AMM references. - [CryptoFromPool](https://docs.curve.finance/developer/lending/contracts/crypto-from-pool.md): Oracle contract for a collateral token that fetches its price from a single Curve pool. The first oracle contracts were deployed without considering the aggregated price of... - [CryptoFromPoolVault](https://docs.curve.finance/developer/lending/contracts/crypto-from-pool-vault.md): This oracle contract takes the price oracle from a Curve liquidity pool and applies the redemption of the vault token to it. This is often used when having ERC-4626 Vault... - [CryptoFromPoolsRate](https://docs.curve.finance/developer/lending/contracts/crypto-from-pools-rate.md): This oracle contract chains together two oracles from two different Curve liquidity pools and optionally applies stored_rates to tokens with an existing rate oracle. By... - [Building Leverage](https://docs.curve.finance/developer/lending/contracts/leverage.md): This page covers LlamaLend v1 leverage integrations. Validate v2 compatibility against the LlamaLend v2 contracts before reusing a zap or callback flow. - [Monetary Policies: Overview](https://docs.curve.finance/developer/lending/contracts/mp-overview.md): These are LlamaLend v1 monetary-policy contracts. LlamaLend v2 markets configure a policy through the Configurator. - [OneWay Lending Factory](https://docs.curve.finance/developer/lending/contracts/oneway-factory.md): This is the LlamaLend v1 factory. For new LlamaLend v2 markets, use the LendFactory reference. - [Lending Oracles: Overview](https://docs.curve.finance/developer/lending/contracts/oracle-overview.md): These oracle contracts are documented for LlamaLend v1. For LlamaLend v2 market configuration, see the Configurator. - [Secondary Monetary Policy](https://docs.curve.finance/developer/lending/contracts/secondary-mp.md): The SecondaryMonetaryPolicy contract calculates borrow rates based on the utilization in a lending market. It uses parameters derived from the target utilization and ratios at... - [Semi-Log Monetary Policy](https://docs.curve.finance/developer/lending/contracts/semilog-mp.md): The borrow ratein the semi-logarithmic MonetaryPolicy contract is intricately linked to the utilization ratio of the lending markets. This ratio plays a crucial role in... - [Vault](https://docs.curve.finance/developer/lending/contracts/vault.md): This page documents the LlamaLend v1 Vault. For the v2 ERC-4626 implementation, see the LlamaLend v2 Vault reference. - [LlamaLend v1: Legacy Overview](https://docs.curve.finance/developer/lending/overview.md): This section documents LlamaLend v1 contracts, including the crvUSD-pair requirement and the Vyper 0.3.x Controller/AMM design. LlamaLend v1 markets are being phased out: no... - [AMM (LLAMMA)](https://docs.curve.finance/developer/llamalend-v2/amm.md): The AMM contract implements LLAMMA — the Lending-Liquidating AMM Algorithm. It holds borrower collateral distributed across discretized price bands and performs soft... - [Configurator](https://docs.curve.finance/developer/llamalend-v2/configurator.md): The Configurator is the permissioned administrative entry point for LlamaLend v2 markets. It changes parameters across a market's controller, AMM, and view contracts; lenders,... - [Vault Integration Guide](https://docs.curve.finance/developer/llamalend-v2/integration-guide.md): Llamalend v2 vaults are standard ERC4626 vaults, so integrating them is straightforward — any protocol or aggregator that supports ERC4626 can plug in directly. - [LendController](https://docs.curve.finance/developer/llamalend-v2/lend-controller.md): The LendController is the primary user-facing contract for each lending market. Borrowers interact with it to create loans, manage collateral, borrow more, repay, and get... - [LendControllerView](https://docs.curve.finance/developer/llamalend-v2/lend-controller-view.md): The LendControllerView is a stateless view helper contract that the LendController delegates read-only computations to. It extends the base ControllerView module with... - [LendFactory](https://docs.curve.finance/developer/llamalend-v2/lend-factory.md): The LendFactory is the entry point for creating new one-way lending markets. It deploys a triplet of contracts — Vault, LendController, and AMM — from blueprint implementations... - [LMCallback](https://docs.curve.finance/developer/llamalend-v2/lm-callback.md): LMCallback works like a liquidity gauge for the collateral side of a LlamaLend/crvUSD AMM: it tracks each band's and each user's share of collateral over time and streams CRV... - [CurveLMCallbackFactory](https://docs.curve.finance/developer/llamalend-v2/lm-callback-factory.md): CurveLMCallbackFactory deploys LM Callback contracts for LlamaLend and crvUSD markets from a shared blueprint. LM Callbacks let an AMM route liquidity-mining incentives to... - [Llamalend v2: Overview](https://docs.curve.finance/developer/llamalend-v2/overview.md): Llamalend v2 is a major refactor of Curve's lending infrastructure, built on the same curve-stablecoin codebase that powers crvUSD. The system enables permissionless one-way... - [Vault](https://docs.curve.finance/developer/llamalend-v2/vault.md): The Vault is an ERC4626-compliant vault where lenders deposit the borrowed token (e.g., USDC, WETH) to earn yield from borrower interest. Each lending market has its own... - [Ownership in Curve Contracts](https://docs.curve.finance/developer/resources/curve-practices.md): Smart contracts often have owner-guarded functions which only allow specific addresses to call certain functions. These are typically used for administrative operations like... - [Mathematical Derivations](https://docs.curve.finance/developer/resources/derivations.md): This page contains the mathematical derivations for the Newton's method implementations used in Curve's AMM contracts. - [Notebooks](https://docs.curve.finance/developer/resources/notebooks.md): Notebooks are easy-to-use notebooks written in Python aiming to showcase the usage of smart contracts and their functionalities. They can be interactively designed and directly... - [Useful Resources](https://docs.curve.finance/developer/resources/useful.md): This section hosts useful resources for the various components of the Curve ecosystem. - [Whitepapers](https://docs.curve.finance/developer/resources/whitepaper.md): Curve Finance whitepapers covering core protocol, governance, and stablecoin mechanisms. - [Crosschain scrvUSD](https://docs.curve.finance/developer/scrvusd/crosschain/oracle-v0.md): scrvUSD on Ethereum is an ERC-4626 compatible token. While the contract provides a price through various methods, such as pricePerShare or pricePerAsset, it is not treated as... - [blockhash](https://docs.curve.finance/developer/scrvusd/crosschain/oracle-v2/blockhash.md): soon - [scrvUSD Crosschain Oracle](https://docs.curve.finance/developer/scrvusd/crosschain/oracle-v2/oracle.md): The source code for the ScrvusdOracleV2 contract is available on GitHub. The contract is written in Vyper version 0.4.0. - [scrvUSD Crosschain Oracle V2](https://docs.curve.finance/developer/scrvusd/crosschain/oracle-v2/overview.md): scrvUSD on Ethereum is an ERC-4626 compatible token. While the contract provides a price through various methods, such as pricePerShare or pricePerAsset, it is not treated as... - [scrvUSD Verifier](https://docs.curve.finance/developer/scrvusd/crosschain/oracle-v2/verifier.md): The two verifier contracts work together to securely update and maintain the scrvUSD oracle using on-chain state proofs. - [Savings crvUSD](https://docs.curve.finance/developer/scrvusd/overview.md): Savings crvUSD, in short scrvUSD, is a savings version of crvUSD. - [RewardsHandler](https://docs.curve.finance/developer/scrvusd/rewards-handler.md): The RewardsHandler contract manages the distribution of crvUSD rewards to Savings crvUSD (scrvUSD). The contract takes snapshots of the ratio of crvUSD deposited into the Vault... - [StablecoinLens](https://docs.curve.finance/developer/scrvusd/stablecoin-lens.md): The StablecoinLens contract calculates the accurate circulating supply of crvUSD by summing the debt of all PegKeepers and the total debt of all Controllers. This approach is... - [Security](https://docs.curve.finance/developer/security/index.md): Curve Finance prioritizes the security of its protocols and user funds above all else. We maintain a bug bounty program to encourage responsible disclosure of potential...