Skip to content

Commit

Permalink
Fix position snapshot underlying balance
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jan 16, 2025
1 parent eb27d3e commit 58a736a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clm/utils/position-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export function updateClmPositionSnapshotsIfEnabled(
snapshot.rewardPoolBalances = position.rewardPoolBalances
snapshot.totalBalance = position.totalBalance
snapshot.underlyingBalance0 = clmData.totalUnderlyingAmount0
.times(position.managerBalance)
.times(position.totalBalance)
.div(clmData.managerTotalSupply)
snapshot.underlyingBalance1 = clmData.totalUnderlyingAmount1
.times(position.managerBalance)
.times(position.totalBalance)
.div(clmData.managerTotalSupply)
snapshot.token0ToNativePrice = clmData.token0ToNativePrice
snapshot.token1ToNativePrice = clmData.token1ToNativePrice
Expand Down

0 comments on commit 58a736a

Please sign in to comment.