Skip to content

Add flexible contribution models#88

Closed
Scottcjn wants to merge 1 commit intosorosave-protocol:mainfrom
Scottcjn:contribution-flexibility
Closed

Add flexible contribution models#88
Scottcjn wants to merge 1 commit intosorosave-protocol:mainfrom
Scottcjn:contribution-flexibility

Conversation

@Scottcjn
Copy link

Summary

  • add a ContributionType enum so groups can use fixed or percentage-based contributions
  • store per-member base amounts for percentage groups and require them before the group starts
  • calculate round contributions dynamically from each member's declared base amount and keep payout totals driven by the actual contributed pot
  • cover the new flow with a percentage-mode unit test while keeping the existing fixed-mode API intact

Validation

  • cargo test -q
  • git diff --check

Closes #23.

@Scottcjn Scottcjn closed this by deleting the head repository Mar 18, 2026
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.

Add contribution amount flexibility (fixed vs percentage)

1 participant