Skip to Content
PluginsAerodrome

Aerodrome

Aerodrome Finance is the leading decentralized exchange on Base, built as a fork of Velodrome V2. It uses a ve(3,3) model with concentrated and volatile liquidity pools, voting escrow tokenomics, and gauge-based emissions. This plugin provides actions for querying pool state, managing liquidity, checking voting power, managing veAERO locks, and executing swaps.

Supported chains: Base (8453). Read-only actions work without credentials. Write actions require a connected wallet.

Actions

ActionTypeCredentialsDescription
Get Pool ReservesReadNoGet current reserves for a token pair pool
Get Pool AddressReadNoResolve pool address from a token pair
Get Expected OutputReadNoGet expected output amount for a swap from a specific pool
Get Total Pool CountReadNoGet total number of pools in the factory
Get Total Voting WeightReadNoGet total voting weight across all gauges
Check Gauge StatusReadNoCheck whether a gauge is active
Get Gauge for PoolReadNoLook up gauge address for a pool
Get veNFT Voting PowerReadNoGet voting power of a veAERO NFT
Get Lock DetailsReadNoGet locked amount and unlock timestamp for a veNFT
Get AERO BalanceReadNoCheck AERO token balance of an address
Swap Exact TokensWriteWalletSwap exact input tokens for output tokens via routes
Add LiquidityWriteWalletAdd liquidity to a pool and receive LP tokens
Remove LiquidityWriteWalletRemove liquidity from a pool by burning LP tokens
Vote on GaugesWriteWalletCast votes for pool gauges using veAERO
Reset VotesWriteWalletReset all gauge votes for a veNFT
Create veAERO LockWriteWalletLock AERO tokens to create a veNFT
Increase Lock AmountWriteWalletAdd more AERO to an existing veNFT lock
Increase Lock DurationWriteWalletExtend lock duration of a veNFT
Withdraw Expired LockWriteWalletWithdraw AERO from an expired veNFT lock
Claim Gauge RewardsWriteWalletClaim accumulated rewards from gauges
Approve AEROWriteWalletApprove an address to spend AERO tokens

Events

EventContractDescription
Pool SwapPoolFires when a swap occurs in a pool
Pool Reserves SyncedPoolFires when reserves update after any pool operation
veAERO DepositVotingEscrowFires when AERO tokens are locked or added to a veNFT
veAERO WithdrawalVotingEscrowFires when AERO is withdrawn from an expired lock
Gauge Vote CastVoterFires when a veNFT holder casts gauge votes
Gauge CreatedVoterFires when a new gauge is created for a pool
Reward DistributedVoterFires when AERO emissions are distributed to a gauge

Get Pool Reserves

Get the current reserves for an Aerodrome pool by token pair. Reserve values are in raw wei and reflect each token’s native decimals.

Inputs:

InputTypeDescription
tokenAaddressToken A Address
tokenBaddressToken B Address
stableboolStable Pool (true/false)
factoryaddressPool Factory Address (defaults to Aerodrome factory)

Outputs:

OutputTypeDescription
reserveAuint256Reserve A (raw wei)
reserveBuint256Reserve B (raw wei)

When to use: Monitor pool liquidity depth, calculate token prices from reserves, detect significant reserve changes, build liquidity monitoring dashboards.


Get Pool Address

Resolve the pool address for a token pair and pool type (stable/volatile). Use this to look up pool addresses before calling pool-specific actions.

Inputs:

InputTypeDescription
tokenAaddressToken A Address
tokenBaddressToken B Address
stableboolStable Pool (true/false)
factoryaddressPool Factory Address (defaults to Aerodrome factory)

Outputs:

OutputTypeDescription
pooladdressPool Address

When to use: Resolve pool addresses before calling Get Expected Output or other pool-specific actions, discover pools for token pairs.


Get Expected Output

Get the expected output amount for a swap from a specific Aerodrome pool. Requires the pool address (use Get Pool Address to resolve it).

Inputs:

InputTypeDescription
amountInuint256Input Amount (wei)
tokenInaddressInput Token Address

Outputs:

OutputTypeDescription
amountOutuint256Expected Output (wei)

When to use: Get swap quotes before executing, compare prices across pools, build price monitoring workflows.


Get Total Pool Count

Get the total number of pools created by the Aerodrome factory.

Inputs: None

Outputs:

OutputTypeDescription
countuint256Total Pool Count

When to use: Monitor protocol growth, track new pool deployments, build protocol analytics dashboards.


Get Total Voting Weight

Get the total voting weight across all gauges in the Aerodrome Voter contract.

Inputs: None

Outputs:

OutputTypeDescription
totalWeightuint256Total Weight (18 decimals)

When to use: Monitor overall voting activity, calculate gauge weight percentages, track voting participation over time.


Check Gauge Status

Check whether a gauge is active and receiving emissions. Inactive gauges do not distribute rewards.

Inputs:

InputTypeDescription
_gaugeaddressGauge Address

Outputs:

OutputTypeDescription
aliveboolIs Alive

When to use: Verify a gauge is active before voting, monitor gauge health, detect gauge deactivation for alerting.


Get Gauge for Pool

Look up the gauge address for a pool. Use this before voting or checking gauge status.

Inputs:

InputTypeDescription
_pooladdressPool Address

Outputs:

OutputTypeDescription
gaugeaddressGauge Address

When to use: Resolve gauge addresses before voting or claiming rewards, build workflows that chain pool lookup to gauge operations.


Get veNFT Voting Power

Get the current voting power of a veAERO NFT position. Voting power decays linearly over the lock duration.

Inputs:

InputTypeDescription
_tokenIduint256veNFT Token ID

Outputs:

OutputTypeDescription
balanceuint256Voting Power (18 decimals)

When to use: Monitor voting power decay, plan lock extensions, track veNFT positions for governance participation.


Get Lock Details

Get the locked AERO amount and unlock timestamp for a veNFT position.

Inputs:

InputTypeDescription
_tokenIduint256veNFT Token ID

Outputs:

OutputTypeDescription
amountint128Locked Amount (raw)
enduint256Unlock Timestamp (unix)

When to use: Check lock expiration dates, monitor locked amounts, determine when a veNFT can be withdrawn, plan lock extensions.


Get AERO Balance

Check the AERO token balance of an address.

Inputs:

InputTypeDescription
accountaddressWallet Address

Outputs:

OutputTypeDescription
balanceuint256AERO Balance (18 decimals)

When to use: Monitor AERO holdings, track reward accumulation, trigger workflows based on balance thresholds.


Swap Exact Tokens

Swap an exact amount of input tokens for as many output tokens as possible via Aerodrome routes.

Inputs:

InputTypeDescription
amountInuint256Input Amount (wei)
amountOutMinuint256Minimum Output (wei)
routestuple[]Swap Routes (JSON array of {from, to, stable, factory})
toaddressRecipient Address
deadlineuint256Deadline (unix timestamp)

Outputs: success, transactionHash, transactionLink, error

When to use: Execute token swaps, automate trading strategies, rebalance portfolios.


Add Liquidity

Add liquidity to an Aerodrome pool and receive LP tokens.

Inputs:

InputTypeDescription
tokenAaddressToken A Address
tokenBaddressToken B Address
stableboolStable Pool (true/false)
amountADesireduint256Desired Amount A (wei)
amountBDesireduint256Desired Amount B (wei)
amountAMinuint256Minimum Amount A (wei)
amountBMinuint256Minimum Amount B (wei)
toaddressRecipient Address
deadlineuint256Deadline (unix timestamp)

Outputs: success, transactionHash, transactionLink, error

When to use: Provide liquidity to earn trading fees, build LP management workflows, automate liquidity provisioning strategies.


Remove Liquidity

Remove liquidity from an Aerodrome pool by burning LP tokens.

Inputs:

InputTypeDescription
tokenAaddressToken A Address
tokenBaddressToken B Address
stableboolStable Pool (true/false)
liquidityuint256LP Token Amount (wei)
amountAMinuint256Minimum Amount A (wei)
amountBMinuint256Minimum Amount B (wei)
toaddressRecipient Address
deadlineuint256Deadline (unix timestamp)

Outputs: success, transactionHash, transactionLink, error

When to use: Exit liquidity positions, rebalance LP allocations, automate withdrawal strategies based on conditions.


Vote on Gauges

Cast votes for pool gauges using veAERO voting power. Votes determine emission distribution to liquidity pools.

Inputs:

InputTypeDescription
_tokenIduint256veNFT Token ID
_poolVoteaddress[]Pool Addresses (comma-separated)
_weightsuint256[]Vote Weights (comma-separated)

Outputs: success, transactionHash, transactionLink, error

When to use: Participate in gauge voting, automate weekly vote rebalancing, optimize emission allocation.


Reset Votes

Reset all gauge votes for a veNFT. Required before changing vote allocations in a new epoch.

Inputs:

InputTypeDescription
_tokenIduint256veNFT Token ID

Outputs: success, transactionHash, transactionLink, error

When to use: Clear previous epoch votes before re-voting, automate weekly vote reset + re-vote workflows.


Create veAERO Lock

Lock AERO tokens to create a veAERO NFT position with voting power. Longer lock durations yield more voting power.

Inputs:

InputTypeDescription
_valueuint256AERO Amount (wei, 18 decimals)
_lockDurationuint256Lock Duration (seconds)

Outputs: success, transactionHash, transactionLink, error

When to use: Acquire voting power, participate in governance, earn trading fee rebates through voting.


Increase Lock Amount

Add more AERO tokens to an existing veNFT lock position.

Inputs:

InputTypeDescription
_tokenIduint256veNFT Token ID
_valueuint256Additional AERO Amount (wei, 18 decimals)

Outputs: success, transactionHash, transactionLink, error

When to use: Boost voting power by adding more AERO to an active lock, compound claimed rewards into an existing position.


Increase Lock Duration

Extend the lock duration of an existing veNFT position.

Inputs:

InputTypeDescription
_tokenIduint256veNFT Token ID
_lockDurationuint256New Lock Duration (seconds)

Outputs: success, transactionHash, transactionLink, error

When to use: Restore decayed voting power by extending the lock, maintain maximum governance participation.


Withdraw Expired Lock

Withdraw AERO tokens from an expired veNFT lock position.

Inputs:

InputTypeDescription
_tokenIduint256veNFT Token ID

Outputs: success, transactionHash, transactionLink, error

When to use: Reclaim AERO after a lock expires, automate post-expiry withdrawal workflows.


Claim Gauge Rewards

Claim accumulated AERO rewards from gauges.

Inputs:

InputTypeDescription
_gaugesaddress[]Gauge Addresses (comma-separated)

Outputs: success, transactionHash, transactionLink, error

When to use: Harvest accumulated rewards, automate periodic reward collection, compound rewards into new positions.


Approve AERO

Approve an address to spend AERO tokens on your behalf. Required before creating locks or interacting with contracts that need AERO allowance.

Inputs:

InputTypeDescription
spenderaddressSpender Address
amountuint256Amount (wei)

Outputs: success, transactionHash, transactionLink, error

When to use: Set up allowances before locking AERO, approve contracts for token transfers.


Example Workflows

Pool Reserve Monitor

Schedule (hourly) -> Aerodrome: Get Pool Reserves -> Code: Format Reserves -> Condition (reserve < threshold) -> Discord: Low Liquidity Alert

Monitor an Aerodrome pool’s reserves hourly. If either reserve drops below a configured threshold, send a Discord alert with the current reserve values.

Swap Quote Tracker

Schedule (every 15 min) -> Aerodrome: Get Pool Address -> Aerodrome: Get Expected Output -> Code: Calculate Price -> Condition (price deviation) -> Webhook: Price Alert

Resolve a pool for a token pair, get swap quotes, and alert via webhook when the price deviates significantly from expected.

veNFT Voting Power Monitor

Schedule (daily) -> Aerodrome: Get veNFT Voting Power -> Code: Format Power -> Condition (power < minimum) -> SendGrid: Lock Renewal Reminder

Monitor veAERO voting power decay and send an email reminder when it drops below a threshold, signaling time to extend the lock.

veNFT Lock Expiry Watchdog

Schedule (daily) -> Aerodrome: Get Lock Details -> Code: Check Expiry -> Condition (expiry within 7 days) -> Aerodrome: Increase Lock Duration

Check veNFT lock expiration daily and auto-extend the lock when it’s within 7 days of expiring.

Weekly Vote Reset and Re-Vote

Schedule (weekly, epoch flip) -> Aerodrome: Reset Votes -> Aerodrome: Vote on Gauges

Automate the weekly voting cycle: reset previous epoch votes and cast new votes for target gauge pools.

Reward Harvesting and Compounding

Schedule (weekly) -> Aerodrome: Claim Gauge Rewards -> Aerodrome: Get AERO Balance -> Condition (balance > minimum) -> Aerodrome: Increase Lock Amount

Claim gauge rewards weekly and compound them into an existing veNFT lock position when the balance exceeds a threshold.

LP Position Manager

Schedule (daily) -> Aerodrome: Get Pool Reserves -> Code: Calculate Imbalance -> Condition (imbalance > threshold) -> Aerodrome: Remove Liquidity -> Aerodrome: Add Liquidity

Monitor pool reserves and rebalance an LP position when the pool ratio drifts beyond a configured threshold.

AERO Treasury Dashboard

Schedule (daily) -> Aerodrome: Get AERO Balance -> Aerodrome: Get veNFT Voting Power -> Aerodrome: Get Lock Details -> Code: Summarize -> SendGrid: Daily Report

Daily email report combining liquid AERO balance, veNFT voting power, and lock details into a treasury position summary.


Supported Chains

ChainContracts Available
Base (8453)Router, Voter, Pool Factory, VotingEscrow, Pool, AERO Token

All contracts are available on Base only.