feat: Add multi-class share support (Class A/B) with per-class BPS allocations#490
Open
morelucks wants to merge 1 commit into
Open
feat: Add multi-class share support (Class A/B) with per-class BPS allocations#490morelucks wants to merge 1 commit into
morelucks wants to merge 1 commit into
Conversation
…locations (RevoraOrg#446) - Added ShareClass enum and ClassConfig struct. - Extended register_offering to accept Option<Vec<(ShareClass, ClassConfig)>>. - Added validation to ensure class-specific BPS allocations sum to 10,000. - Implemented class-aware holder share setting (set_holder_share_class) and lookup (get_holder_share_class). - Integrated multi-class revenue share splitting into compute_claimable_preview, claim, and simulate_distribution. - Kept single-class offerings fully backward-compatible.
|
@morelucks 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! 🚀 |
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.
Closes #446.
Summary
This PR adds support for multi-class revenue share offerings (Class A/B) with per-class basis point allocations, allowing distributions to be split correctly across multiple share classes.
Changes
ShareClassenum andClassConfigstruct to represent different classes (A/B/Custom) and their configs (BPS and voting rights).register_offeringsignature and internal logic to optionally acceptclasses: Option<Vec<(ShareClass, ClassConfig)>>.set_holder_share_class) and lookup (get_holder_share_class).compute_claimable_preview,claim, andsimulate_distribution.