Skip to content

Commit

Permalink
fix: account for redemption rights when updating for unclaimed pTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jparklev committed Nov 9, 2024
1 parent b2cd629 commit 8decaff
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 93 deletions.
6 changes: 6 additions & 0 deletions js-scripts/generateRedemptionRights/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ async function calculateRedemptionRights(
userAddress as Address,
(pTokenBalances.get(userAddress as Address) || 0n) + unclaimedPtokens
);

redemptionRights.set(
userAddress as Address,
(redemptionRights.get(userAddress as Address) || 0n) +
(unclaimedPtokens * rewardsMultiplierBigInt) / BigInt(1e18)
);
}
}

Expand Down
Loading

0 comments on commit 8decaff

Please sign in to comment.