Skip to main content

Curve Stablecoin: Overview

Curve Stablecoin infrastructure enables users to mint crvUSD using a selection of crypto collaterals. Adding new collaterals is subject to DAO approval.

crvUSD is designed to provide a more capital-efficient stablecoin mechanism and smoother liquidations, while maintaining a decentralized design which the Curve DAO governs.

GitHub

The source code for all releveant stablecoin contract can be found on GitHub . Related deployments can be found here.


Curve Stablecoin Infrastructure Components

crvUSD

crvUSD token which is based on the ERC-20 Token Standard.

crvUSD.vy
Savings crvUSD

Savings crvUSD, abbreviated as scrvUSD, is a yield-bearing version of crvUSD built on top of a Yearn V3 Vault. It earns a portion of the yield generated by borrowers who pay interest to mint crvUSD.

Savings crvUSD
Controller

The Controller is the contract the user interacts with to create a loan and further manage the position. It holds all user debt information. External liquidations are also done through it.

Controller.vy
LLAMMA

LLAMMA is the market-making contract that rebalances the collateral. As the name suggests, this contract is responsible for liquidating collateral. Every market has its own AMM (created from a blueprint contract) containing the collateral asset and crvUSD.

LLAMMA.vy
Factory

The Factory is used to add new markets, raise or lower debt ceilings of already existing markets, set blueprint contracts for AMM and Controller, and set fee receiver.

Learn more
Monetary Policy

Monetary policy contracts are integrated into the crvUSD system and are responsible for the interest rate of crvUSD markets.

Learn more
PegKeepers

PegKeepers are contracts that help stabilize the peg of crvUSD. They are allocated a specific amount of crvUSD to secure the peg.

Learn more
Price Aggregator

The AggregatorStablePrice contract is designed to aggregate the price of crvUSD based on multiple Curve pools. This price is mainly used as an oracle for calculating the interest rate, providing an aggregated and exponential moving average price.

Learn more
Oracles

Oracle contract used for collaterals in the markets.

Oracles
Flash Loan

The FlashLender.vy contract allows users to take out a flash loan for crvUSD.

FlashLender.vy

Controller & AMM Versions

The crvUSD mint markets use several iterations of the Controller and AMM (LLAMMA) contracts. Each version was deployed as a new blueprint — existing markets are not affected when a new implementation is set. Llamalend later adopted the V3 blueprint, so all Llamalend markets share the same Controller/AMM version as the latest crvUSD markets.

Version Matrix

VersionVyperController BlueprintAMM BlueprintSource
V10.3.70x...8fA (Etherscan)0x...3D1 (Etherscan)58289a4
V20.3.90x...7Dd (Etherscan)0x...3D1 (Etherscan)
V30.3.100xe3e...415 (Etherscan)0x2B7...e9 (Etherscan)b0240d8
info

V3 is the current blueprint set on the Controller Factory. It is also the version used by all Llamalend markets.

Market → Version Mapping

Market (Collateral)Controller VersionStatus
sfrxETH (v1)V1Deprecated (0 debt ceiling)
wstETHV1Active
WBTCV1Active
WETHV1Active
sfrxETH (v2)V2Active
tBTCV2Active
weETHV3Active
cbBTCV3Active
LBTCV3Active

Changelog

V1 → V2

  • Compiler upgrade: Vyper 0.3.7 → 0.3.9.
  • Minor internal changes; the external API is identical.

V2 → V3

V3 is a significant upgrade that was developed alongside Llamalend. The same blueprint is shared by crvUSD mint markets and all Llamalend lending markets.

  • Compiler upgrade: Vyper 0.3.9 → 0.3.10.
  • Delegated loan creation: create_loan, borrow_more, repay, and liquidate accept an optional _for parameter, allowing approved operators to manage loans on behalf of users. See approve.
  • Extra health buffer: Users can set extra_health via set_extra_health, adding a health buffer when entering soft liquidation.
  • Extended borrow: New borrow_more_extended function supporting callback-based leverage.
  • Arbitrary-decimal tokens: The Controller now handles tokens with any number of decimals (not just 18), with rounding adjusted in favor of existing borrowers. This was necessary for Llamalend's flexible token support.
  • collect_fees() disabled for lending: In Llamalend markets, admin fees are zero and all interest goes to vault depositors.
  • Native ETH transfers removed: Automatic ETH wrapping is permanently disabled for safety.
  • check_lock / save_rate: New external helpers used by the Vault contract in Llamalend.