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
2 changes: 1 addition & 1 deletion src/app/api/fee-compare/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ export async function GET(req: Request) {
// When the API doesn't return per-trade funding (meta absent or zero), fall back to
// the same per-second rate estimation used in the crossSim projection.
let fundingEstimated = false;
if (fundingFeesUsdc < 0.01 && Object.keys(gainsData.fundingPerSecPerCoin).length > 0) {
if (fundingFeesUsdc >= 0 && fundingFeesUsdc < 0.01 && Object.keys(gainsData.fundingPerSecPerCoin).length > 0) {
const gainsPositions = reconstructGainsPositions(usdcTrades, cutoffMs);
const est = estimateGainsFundingFees(gainsPositions, gainsData.fundingPerSecPerCoin);
if (est > 0.01) {
Expand Down
Loading