-
Notifications
You must be signed in to change notification settings - Fork 0
Fee Collection Logic #16
Copy link
Copy link
Open
Labels
@geevapp/app/wave2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2
Description
User Story
As the Platform,
I want to collect 1% of giveaways as revenue.
Description
Calculate and deduct a fee from the pot.
Files to Create/Edit
contracts/geev-core/src/
└── giveaway.rs
Functional Requirements
- Math:
fee = amount * 1%. - Accounting:
net_prize = amount - fee.
Suggested Implementation
// IN FUNCTION: distribute_prize
// 1. Load 'fee_bps' from storage.
// 2. Calculate 'fee_amount'.
// 3. Transfer 'net_prize' to Winner.
// 4. Add 'fee_amount' to a 'CollectedFees' storage counter (do not transfer yet).Acceptance Criteria
- Winner gets Total - Fee.
- Fee counter increases.
Submission Guidelines
- Branch:
feat/fees
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@geevapp/app/wave2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2Moving to the app repo, as the contracts repo was not accepted for Drips Wave 2