Fee Integration

Hydrex positions earn trading fees continuously. This guide covers collecting LP fees, claiming gauge rewards, and understanding how fee streams flow to position holders.


Fee Tier

Hydrex uses a single default fee tier configured via INITIAL_POOL_FEE = 100 (100 = 0.01% per trade, or 1 basis point). This fee is earned by liquidity providers proportional to their share of in-range liquidity at the time of the swap.

Fee flow overview

  1. Swap occurs → fee accrues in the pool contract
  2. Fee is proportionally assigned to in-range LP positions (as token0 + token1)
  3. LP calls collect to withdraw accrued fees to their wallet
  4. LPs staked in gauges also earn HYDX emission rewards on top of trading fees

Collecting LP Trading Fees

Use NonfungiblePositionManager.collectCallParameters to claim accrued fees from a position at any time without removing liquidity.

typescript
import { NonfungiblePositionManager, CurrencyAmount } from '@hydrexfi/hydrex-sdk';

// Collect accrued trading fees from position tokenId 42
const { calldata, value } = NonfungiblePositionManager.collectCallParameters({
  tokenId: '42',
  recipient: '0xYourWallet',
  // Use '0' to collect maximum available; or use on-chain amounts
  expectedCurrencyOwed0: CurrencyAmount.fromRawAmount(USDC, '0'),
  expectedCurrencyOwed1: CurrencyAmount.fromRawAmount(WETH, '0'),
});
You can also collect fees atomically during liquidity removal by passing collectOptions to removeCallParameters.

Claiming Gauge Rewards

Staked LP positions earn HYDX emissions via the gauge system. Use ClaimRewards to discover and claim pending rewards.

typescript
import { ClaimRewards, GaugeRewardReadInput } from '@hydrexfi/hydrex-sdk';

const gauges: GaugeRewardReadInput[] = [
  { gaugeAddress: '0xGauge1', readContract: readContractForGauge1 },
  { gaugeAddress: '0xGauge2', readContract: readContractForGauge2 },
];

// Find gauges with pending rewards
const claimable: string[] = await ClaimRewards.getClaimableGaugeAddresses('0xUser', gauges);

// Build claim calldata for specific gauges
const { calldata } = ClaimRewards.claimRewardsCallParameters({
  gaugeAddresses: claimable,
});

// All reward claim transactions target VOTER_ADDRESSES[chainId]

Token-Specific Claims

For gauges with multiple reward tokens, use the token-specific claim builders.

typescript
import { ClaimRewards } from '@hydrexfi/hydrex-sdk';

// Get token-specific claims ready for submission
const claims = await ClaimRewards.getClaimableRewardTokenClaims('0xUser', gauges);
// claims = [{ gaugeAddress, tokens[] }, ...]

// Claim specific reward tokens from multiple gauges
const { calldata } = ClaimRewards.claimRewardTokensCallParameters({
  claims: [
    { gaugeAddress: '0xGauge1', tokens: ['0xRewardToken1'] },
    { gaugeAddress: '0xGauge2', tokens: ['0xRewardToken2'] },
  ],
});
Hydrex

Hydrex is an Omni-Liquidity MetaDEX built on Base for Base, designed to bring new users onchain.

Paragraph

© 2026 Hydrex. All rights reserved.