Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/app/api/fee-compare/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ const EVM_WALLET_VENUES = new Set(["hyperliquid", "gains", "gmx-v2"]);
const GAINS_CARRY_PRECISION = 1e18;
// Fallback when API doesn't expose per-pair data (~0.04%/day expressed per-second)
const GAINS_BORROW_DEFAULT_PER_SEC = 0.0004 / 86400;
// USDC collateral index on Arbitrum (same as collateralIndex filter in fetchGainsTrades)
const GAINS_USDC_COLLATERAL_IDX = 3;
// USDC is array[2] in vars.collaterals (0-indexed); its collateralIndex field = 3 (1-indexed).
// The collateralIndex===3 filter in fetchGainsTrades refers to the field value, not the array position.
const GAINS_USDC_COLLATERAL_IDX = 2;

let gainsFeeCache: {
coinRoundTrip: Record<string, number>;
Expand Down
Loading