Skip to main content
The LP Agent is a smart contract that sits on top of n0ir’s LP Vaults. Users deposit USDC once and the keeper automatically reallocates to whichever of the three underlying pools is offering the best effective APR.

How It Works

1. Deposit

Deposit USDC into the LP Agent. You receive internal shares representing your pro-rata ownership of the agent’s position. Shares are non-transferable and tracked via an internal mapping — the LP Agent holds no ERC-20 token. The USDC is immediately forwarded to whichever LP Vault is currently active.

2. The Active Vault

At any point in time, one of the three underlying LP Vaults is designated active. All deposited USDC lives in that vault’s concentrated liquidity position on Aerodrome Slipstream, earning both trading fees and AERO gauge emissions. The active vault is set by the keeper based on effective APR, which accounts for the width of the tick range relative to gauge rewards.

3. Automatic Reallocation

The keeper checks APR across all three underlying pools every minute. Reallocation is triggered when a different vault leads by more than 5% APR for 5 consecutive checks (~5 minutes of stable signal), preventing unnecessary churn from short-lived spikes. The keeper then calls reallocate(newVaultIndex):
  1. Redeems all shares from the current LP Vault (triggering full exit: unstake → remove liquidity → swap to USDC)
  2. Deposits the recovered USDC into the new LP Vault
  3. Updates the active vault index
During reallocation, deposits and withdrawals are paused via a reallocating flag. The flag is always cleared after the operation completes.

4. Withdrawal

Redeem shares at any time (outside of an active reallocation):
  • redeem(shares, receiver) — burn a specific number of shares, receive proportional USDC
  • withdraw(assets, receiver) — specify the USDC amount to receive, shares are calculated automatically
The vault withdraws from the active LP Vault if idle USDC is insufficient to cover the redemption.

Fees

The LP Agent itself charges no additional fees. The underlying LP Vaults apply a 10% performance fee on AERO reward compounding, which accrues to the n0ir treasury. No fee on deposits, withdrawals, or trading fee compounding.