import { MarketThree } from "@exponent-labs/exponent-sdk";
// Calculate claimable fees for a position
const feeData = MarketThree.calculateClaimableFees({
lpBalance: position.lpBalance,
feeInsideLastSy: position.feeGrowthInsideLastSy,
feeInsideLastPt: position.feeGrowthInsideLastPt,
currentInsideSy: currentFeeGrowthSy,
currentInsidePt: currentFeeGrowthPt,
tokensOwedSy: position.tokensOwedSy,
tokensOwedPt: position.tokensOwedPt,
});
console.log("Claimable SY fees:", feeData.claimableSy);
console.log("Claimable PT fees:", feeData.claimablePt);
console.log("Total SY fees:", feeData.totalSy);
console.log("Total PT fees:", feeData.totalPt);