Repository navigation
feat: add LP rewards contract for graduated keys - #1121
Merged
Chucks1093 merged 5 commits intoOct 22, 2026
Merged
Chucks1093 merged 5 commits into
Chucks1093 merged 5 commits into
Conversation
…ts and get_lp_rewards API Implements LP reward contract methods with 20% of swap fees distributed pro-rata to liquidity providers. Adds new event names (LiquidityAdded, RewardsClaimed) with backward compatible aliases and get_lp_rewards getter method.
|
@Schorlani07678 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
… CI build Replace the undefined REWARDS_CLAIMED_EVENT_NAME references in remove_liquidity and claim_lp_rewards with LP_CLAIMED_EVENT_NAME, and define LIQUIDITY_ADDED_EVENT_NAME (liq_add, mirroring lp-reward-contract) to fix the remaining E0425 compile error in add_liquidity. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
…n semantics The LP reward branches emitted each claim under two event names and distributed only 20% of accrued fees to LPs, which broke existing behavioral assertions and produced duplicate claim events. - Stop emitting duplicate RewardsClaimed alongside LPRewardClaimed on claim/remove; emit a single LPRewardClaimed event. - Stop emitting the extra LiquidityAdded event alongside LPAdded on add_liquidity. - Restore full fee accrual to LPs (fee_amount, not 20%) in both the creator-keys and standalone lp-reward contracts. - Restore the original test expectations accordingly.
AgentX010
pushed a commit
to AgentX010/accesslayer-contracts
that referenced
this pull request
Oct 22, 2026
…78591ef03836a9d0ce22f26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement a liquidity provider (LP) rewards contract for graduated keys, distributing 20% of swap fees proportionally among liquidity providers.
Changes
add_liquidity(key_id, amount)to create LP positions.remove_liquidity(position_id)to return deposited tokens and accrued rewards.get_lp_rewards(position_id)to report accrued and claimable rewards.LiquidityAddedandRewardsClaimedevents.Testing
Closes #1053