Skip to content

feat: add percentage contribution groups#154

Open
TUPM96 wants to merge 1 commit into
sorosave-protocol:mainfrom
TUPM96:codex/contribution-flexibility-23
Open

feat: add percentage contribution groups#154
TUPM96 wants to merge 1 commit into
sorosave-protocol:mainfrom
TUPM96:codex/contribution-flexibility-23

Conversation

@TUPM96
Copy link
Copy Markdown

@TUPM96 TUPM96 commented May 25, 2026

/claim #23

Summary

  • add ContributionType::{Fixed, Percentage} to group state
  • keep existing create_group behavior as fixed-amount groups
  • add create_percentage_group for percentage-of-base contributions
  • let members declare base amounts with set_member_base_amount
  • calculate per-member required contributions dynamically during contribute
  • validate percentage groups before start so every member has a usable base amount
  • add views for base amount and required contribution
  • add tests for invalid percentage config, missing base amounts, and dynamic pot sizing

Validation

  • cargo fmt --check
  • cargo test --package sorosave
  • cargo clippy --package sorosave --all-targets -- -D warnings
  • git diff --check

Payout details can be provided privately on acceptance.

Copilot AI review requested due to automatic review settings May 25, 2026 10:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants