Fee & Reward

Claim trading fees and pool rewards from liquidity positions.

Overview

Positions earn two types of rewards:

  • Trading Fees: Earned from swaps in your price range

  • Pool Rewards: Additional incentive tokens from the protocol


Check Pending Rewards

Trading Fees Only

// Using Rewarder module for fee calculation
const position = await sdk.Position.getPositionById(positionId, false)
const pool = await sdk.Pool.getPool(position.pool)

const fees = await sdk.Rewarder.fetchPosFeeAmount([{
  poolAddress: pool.poolAddress,
  positionId: position.pos_object_id,
  coinTypeA: pool.coinTypeA,
  coinTypeB: pool.coinTypeB
}])

if (fees.length > 0) {
  console.log({
    tokenA: fees[0].feeOwedA.toString(),
    tokenB: fees[0].feeOwedB.toString()
  })
}

All Rewards (Fees + Pool Rewards)

Batch Fetch Position Fees

Pool Rewards Info

Check pool reward emissions:


Collect Trading Fees


Collect Pool Rewards

Collect additional reward tokens (e.g., FERRA tokens):


Batch Collect

Collect from multiple positions efficiently:


Complete Example


Partner Referral Fees

Partners who integrate Ferra swaps can earn referral fees. Use these methods to check and claim partner fees.

Check Partner Fee Balance

Claim Partner Fees


APR Calculation

Estimate APR for pools and individual positions.

Pool APR

Position APR (Delta Method)

Estimate APR for a specific position based on its price range and pool data:

Result Type


Important Notes

  • Trading fees accumulate from swaps in your price range

  • Pool rewards are additional incentives (e.g., FERRA tokens)

  • Use collect_fee: true to collect both in one transaction

  • Rewards are sent directly to sender address

  • Some operations auto-collect rewards (add/remove liquidity)

  • Batch collection saves gas for multiple positions

  • Partner fees require a partner capability NFT to claim

  • APR calculations use 7-day data for accuracy

Last updated