Curvefi crvUSD loans use LLAMMA to rebalance collateral within price bands
Curvefi crvUSD is a stablecoin borrowers obtain against approved collateral, with a target value of one US dollar. LLAMMA, the Lending Liquidating Automated Market Maker Algorithm, distributes the collateral across price bands. Arbitrage trades can convert collateral into crvUSD as the collateral price enters that range. This soft liquidation changes the loan’s backing assets while its debt remains outstanding.
Updated:The band range, collateral composition, and debt measure different parts of a position. A loan may hold both collateral and crvUSD inside LLAMMA. That stablecoin balance remains part of its backing, separate from spendable wallet funds.
Opening a loan with a defined collateral range
A basic mint-market loan requires approved collateral, a permitted debt amount, and available crvUSD in the Controller. The Controller records borrowing and repayment, while its paired LLAMMA holds the collateral. Successful loan creation transfers collateral into the bands and crvUSD to the borrower.
- Confirm the selected mint market accepts the collateral you intend to deposit.
- Compare the selected band range with the debt amount the Controller allows.
- Check the Controller has enough available crvUSD for the requested loan.
- After loan creation succeeds, match the recorded debt and band count to the submitted settings.
- Read the collateral composition and health before deciding whether to increase the debt.
A collateral approval grants spending permission; it does not create the loan.
Band count and borrowing capacity
Mint-market Controllers V1 through V3 accept 4 to 50 bands at loan creation. The Controller initially spreads collateral evenly across consecutive bands whose combined boundaries define the loan’s soft-liquidation range. More bands spread conversion across a wider range. For otherwise identical market settings and collateral, a higher band count lowers maximum borrowing.
Borrowing capacity also depends on collateral amount, its oracle price, and market risk parameters. The Controller calculates band placement from these inputs and the requested debt. Available crvUSD can impose a separate limit even when collateral supports more borrowing. A maximum-loan quote describes capacity at the quoted state; later price or market changes can alter it.
How does LLAMMA convert collateral into crvUSD?
LLAMMA converts collateral through arbitrage trades its pricing rules encourage when the collateral’s oracle price enters the deposited bands. An oracle supplies a reference price, while the AMM calculates exchange prices whose relationship to that reference creates trading opportunities. Actual conversion requires executed trades, so an oracle update alone does not establish a completed collateral sale.
A falling collateral price encourages conversion into crvUSD within the affected bands. A recovering price can encourage trades in the opposite direction, called de-liquidation. Conversions operate on shared band liquidity, with each borrower owning a share of the bands containing their deposit. A band can contain collateral, crvUSD, or both, depending on its trading state. The AMM’s position balances describe assets backing the loan. They exclude crvUSD originally borrowed into the wallet. Its active band identifies the current trading region; the borrower’s own band range identifies where their collateral liquidity sits.
Can a soft-liquidated loan still face hard liquidation?
A soft-liquidated crvUSD loan can face hard liquidation if its health deteriorates enough. A crvUSD loan becomes eligible for external hard liquidation when its Controller’s full health falls below zero. In that process, a liquidator settles debt using the position’s crvUSD and any additional required payment, receiving collateral through the Controller.
Interest can reduce health even when the collateral price holds steady. Repeated conversions can also erode backing value, especially while the price oscillates within the range.
De-liquidation can buy collateral back as the oracle price recovers, although previous trading losses can leave the restored position with fewer collateral tokens. The price path and executed trades determine the resulting composition.
Swap fees earned inside LLAMMA can offset some conversion losses. They do not promise complete reimbursement. Reaching the lower end of the range does not, by itself, settle debt or determine external-liquidation eligibility.
Interest accrual and repayment assets
Interest increases outstanding crvUSD debt through the market’s rate accumulator, whether or not collateral trades inside LLAMMA. Monetary policy sets borrowing rates using crvUSD’s price and system debt conditions. AggMonetaryPolicy v4 also smooths PegKeeper debt ratios and adjusts rates for market debt-ceiling utilization. A displayed annualized rate describes a particular rate reading; future accrual follows subsequent policy updates. The Controller’s basic repayment method reduces recorded debt using crvUSD the payer supplies from outside LLAMMA. Full repayment returns the position’s remaining backing assets, including any crvUSD already inside the AMM.
Those balances can differ from the collateral originally deposited. Supported callback repayment methods can combine collateral withdrawal and conversion within their contract path. The proceeds must meet that method’s repayment requirements and execution checks.
PegKeepers and the dollar target
PegKeepers support crvUSD’s dollar target by adjusting liquidity in designated stablecoin pools. When permitted by their controls, deposits increase the pool’s crvUSD balance and counter upward price pressure. Withdrawals reduce that balance when downward pressure calls for contraction. Withdrawal capacity depends on liquidity shares accumulated through earlier deposits. These operations affect the stablecoin’s market liquidity; LLAMMA manages the backing of individual loans.
PegKeeperV2 uses a Regulator to control whether providing or withdrawing liquidity is allowed. Its checks include oracle-price conditions, debt-distribution limits, and administrative pauses. Pool liquidity and the paired stablecoin’s behavior also affect peg support. A pool price near the dollar target does not establish a particular borrower’s loan health.
Mint-market supply and contract versions
Mint-market loan creation draws on crvUSD allocated to its Controller. The Factory mints crvUSD to a market Controller when its debt ceiling exceeds the market’s tracked allocation. Borrowing releases part of that allocation against collateral, and repayment replenishes the Controller’s balance. An unused Controller allocation contributes to token supply without representing funds already borrowed by users.
DAO governance determines which collateral can enter mint markets, with veCRV supplying voting power. Market Controllers also differ by version. Controller V3 supports delegated loan management and an optional extra-health buffer at creation. That buffer reduces borrowing capacity to preserve additional health upon entering soft liquidation. Contract support does not establish which controls a particular interface exposes.
Quick answers about Curvefi crvUSD
Why can a collateral top-up fail during soft liquidation?
In mint-market Controllers V1 through V3, basic collateral addition requires the position to contain no crvUSD inside LLAMMA. Soft liquidation can violate that condition even when more collateral is available in the wallet. Debt repayment remains a separate operation; a collateral top-up cannot bypass the position-state restriction.
Can one address open a second crvUSD loan in the same mint market?
A mint-market Controller allows only one active loan per borrower address. Creating another loan for the same address in that Controller reverts while the first remains open. An eligible existing position can use its supported debt-adjustment method. Separate markets have separate Controllers and loan records.
Does burning crvUSD directly reduce my outstanding loan debt?
A direct token burn lowers crvUSD token supply without updating a Controller’s loan ledger. Loan debt falls through the Controller’s repayment or liquidation accounting. Burning wallet-held crvUSD is therefore not equivalent to repaying the loan, even though the tokens disappear from that wallet.
Which token decimals apply to crvUSD debt and collateral amounts?
crvUSD debt amounts use the token’s 18-decimal precision, while collateral amounts use the collateral token’s own precision. Raw contract integers need their respective decimal scaling before comparison with displayed token amounts. Sharing a Controller call does not make the two amount fields use the same unit.
What makes full loan health different from health at the liquidation range?
The Controller’s full health calculation can include collateral value above the upper liquidation-range boundary. Its base calculation excludes that extra value and evaluates the position relative to its liquidation range. Mint-market Controllers use full health for external-liquidation eligibility. The readings can differ before soft liquidation, so comparisons need the same calculation mode.
When can a partial repayment move a crvUSD loan’s bands?
A basic partial repayment can reposition bands when the loan’s first band index exceeds LLAMMA’s effective active band index. Controllers V1 through V3 then recalculate placement using remaining debt and collateral, retaining the band count. If the active band has reached or passed that starting index, repayment reduces debt without repositioning the bands.
Is delegated loan management available in every crvUSD mint market?
Delegated loan management requires a supporting Controller version, including Controller V3. A borrower authorizes another address through a Controller-level approval. That permission differs from an ERC-20 token allowance: one authorizes supported loan actions, while the other permits token spending. Interface support for the relevant functions is a separate requirement.
Who can call a PegKeeper update?
Any wallet account or smart contract can call a PegKeeper update. The call does not ensure a deposit or withdrawal occurs. For PegKeeperV2, the action delay, available balances, pool conditions, and Regulator permissions constrain execution. PegKeeperV2 returns zero without adjusting liquidity during the action delay. After the delay expires, a Regulator ban makes the call revert.