Liquidation¶
Overview¶
The Liquidation module extends the Stability Pool by handling the safe liquidation of under-collateralised positions.
It is deployed as an immutable implementation and is executed only via delegatecall from the StabilityPool (or an authorised proxy).
Warning
Direct interaction with the implementation contract is blocked by onlyProxy.
This guarantees state changes persist in the StabilityPool and prevents standalone abuse.
No Deposit or Minting Fees on Liquidation
When a liquidation occurs, no deposit or minting fees are charged by the LendingPool or the RWA Vault.
The full value of the liquidated collateral is used to restore the Stability Pool and protocol health, ensuring that liquidations are not penalized by protocol fees at any stage.
Purpose¶
- Check borrower health; abort if the position is still safe.
- Transfer borrower collateral (ERC-20 / ERC-721) to the RWA Vault and mint iREET.
- Split minted iREET per protocol parameters:
- Minting fee → Treasury
- Burn → permanent removal
- Swap → convert to pmUSD
- Liquidity rewards → sent to the FeeCollector
- Restore the Stability Pool’s rToken by re-depositing swapped pmUSD into the LendingPool.
Note
Keeping liquidation logic in a delegate-callable module keeps the Stability Pool compact and upgradeable without storage clashes.
Philosophy & Incentives¶
Manager-Driven Liquidations¶
- RAAC does not incentivize external liquidators.
- Only protocol managers trigger liquidations; this matches the real-estate risk profile.
Conservative Parameters¶
- Borrow Threshold: 50%
- Liquidation Threshold: 60% (10% buffer)
Risk Mitigation¶
- Real-estate volatility is low (typical drawdowns are gradual).
- Prices follow Broker Price Opinions (BPOs); a property is revalued when a new BPO is issued, on a schedule that depends on the asset and its local market.
- Focus on Section 8 housing (government-subsidised).
- Diversified across low-risk states.
User Incentives¶
Users deposit rToken → receive deToken → may stake for rental yield and external liquidity incentives, concentrating rewards via gauges.
Liquidation Mechanics¶
- The entire position is taken (debt + collateral).
- The LendingPool clears the user’s debt when
finalizeLiquidationis executed; collateral is transferred to the Stability Pool. - Collateral is then routed to the RWA Vault to mint iREET, which is split across Treasury / Burn / Swap / Liquidity.
- The Swap leg (iREET → pmUSD) is re-deposited into the LendingPool to restore rToken used by the Stability Pool.
Excess pmUSD handling
Any excess pmUSD after liquidation is deposited back into the LendingPool, minting rToken to the Stability Pool without minting deToken.
In a bad-debt scenario that surplus therefore repairs the pool's backing before it becomes withdrawable value for anyone.
Operating a Liquidation¶
Liquidations in v1 are operated, not automated. The manager role is held by a multisig, which lets the protocol review each liquidation and submit the parameter changes, any Treasury funding and the liquidateBorrower call together as one batch. Before each liquidation the operator sizes it to current market conditions using the parameters below, so that it clears in a single transaction.
Parameters¶
| Parameter | Set via | Who | What it controls |
|---|---|---|---|
mintBps (Treasury fee) |
setLiquidationVaultTokenSplit |
Manager or owner | Share of the minted iREET sent to the Treasury |
burnBps |
setLiquidationVaultTokenSplit |
Manager or owner | Share of the minted iREET burned |
swapBps |
setLiquidationVaultTokenSplit |
Manager or owner | Share of the minted iREET sold for pmUSD through LiquidationSwap |
liquidityBps |
setLiquidationVaultTokenSplit |
Manager or owner | Share of the minted iREET sent to liquidity rewards |
slippageProtectionBps |
LiquidationSwap.setLiquidityPool |
Owner | Maximum discount to NAV the swap leg will accept |
enableSlippageProtection |
LiquidationSwap.setEnableSlippageProtection |
Owner | Whether the NAV floor is applied at all |
The four split values are updated atomically in one call and must sum to 10000. The split is not a fixed protocol constant: the operator sets it before each liquidation from the sizing policy below, mainly to choose how much iREET the swap leg sells. The price impact cap and the floor tolerance ceiling in that policy are operator parameters, not on-chain values.
The swap floor is derived from NAV, by design¶
LiquidationSwap computes its minimum output from the RWA Vault's pricePerShare() (NAV) and the pmUSD/USD oracle, not from the AMM's own quote:
expectedDy = pricePerShare * amount / pmUSDPrice
minDy = expectedDy * (10000 - slippageProtectionBps) / 10000
If the pool trades iREET more than slippageProtectionBps below NAV, whether because the swap is large relative to pool depth or because the market is at a discount, the exchange reverts with SlippageExceeded and the whole liquidation reverts. This is intentional. A floor derived from the pool's own quote would accept whatever price a depressed or manipulated pool offers; the NAV floor stops the Stability Pool from selling collateral below fair value unless an operator explicitly allows it.
The value set at deployment is an initial value, not a permanent bound. When a liquidation is blocked by the floor, the operator has two levers:
- Reduce
swapBps. Sell only what the pool can absorb within tolerance, with a buffer, and route the remainder to the Treasury share (mintBps) or the other legs. The Treasury can then sell its iREET gradually, at normal market pace, instead of in one large trade. - Widen
slippageProtectionBps(owner), when selling at the discount is the right decision, for example under a sustained market discount where waiting costs more than the discount.
A smaller swap does not by itself make the liquidation revert: any amount the swap does not raise is a shortfall, handled by one of the paths below.
Sizing policy¶
The operator sizes each liquidation with one rule set, so that the same market conditions always give the same split. The operations dashboard computes it; the manager multisig only confirms or overrides it.
Two prices, each used in one place. Curve's get_dy sizes the swap and measures its price impact; it values nothing else. NAV (the RWA Vault's pricePerShare() through the pmUSD/USD oracle) values the collateral, the Treasury's share and the liquidity share. Curve may trade iREET at a premium or a discount to NAV; only the swap cares.
Policy shares. Burn is 2.5% and the Treasury's base fee is 2.5%. The swap share is the smallest share whose get_dy, plus any pmUSD the Stability Pool already holds, covers the debt plus a 1% accrual margin. Whatever remains goes to liquidity rewards. If the swap needs more than 95%, the Treasury's base fee yields first and burn after it.
Two bounds on the swap. The swap stops growing at whichever comes first:
| Bound | Default | Where it lives |
|---|---|---|
| Price impact cap: the realised rate may not fall further below Curve's spot rate | 1% | Operator parameter |
Floor tolerance ceiling: the highest slippageProtectionBps the operator will set |
5% | Operator parameter; the on-chain value is raised up to it, in the same transaction, to the smallest value that lets the swap clear |
When Curve trades under NAV, the operator first raises slippageProtectionBps to what the swap needs plus a small cushion (0.10%) against drift between the quote and execution, never above the ceiling. Two details of the contract order matter here: the burn leg runs before the swap, which lifts the vault's price per share by the burned share of the supply, so the floor is computed on that slightly higher NAV; and the need is measured on the whole swap at once, since the floor applies to its total output. When Curve trades further under NAV than the ceiling allows, no swap clears and the position is OTC only.
Partial and full OTC. Any part of the debt the swap does not raise is the gap: pmUSD the Treasury sends to the Stability Pool before the liquidation (path A below). In return the unsold iREET goes to the Treasury through mintBps: its base fee, plus iREET worth the gap at NAV, plus the bonus. Once the Treasury funds a gap, the liquidity share is capped at 15% and anything above that is the Treasury's bonus. The invariant is that the Treasury never ends with less iREET at NAV than the pmUSD it provided; the liquidity share shrinks first to keep it. A full OTC liquidation is the same rule with the swap at zero: burn 2.5%, liquidity up to 15%, the Treasury the rest. The operator may also choose full OTC by hand.
| Case, on 100 iREET at NAV 1.00 against a debt of 70 | Swap | Burn | Treasury | Liquidity | Treasury sends |
|---|---|---|---|---|---|
| Swap covers the debt within the impact cap | 71 | 2.5 | 2.5 | 24 | 0 |
| Impact cap stops the swap at 40 iREET | 40 | 2.5 | 42.5 | 15 | 30.5 pmUSD |
| Full OTC | 0 | 2.5 | 82.5 | 15 | 70 pmUSD |
Bad debt. When the collateral is worth less than the debt at NAV, no split gives the Treasury iREET worth its pmUSD. The dashboard shows the loss rather than hiding it, and the operator picks who takes it: the Treasury pre-funds at a loss and the pool's backing stays whole, or the pool absorbs the gap (path B) and the Treasury restores it later.
Legs that would revert. While the FeeCollector is paused or the liquidity fee type is not registered, the liquidity share is set to zero and that share goes to the Treasury. The Treasury contract must list iREET as a supported token, since the Treasury leg deposits into it.
The LendingPool's buffer on write-off. When the debt is written off, the LendingPool rebalances its buffer against the new total liquidity before the repayment reaches it, and takes the difference from its yield vault. A build that rebalances strictly reverts with Not enough liquidity to fulfill the withdrawal when the vault cannot give that much, which a large write-off against a high buffer ratio triggers. The operator then sends the whole shortage to the rToken contract first (the liquidity injection of path B), from the same source as the gap, or lowers the buffer ratio.
One liquidation per transaction. The gap funding, the tolerance change and the split are set in the same transaction as liquidateBorrower, so the proxy reads exactly what the operator sized. When the funding comes from a multisig other than the manager, the liquidation waits until the Stability Pool holds the pmUSD. Any pmUSD left after repayment becomes pool rToken, which the owner can recover with collectDust, so over-funding is not lost. Several positions are liquidated one transaction at a time: each swap moves Curve's price, so the next position is sized on the state the previous one left.
Covering a shortfall¶
liquidateBorrower compares the Stability Pool's own pmUSD balance (swap proceeds plus anything already held) with the position's debt. The difference, rTokenAmountRequired, is the only amount the pool must raise by redeeming its rToken through lendingPool.withdraw(). That call needs idle pmUSD in the LendingPool, so under high utilisation it can revert even when the pool holds enough rToken. Depending on conditions, the operator chooses one of the following:
| Path | What happens | Needs idle pmUSD in the LendingPool? | Stability Pool backing afterwards |
|---|---|---|---|
| A. Treasury pre-funds the Stability Pool | The Treasury transfers pmUSD to the Stability Pool before the liquidation. Swap proceeds plus the top-up cover the debt, so rTokenAmountRequired is zero and lendingPool.withdraw() is never called. Any excess is re-deposited as rToken to the pool. |
No | Whole |
| B. Stability Pool absorbs the gap | The pool redeems its own rToken for the gap through lendingPool.withdraw(). |
Yes | Under-backed by the gap until the Treasury restores it |
| B + liquidity injection | If idle cash is too low for path B, the Treasury first injects pmUSD into the LendingPool (a direct transfer to the rToken contract) so the withdrawal can clear. If the pool's own rToken is short (InsufficientBalance), the Treasury transfers rpmUSD it holds to the Stability Pool. |
Provided by the Treasury | Under-backed by the gap until the Treasury restores it |
| C. Redirect to Treasury, repay later | The operator lowers swapBps and sends the unsold iREET to the Treasury via mintBps. The Stability Pool covers the gap (path B), taking a temporary cut. The Treasury sells the iREET over time at normal market pace and transfers rToken to the Stability Pool to make it whole. |
Yes, or injected as above | Restored as the Treasury sells |
Restoring backing after paths B and C works as described in Restoring backing from the Treasury: rToken is transferred to the pool directly, never through deposit(), so no deToken is minted against it.
Time under liquidation
Once a position is under liquidation it stays latched (isUnderLiquidation) so the borrower cannot exit mid-process, and its debt keeps accruing until liquidateBorrower succeeds. A reverted attempt changes no state. The interest accrued in that window is bounded by how quickly the operator adjusts parameters or arranges Treasury funding, which is why these adjustments are part of the standard liquidation procedure rather than an exceptional step.
When a liquidation can revert¶
A liquidation is a manager-operated process, not a permissionless one, and it is allowed to revert. Each leg of the split sends value to a specific destination; if that destination cannot accept it, or a parameter does not fit current conditions, the leg reverts and the whole liquidation reverts with it. Funds are never silently rerouted to a destination the manager did not choose. A reverted attempt changes no state: the manager adjusts the parameters and resubmits, normally in the same multisig batch as the liquidateBorrower call.
| Cause | Where it reverts | What the manager does |
|---|---|---|
| Swap would clear below the NAV floor | LiquidationSwap reverts SlippageExceeded |
Lower swapBps, or have the owner widen slippageProtectionBps. See The swap floor is derived from NAV, by design |
slippageProtectionBps below the AMM's fee |
LiquidationSwap reverts SlippageExceeded on every swap |
Owner raises slippageProtectionBps above the pool fee. See Design Decisions |
| Shortfall while LendingPool idle cash is low | lendingPool.withdraw() cannot source the pmUSD |
Treasury pre-funds the Stability Pool or injects liquidity. See Covering a shortfall |
FeeCollector paused, or the iREET token or RWA_INDEX_TOKEN_LIQUIDITY_REWARDS fee type not registered |
FeeCollector.collectFee in the liquidity leg |
Set liquidityBps to 0 and move that share to another leg |
| Swap route, fee collector or Treasury not set | The matching leg reverts (liquidation swap not set, fee collector not set, treasury not set) |
Set that leg's share to 0, or configure the address |
Unsupported adapter, adapters report different asset tokens, data does not match the position, or the debt is zero |
Pre-checks in liquidateBorrower |
Pass the correct poolAdapter, vaultAdapter and data |
Liquidations while paused¶
Pausing the protocol does not pause liquidations. The pause exists to contain an incident, and clearing unhealthy positions is part of that work.
| Contract paused | Effect on liquidateBorrower |
|---|---|
| StabilityPool | None. liquidateBorrower is not whenNotPaused; only deposit, requestWithdraw and withdraw stop. |
| LendingPool | None. updateState, finalizeLiquidation, deposit and withdraw all let the StabilityPool through the pause. Borrower-side calls (repay, repayOnBehalf, closeLiquidation) and initiateLiquidation stay paused. |
| FeeCollector | Only the liquidity leg is affected: collectFee is whenNotPaused. The manager sets liquidityBps to 0 for the duration of the pause, as in the table above. |
Access Control & Safety¶
| Mechanism | Description |
|---|---|
onlyProxy |
Prevents direct calls; execution must come via Stability Pool. |
| Managers | Only managers/owner in Stability Pool can call liquidateBorrower and setLiquidationVaultTokenSplit. The manager role is held by a multisig. |
| Validation | • Adapters must be registered • Asset/vault adapter tokens must match • data must validate • Debt > 0 • Pool must hold enough liquidity |
Key Functions¶
| Function | Type | Description |
|---|---|---|
liquidateBorrower(poolAdapter, vaultAdapter, user, data, minSharesOut) |
external | Entry point from Stability Pool; runs the full liquidation cycle and emits BorrowerLiquidated. |
vaultAdapter is always the ERC-721 path
poolAdapter is the borrower-side IAssetAdapter; vaultAdapter is the vault-side IVaultAssetAdapter, and in practice it is always RAACNFTVaultAdapterV2. No ERC-20 vault adapter is deployed. The proxy still validates that both adapters report the same asset token before proceeding.
| _handleLiquidation(poolAdapter, vaultAdapter, data) | internal | Routes collateral → RWA Vault → iREET → split (treasury, burn, swap, liquidity). |
| _handleSwap(amount) | internal | Swaps iREET for pmUSD via the configured swap implementation. |
| _handleLiquidityRewards(amount) | internal | Sends iREET to the FeeCollector as RWA_INDEX_TOKEN_LIQUIDITY_REWARDS. |
| _handleTreasuryFee(amount) | internal | Transfers the minting-fee share to Treasury. |
Split struct
struct LiquidationVaultTokenSplit {
uint256 mintPercentage; // Treasury
uint256 burnPercentage; // Burn
uint256 swapPercentage; // Swap
uint256 liquidityPercentage; // Gauge
} // must sum to 10000 (100%)
Liquidation Flow¶
- Pre-checks: validate adapters, debt,
data, and pool liquidity. - Stability Pool → LendingPool: call
finalizeLiquidation(debt is cleared; collateral moves to Stability Pool). - Collateral → RWA Vault: deposit collateral; receive iREET.
- iREET split: Treasury / Burn / Swap / Liquidity per
LiquidationVaultTokenSplit. - Swap leg: iREET → pmUSD via configured pool/route.
- Restore rToken: deposit swapped pmUSD back into the LendingPool to regain rToken used by the Stability Pool.
- Shortfall branch: if the Stability Pool's pmUSD balance (swap proceeds plus any Treasury top-up made beforehand) is below the debt, the gap is covered by the pool's own
rTokenvialendingPool.withdraw(), which requires idle pmUSD in the LendingPool. The pool is then under-backed until the deficit is repaired. See Covering a shortfall for the available paths and Backing, Bad Debt and the Treasury Backstop. - Emit
BorrowerLiquidated.
Liquidation Process Diagram (detailed)¶

Notes¶
- All percentages use basis points (
10000 = 100%). - Slippage risk is expected; managers size the swap leg to available pool depth before each liquidation (see Operating a Liquidation).
- No external liquidation incentives; liquidations are manager-driven.