-
Notifications
You must be signed in to change notification settings - Fork 4
Wire up rewards claim button #1756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
6818297 to
3202822
Compare
3202822 to
b13c93a
Compare
b13c93a to
8b4a5a3
Compare
Implement Claim Button for Rewards in Portfolio
This PR wires up the Claim button on the Rewards tab in the portfolio, enabling users to claim their rewards from the rewards contract.
Hyperdrive---DeFi-Yield-your-way.12.webm
Claiming Rewards
The claim process follows these steps:
claimableAmount(the total amount the user can claim)merkleProof(proof required to validate the claim)claimfunction on the rewards contract using these exact values.Important Notes:
claimableAmountis embedded in themerkleProof, meaning it must match exactly when making the claim—partial claims are not allowed.Displaying Rewards
claimableAmountalways increases over time.claimableAmountwill be 15 MORPHO, but since they already claimed 10, they will only receive 5 MORPHO when they claim again.claimwith theclaimableAmountset to 15.This ensures users always see their new rewards accumulated since their last claim.