Repository navigation
feat: add referral fee routing, per-wallet cap, airdrop improvements,… - #594
Merged
Merged
Conversation
… and discount tiers accesslayerorg#514: Add referral fee routing on buy so referrers earn a share of the protocol fee - Add referrer: Option parameter to buy_key (via buy_key_with_referrer internal fn) - Split protocol fee: 80% treasury, 20% referrer (configurable bps) - Self-referral reverts with InvalidReferrer - Emit ReferralFeeEarned { creator_id, buyer, referrer, amount, ledger } - Add get_referral_fee_bps() and set_referral_fee_bps() admin function accesslayerorg#515: Add per-wallet key holding cap - Enforce max_keys_per_wallet on buy and transfer - Add get_wallet_cap(creator_id) -> Option view function - Cap is immutable after registration accesslayerorg#523: Add creator key airdrop (pre-existing, enhanced with per-wallet cap checks) - Recipients at their wallet cap are skipped, not reverted - Creator fee waived; protocol fee applies to total - KeysAirdropped event with summary fields Add discount tiers and creator volume - Add DiscountTier { threshold, protocol_bps } struct - Add update_discount_tiers(admin, tiers) admin function (max 5 tiers) - Add get_discount_tiers() view function - Add get_creator_volume(creator_id) view function
|
@gelluisaac 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! 🚀 |
7 tasks
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.
… and discount tiers
closes #514 : Add referral fee routing on buy so referrers earn a share of the protocol fee
closes #515 : Add per-wallet key holding cap
closes #523 : Add creator key airdrop (pre-existing, enhanced with per-wallet cap checks)
closes #522 Add discount tiers and creator volume