Skip to content

Commit

Permalink
fix price decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jun 30, 2024
1 parent b9c5b80 commit 33f42aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clm/utils/clm-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function fetchCLMData(clm: CLM): CLMData {
log.error("Failed to fetch balanceOfPool for CLM {}", [clm.id.toHexString()])
}

// price is the amount of token1 per token0, expressed with 36 decimals
// price is the amount of token1 per token0, expressed with 36 decimals but adjusting for token0 and token1 decimals
const priceDecimals = BigInt.fromU32(36).plus(token1.decimals).minus(token0.decimals)

// this can revert when the liquidity is 0
Expand Down

0 comments on commit 33f42aa

Please sign in to comment.