LP Fees
A pledged position keeps earning trading fees for its depositor. The depositor collects them at any time; they are never collateral and never seized.
Overview
While the LPVault holds a pledged position, its liquidity stays in the pool and earns trading fees. Uniswap v3 and Aerodrome Slipstream keep fees apart from the position's liquidity, as amounts owed per token. The depositor of record collects them through the AaveAdapter, and the pool pays them straight to the depositor's wallet.
The call goes wallet → AaveAdapter → Collateralization → LPVault → position manager. It never changes the position's liquidity, the vault-token supply, the record's credited units, the account's debt or its health factor. The PositionProxy is not involved: fees never pass through the Aave account.
The Collect Call
collectFees(uint256 marketId, PositionRef position, uint256 deadline) returns (uint256[] fees)- Only the depositor of record can call it. No role is required.
- There is no recipient argument: fees always go to the depositor of record, so neither a caller nor a faulty Adapter can redirect them.
- It returns one amount per pool token, in the market's token order; any amount may be 0.
- For Uniswap v3 and Slipstream the LPVault calls the position manager's collect with the depositor as recipient and the maximum amount of each token. The pool updates the position's fees first, then pays every owed amount; nothing stays in the LPVault.
- An unstaked Slipstream position's fees are already net of the pool's unstaked-fee share, which the pool sends to the gauge. Avana adds and deducts nothing.
The app can simulate the call to show the amounts before the depositor signs.
Always Open
The fee path reads no pause state or reason, circuit breaker, address freeze, price state, sequencer gate, RiskModule, MarketRegistry, ParameterStore, LPOracle, PositionProxy or Aave state. None of them can hold a depositor's fees. Collection is available from the end of the pledge until the position is returned, including while the record has 0 credited units after a full seizure.
During a Base sequencer outage, the depositor can submit collectFees through the OP Stack L1 forced-inclusion path; it executes when included, because the fee path reads no sequencer gate.
| State | Collect fees |
|---|---|
| Hub state None, Frozen, or Paused with reason General or MintPathSuspect | Allowed |
| Any circuit breaker tripped on the market or a debt reserve | Allowed |
| Depositor address-frozen | Allowed |
| Base sequencer Down (forced in through L1) or in Grace | Allowed |
| Every price state, including stale feeds and grace windows | Allowed |
| Market Offboarding, Closed or not active; no active committed operator; configuration drift | Allowed |
| Any Aave reserve paused or frozen, the Spoke halted, the credit line exhausted | Allowed |
| Any health factor, including below 1.00 and during a liquidation in another transaction | Allowed |
| Record at 0 credited units, or reduced by a partial removal or repay with collateral | Allowed |
| Pool token with a transfer fee switched on after listing | Allowed; the depositor receives the amounts less the token's fee |
| Pool broken, a pool token paused, or the depositor blocklisted by a pool token | Refused by the pool or token; fees stay owed and leave with the position |
| An AaveAdapter implementation that reverts on collectFees | Refused until the Timelock replaces it; fees stay owed and nothing is lost |
Fees and Collateral
- Fees are not collateral. The LPOracle values a position's liquidity units only and never counts amounts owed to it, so collecting fees cannot move the health factor.
- Fees are never seized. A liquidation, a reconcile on exit, a partial removal or a repay with collateral removes exactly its own units and pays out only the principal that removal returned. A collection cannot run between a removal and its payout, because both run under the same protocol lock.
- Principal owed at pledge stays the depositor's. If a position is pledged with amounts already owed to it (uncollected fees, or principal removed earlier without a collect), those amounts are not credited, and collectFees pays them to the depositor with later fees.
- Fees owed when a position is returned travel with the NFT; the depositor then collects them directly from the AMM protocol.
Rolled-In Fees
Some AMM protocols compound fees into the position instead of keeping them apart. For a market on such a protocol, collectFees reverts with FeesRolledIn before any state changes. The fees stay in the position: its unit count is unchanged, each unit is worth more, the LPOracle's composition values that, and the depositor receives the fees with the units on withdrawal. Uniswap v3 and Aerodrome Slipstream keep fees separate.
Events
- Pool Burn with zero liquidity (only when the position has liquidity), then pool Collect.
- A token Transfer from the pool to the depositor for each non-zero amount.
- Position manager Collect.
FeesCollected(positionKey, depositor, amounts)
Failures
Every failure reverts the whole transaction, and the fees stay owed to the position.
| Error | Cause |
|---|---|
NotDepositor | The caller is not the depositor of record of the position. |
NotInCustody / UnknownMarket / InvalidVaultToken | The position is not in LPVault custody for an open record of the market. |
IntegrationMismatch | The position reference names another AMM integration than the market's. |
FeesRolledIn | The market's AMM protocol rolls fees into the position, so there is nothing separate to collect. |
DeadlineExpired / LockHeld | Call bounds. |
Pool or token error | The pool is broken or inside its own callback, or a token transfer to the depositor reverts. Fees stay owed to the position. |
Worked Example
- Carol's app simulates collectFees for the position and shows 16.50 USDC and 15.95 USDT to collect.
- Carol submits collectFees(3, (I, key1), now + 600). When it is included, the Adapter takes the lock and checks the deadline; it reads no pause state, breaker, freeze, oracle or sequencer gate.
- Collateralization checks that the record is open, the NFT is in custody and Carol is its depositor of record.
- The LPVault calls the NonfungiblePositionManager's collect with Carol as recipient, and the pool pays 16.50 USDC and 15.95 USDT to her.
- The NFT's liquidity, the record's 10,000,000,000 credited units, the vault-token supply, the cap counters, her debt and her health factor of 1.2249 are unchanged.
- Event FeesCollected(key1, Carol, [16,500,000, 15,950,000]).
The $32.45 collected over 30 days on $20,000 is 32.45 / 20,000 × 365 / 30 ≈ 1.97% a year, and none of it was collateral. The same collection succeeds while the Avana Ethereum Hub is Paused with reason MintPathSuspect, while a breaker of market 3 is tripped and while Carol's address is frozen. A call from any wallet other than Carol reverts with NotDepositor. On a Base market, a collection forced in through L1 succeeds while the sequencer is down, while a borrow forced in the same way reverts with SequencerDown.
How a position comes into custody is described in Deposit LP.
