Skip to main content
Avana logo

Deposit LP

Pledge an exact-range AMM position into the LPVault of its AMM protocol and use it as collateral on its market's CDP Spoke. The liquidity stays in the pool and keeps earning fees for you.

Overview

A pledge moves custody of one AMM position to the LPVault of its AMM protocol on the chain. The liquidity stays in the pool and keeps earning trading fees for the depositor. In one transaction, Collateralization records the position's units as backing, the AaveAdapter mints exactly that many vault-token units to the wallet's PositionProxy, and the proxy supplies them to the market's CDP Spoke and enables them as collateral. A pledge creates no debt; borrowing is a separate call.

A market is one chain, one AMM protocol, one pool and one exact tick range. Each market is one collateral reserve on one CDP Spoke. The AaveAdapter creates one PositionProxy per wallet and market on the first pledge and reuses it afterwards, so every market is its own Aave account with its own health factor. Nothing is cross-collateralized: a wallet that uses two markets has two proxies and two health factors.

Any wallet that owns the position can pledge it, including a Safe or another smart-contract wallet. There is no EOA-only check. An approved operator cannot pledge on the owner's behalf, because the LPVault takes the position only from the calling wallet.

Eligible Positions

Each AMM protocol Avana supports has its own LPVault and position key. Two of today's protocols are shown below. A position is named by the market's integration ID together with a position key.

AMMChainPosition keyNotes
Uniswap v3Ethereumbytes32(tokenId)Positions from the canonical Uniswap v3 position manager in a listed pool, with ticks equal to the market's range.
Aerodrome SlipstreamBasebytes32((uint256(generation) << 248) | tokenId)Unstaked positions only, from the position-manager generation the market pins. Token IDs repeat across Slipstream's position managers, so the key carries the generation in its high byte.

Exact range

The position's lower and upper ticks must equal the market's range exactly. A narrower range holds far less of each token per unit of liquidity, so crediting it at the market's per-unit value would overstate it. For example, a $10,000 position on the range [−10, 10] in a USDC/USDT market whose range is [−887,272, 887,272] has about 2,000 times as many liquidity units per dollar, and would be valued at about $20,006,000. The LPVault compares the ticks exactly and refuses it, and the NFT stays with its owner.

Not accepted

  • Aerodrome Slipstream positions staked in a gauge. The gauge owns a staked NFT, so the staker cannot pledge it; unstake it first.
  • Positions in another pool of the same token pair, or on any range other than the market's exact range.
  • Positions from any other position contract, including forks of Uniswap v3 or Slipstream, and from position-manager generations the market does not pin.
  • Pools whose tokens charge a fee on transfer, rebase, or run transfer hooks. Listing excludes these tokens.
  • Positions with no liquidity.

Approvals

Before the pledge, the wallet approves the market's LPVault for exactly that position: a per-token approve (or a permit) on the position manager for that token ID. The app never asks for an approval of all NFTs. The LPVault is immutable, moves a position only on Collateralization's instruction, and records the calling wallet as depositor, so the position can only ever return to that wallet.

The LPVault pulls the NFT with a plain transfer, without a receiver hook, so wallets without an ERC-721 receiver hook (such as a Safe) work. No vault-token, debt-asset or other ERC-20 approval is needed for a pledge.

The Pledge Call

pledge(uint256 marketId, PositionRef position, uint256 deadline) returns (address proxy, uint256 recordId, uint128 credited)

The position reference holds the market's integration ID and the position key. The deadline is the last valid block timestamp, in seconds on both chains: 600 seconds is 50 Ethereum blocks or 300 Base blocks. There is no amount, proxy or recipient argument. The proxy is resolved from the caller and the market, the credited units are read from the AMM integration after custody, and the depositor of record is the caller, so no argument can inflate backing.

In order, the call:

  • takes the protocol lock and checks the deadline, the market, the integration ID and the home Hub's pause state;
  • on the wallet's first pledge into the market, deploys its PositionProxy at the address the ProxyManager predicts and registers it in the market's vault token;
  • applies the Frozen gate and decides whether only a rescue top-up can pass;
  • has Collateralization ask the LPVault to take custody, check the pool and exact range, and read the position's liquidity as the credited units;
  • pokes the market's LPOracle and runs the RiskModule's pledge checks;
  • writes the record and books its USD charge;
  • mints exactly the credited units to the proxy, supplies them to the CDP Spoke and enables them as collateral;
  • checks that the proxy holds no leftover tokens or allowance and that the market's backing gap is unchanged, then releases the lock.

Any failure reverts the whole transaction: the position stays with the wallet, and no record, mint, supply or proxy deployment persists.

New Account, Top-Up and Rescue Top-Up

All three kinds of pledge use the same entry point. The RiskModule classifies the pledge from the account's Aave borrow count at the time of the call.

KindWhen it appliesRules
New-account pledgeThe wallet has no proxy for the market yet, or its proxy has zero debt on every debt reserve. This includes a first pledge and more collateral for a debt-free account.Refused while the Hub is Frozen, while the sequencer gate is Down or in Grace, and while the Aave configuration has drifted. Needs a Live price (or Drifting caused only by a USD-band breach) and room in the market's Regular budget.
Top-upThe proxy has non-zero debt on at least one debt reserve.Allowed while the Hub is Frozen, during a sequencer outage or grace window, and during Aave configuration drift, because added collateral only lowers risk. Needs a Live or Drifting price. While the account's health factor is below 1.10 it may use the top-up slice.
Rescue top-upA top-up into an account whose health factor is below the rescue target of 1.10, whose charge is at most the USD that restores 1.10, and whose value is at least the smaller of minPledgeUsd and $10.The only pledge admitted under Paused with reason General, from a frozen wallet, while a rescue-only market breaker is tripped, above the pool-share cap, or below minPledgeUsd. All of its units are rescue units, which never support new debt.

The rescue target health factor of 1.10 is the level the app recommends borrowing to. It is not an opening floor: Avana enforces no health factor above Aave's 1.00 when you borrow. Paused with reason MintPathSuspect refuses every pledge, rescue top-ups included, because every pledge mints vault tokens.

Re-Credit Added Liquidity

Anyone can add liquidity to a pledged Uniswap v3 or Slipstream position with the AMM protocol's increaseLiquidity. Added liquidity stays with the position but is not collateral until the depositor of record re-credits it:

recredit(uint256 marketId, PositionRef position, bytes topUp, uint256 deadline) returns (uint128 added)

For NFT positions the topUp argument is empty. Collateralization reads the position's live liquidity and credits the units above the record's credited units. The added units run every check of a top-up of that size (or of a new-account pledge if the account has no debt), including the sequencer gate and the rescue rule. The Adapter then mints and supplies exactly the added units, and the record's charge basis is rebased so that later exits release exactly what was booked. Units admitted through the slice or a rescue exemption are rescue units.

An account that already holds 16 records adds collateral this way instead of with a new position. If any check fails, nothing is minted or booked and the added liquidity stays with the position uncredited.

Pledge Checks

The AaveAdapter applies the call bounds, pause state and address freeze. The RiskModule applies every other check and its error reaches the caller unchanged. Example values below are launch defaults; each market's parameters are set at listing.

CheckRuleError
Market statusThe market is Active in the MarketRegistry, not Offboarding or Closed.MarketNotActive / MarketOffboarding
Price stateA new-account pledge needs Live, or Drifting caused only by a USD-band breach. A top-up needs Live or Drifting. Cached and Expired are refused. Each feed is fresh while its age is at most its own heartbeat plus 1,800 seconds (88,200 seconds for a 24-hour stablecoin feed).PriceNotAccepted
Sequencer gate (Base)A new-account pledge is refused while the Base sequencer is down and for 3,600 seconds after it restarts. Top-ups are not affected. Ethereum's gate is always Up.SequencerDown / SequencerGrace
Minimum valueThe pledge's value at the served LPOracle price, rounded down, is at least minPledgeUsd ($10 per market at launch). A rescue top-up needs at least the smaller of minPledgeUsd and $10.BelowMinPledge
Market capThe regular part of the charge fits the market's Regular budget, bounded by marketUsdCap. The charge is priced at no less than stressFloorUsd ($1.00 per whole vault token), rounded up.CapExceeded
Token and depositor capsThe regular part fits tokenUsdCap for each pool token and depositorUsdCap for the wallet. Both caps are counted once per Hub across every CDP Spoke and market.CapExceeded
Top-up sliceA new-account pledge must fit the Regular budget. A top-up may book part of its charge from topUpSliceUsd (10% of marketUsdCap) only while the account's health factor is below 1.10, and only up to the USD that restores 1.10. Units booked this way are rescue units.SliceNotAvailable
Pool shareAvana's combined credited liquidity in the pool, across all borrowers, Spokes and markets on the chain, stays at or below poolShareMaxBps of the pool's time-weighted liquidity. The chain default is 10,000 bps (no limit); a per-pool cap applies only where the listing sets one. Only a rescue top-up may exceed it.PoolShareExceeded / PoolShareUnavailable
Record limitAn account holds at most 16 open records per market, so liquidating any account walks at most 16 records. An account at 16 records adds collateral with recredit.TooManyRecords
Aave stateThe vault-token reserve is not paused or frozen, the home Hub's entry for the Spoke is active and not halted, the Hub addCap has room for the units, and the per-user reserve limit is not reached. For a new account, no approved debt reserve is paused.AaveReserveUnavailable / HubSpokeUnavailable / HubAddCapReached / UserReservesLimit / DebtReservePaused
Configuration drift (new accounts)The Aave configuration matches what Avana expects, including the standard-Spoke settings, and Hub shares equal assets for the vault token. Drift never stops a top-up or a rescue top-up.ConfigDrift / HubSharesNotEqualAssets
Pause, freeze and breakersPaused with reason MintPathSuspect refuses every pledge. Frozen refuses new-account pledges. Paused with reason General, a frozen wallet, or a tripped rescue-only market breaker admit only a rescue top-up.ApplicationPaused / ApplicationFrozen / NotRescueTopUp / BreakerTripped

The USD charge is booked at the larger of the oracle price and the stress floor, so a pledge made while the pool trades low still consumes cap at no less than $1.00 per whole token. The Hub addCap for the vault token is sized above the market's Regular and slice budgets at that floor, so a pledge inside Avana's budget fits under it. Avana sets no limit on the number of markets per wallet.

Availability by State

With several states at once, the most restrictive applies. Each market is its own account, so a wallet's other markets never gate a pledge.

StateNew accountTop-upRescue top-up
Hub state None, price Live, sequencer UpAllowedAllowedAllowed
Hub FrozenRefusedAllowedAllowed
Hub Paused, reason GeneralRefusedRefusedAllowed
Hub Paused, reason MintPathSuspectRefusedRefusedRefused
Wallet address-frozenRefusedRefusedAllowed
Base sequencer DownRefusedAllowed while the price is Live or DriftingAllowed while the price is Live or Drifting
Base sequencer Grace (3,600 s after restart)RefusedAllowedAllowed
Rescue-only market breaker tripped, or pool share above the pool's listed capRefusedRefusedAllowed
Price drop, seizure surge or route-failure alert with no guardian tripAllowedAllowedAllowed
Drifting from TWAP or feed disagreementRefusedAllowedAllowed
USD-band breach onlyAllowedAllowedAllowed
Cached or ExpiredRefusedRefusedRefused
Market not active, Offboarding or ClosedRefusedRefusedRefused
Aave configuration drift, Hub shares not equal to assetsRefusedAllowedAllowed
Aave vault-token reserve paused or frozenRefusedRefusedRefused
Any approved debt reserve pausedRefusedAllowedAllowed
Hub halts or deactivates the CDP SpokeRefusedRefusedRefused
Account already holds 16 recordsRefusedRefused (use recredit)Refused (use recredit)
Pledge value below minPledgeUsdRefusedRefusedAllowed down to $10
Regular budget fullRefusedRefusedAllowed from the slice, up to the amount that restores HF 1.10

A frozen debt reserve, an exhausted credit line, a short or paused flash source and an unavailable swap route do not block any pledge.

What Is Minted

The credited units are the position's concentrated liquidity L. The AaveAdapter mints exactly that many base units of the market's vault token to the proxy, and the proxy supplies them all to the CDP Spoke and enables the reserve as collateral. Each market has its own vault token; a whole vault token is 10^d base units, where d is the token's decimals (6 in the examples below). The LPOracle values one unit from the AMM integration's composition at oracle prices, never from spot reserves.

  • Uncollected fees, and any principal already owed to the position when it is pledged, are not credited. They stay owed to the position and the depositor collects them at any time.
  • The record stores the depositor, proxy, vault token, credited units, original units, USD charge, pledge time and rescue units. The depositor, proxy and vault token never change while the record is open.
  • The record joins the account's seizure list, ordered by credited units, largest first.
  • A debt-free account's charge stays in the market's Regular budget until it withdraws. There is no idle budget and no call that moves it.

Events

In emission order. Indexers key positions by chain ID, integration ID and position key, and attribute Spoke events only to proxies announced by UserProxyCreated, not to the transaction sender.

EventContractMeaning
ProxyDeployed, UserProxyCreatedProxyManager, AaveAdapterFirst pledge into the market only; always before the proxy's first supply.
ProxyAddedVault tokenFirst pledge of the proxy only: the proxy is registered in the market's vault token.
Transfer (NFT), PositionReceivedPosition manager, LPVaultThe NFT moves from the wallet to the LPVault.
PriceAccepted, PriceStateChanged, FailureRecorded, GraceStartedLPOracleOnly when the oracle poke changes stored state.
CollateralPledgedCollateralizationThe record is written with its units, charge and slice part.
Transfer, Supply, SetUsingAsCollateralVault token, Hub, SpokeUnits are minted to the proxy, supplied to the CDP Spoke and enabled as collateral.
CollateralSuppliedAaveAdapterThe proxy's supply is confirmed.
CollateralAddedAaveAdapterThe pledge is complete.
RecordRecredited, CollateralRecreditedCollateralization, AaveAdapterA re-credit of added liquidity is complete.

Failures

Every failure reverts the whole transaction and the position stays with the wallet. Errors from the position manager, pool, Spoke and Hub pass through unchanged.

ErrorCause
LockHeldAnother Avana call is already running in the same transaction.
DeadlineExpiredThe block timestamp is past the deadline.
UnknownMarket / IntegrationMismatch / UnknownSpokeThe market has no vault token, the integration is not the market's, or the CDP Spoke is not approved.
ApplicationPausedThe home Hub is Paused with reason MintPathSuspect.
ApplicationFrozenThe home Hub is Frozen and the pledge is a new-account pledge.
AddressIsFrozenA frozen wallet without a proxy tries to open one.
TooManyRecordsThe account already holds 16 open records in the market.
NotPositionOwnerThe caller does not own the position, including a Slipstream NFT staked in a gauge.
RangeMismatch / ShapeMismatchThe position's pool or tick range is not exactly the market's.
PoolLocked / AlreadyPledgedThe pool is inside its own callback, or the position already has an open record.
ZeroLiquidity / LiquidityAboveBoundThe position has no liquidity, or more than the largest creditable amount.
MarketNotActive / MarketOffboardingThe market is not active.
PriceNotAcceptedThe price state does not allow this kind of pledge.
SequencerDown / SequencerGraceA new-account pledge on Base during a sequencer outage or the grace window after it.
BelowMinPledgeThe pledge is worth less than minPledgeUsd (or less than $10 for a rescue top-up).
CapExceeded / PoolShareExceeded / PoolShareUnavailableA cap would be exceeded, or the pool's observation history does not cover the TWAP window.
SliceNotAvailableThe top-up needs the slice but is a new-account pledge, the account's HF is at least 1.10, the slice part exceeds the restore amount, or the slice is used up.
NotRescueTopUp / BreakerTrippedThe pledge needs a rescue exemption and does not qualify as a rescue top-up.
ConfigDrift / HubSharesNotEqualAssetsA new-account pledge while the Aave configuration has drifted.
AaveReserveUnavailable / HubAddCapReached / UserReservesLimitAave's reserve, Hub or account limits refuse the supply.
CollateralNotEnabled / SupplyIncomplete / BackingMismatchAn Adapter post-check fails; the whole transaction reverts.

Worked Example

Example values; each market's parameters are set at listing. Market 3 is a USDC/USDT Uniswap v3 market on Ethereum, on the Uniswap v3 Stable CDP Spoke of the Avana Ethereum Hub, with fee tier 0.01% (tick spacing 1) and range [−887,272, 887,272]. One whole vault token (10^6 units) is worth $2.00. The collateral factor is 8,000 bps (80.00%), minPledgeUsd is $10 and marketUsdCap is $5,000,000 with $1,000,000 booked. The pool has an illustrative per-pool cap of 1,000 bps. Market supply is 400,000,000,000 units and the pool's in-range liquidity is 20,000,000,000,000. The Hub state is None; Ethereum has no sequencer gate.

Carol has no proxy in market 3. She holds a Uniswap v3 position NFT with L = 10,000,000,000 (about 10,000 USDC and 10,000 USDT).

  • Her app reads the market state: the market is Live (the USDC/USD feed last published 72,000 seconds ago, fresh until 88,200), Regular headroom is $4,000,000, the minimum pledge is $10, and predictProxy returns her proxy address.
  • She approves the Uniswap v3 LPVault for her NFT on the NonfungiblePositionManager, then calls pledge on market 3 with her position and a deadline of now + 600.
  • The ProxyManager deploys her proxy P and the vault token registers it. The LPVault checks the pool, the fee tier and the exact ticks, takes the NFT and reads 10,000,000,000 units.
  • The RiskModule checks: value ⌊10,000,000,000 × 200,000,000 / 10^6⌋ = $20,000 ≥ $10; the $20,000 charge fits the $4,000,000 room; pool share (400,000,000,000 + 10,000,000,000) × 10^4 = 4.1 × 10^15 ≤ 1,000 × 2 × 10^13, so Avana holds 2.05% of the pool; record 1 of 16.
  • Collateralization books $20,000 in Regular and in the USDC, USDT and depositor counters. The Adapter mints 10,000,000,000 units to P, which supplies them and enables them as collateral.
  • Events: ProxyDeployed, UserProxyCreated, ProxyAdded, PositionReceived, CollateralPledged, CollateralSupplied, CollateralAdded.
  • The account now shows collateral $20,000 and CF-weighted collateral $16,000. The app recommends borrowing up to $14,545.45 of debt value (HF 1.10) and shows the protocol maximum of $16,000 (HF 1.00).

Failing variants

  • An NFT with L = 4,000,000 is worth $8 and reverts with BelowMinPledge(800,000,000, 1,000,000,000).
  • A 17th record in the same market reverts with TooManyRecords.
  • An NFT that Carol does not own reverts with NotPositionOwner.
  • An NFT on the range [−10, 10] reverts with RangeMismatch.
  • On a Base market, the same first pledge 1,800 seconds after a sequencer restart reverts with SequencerGrace.

In each failing case the NFT stays with Carol.

Top-up from the slice and rescue top-up

In market 3, an account owes 15,000 GHO against $19,500 of collateral, so its health factor is 15,600 / 15,000 = 1.04. The market's Regular budget is full and the Hub is Frozen. A second NFT worth $1,000 is a top-up, so the Frozen gate passes. The CF-weighted value missing to reach 1.10 is (1.10 − 1.04) × 15,000 = $900, which ⌈900 / 0.80⌉ = $1,125 of collateral restores. The whole $1,000 books from the slice, all of its units are rescue units, and the health factor becomes $20,500 × 80.00% / 15,000 = 1.0933. A $1,500 top-up in the same state reverts with SliceNotAvailable, because its slice part exceeds $1,125.

The guardian then pauses the Hub with reason General. At HF 1.0933, ⌈100 / 0.80⌉ = $125 restores 1.10. A $100 pledge is a rescue top-up and lifts the health factor to 1.0987. A $200 pledge in the same state, and a new-account pledge by another wallet, revert with NotRescueTopUp. Under reason MintPathSuspect every pledge reverts with ApplicationPaused.

The next step is to borrow against the new collateral. Continue to Borrow Assets.