Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ not automated by anything in this repo's scripts today.
that race requires a structural change (an atomic deploy+init
constructor) rather than an in-contract check.
- **Fee mechanics.** `fee_bps` is basis points (1/100 of a percent) out of
10000, validated `<= 10000` at `initialize`. It's deducted from the top
of every payout (`release`, `release_issue`, `withdraw`) before the
remainder is split among recipients — the treasury is paid in the same
10000, validated `<= MAX_FEE_BPS` (1000 = 10%) at `initialize`. It's
deducted from the top of every payout (`release`, `release_issue`,
`withdraw`) before the remainder is split among recipients — the treasury is paid in the same
transaction as the recipients, so there's no separate "sweep fees"
step that could be skipped.
- **Replay / double-spend protection.** Every escrow/milestone-issue
Expand Down
2 changes: 1 addition & 1 deletion contracts/escrow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl EscrowContract {
if env.storage().instance().has(&DataKey::Admin) {
return Err(Error::AlreadyInitialized);
}
if fee_bps as i128 > BPS_DENOMINATOR {
if fee_bps > MAX_FEE_BPS {
return Err(Error::InvalidFee);
}
if treasury == env.current_contract_address() {
Expand Down
2 changes: 1 addition & 1 deletion contracts/maintenance-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl MaintenancePoolContract {
if env.storage().instance().has(&DataKey::Admin) {
return Err(Error::AlreadyInitialized);
}
if fee_bps as i128 > BPS_DENOMINATOR {
if fee_bps > MAX_FEE_BPS {
return Err(Error::InvalidFee);
}
if treasury == env.current_contract_address() {
Expand Down
2 changes: 1 addition & 1 deletion contracts/milestones/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl MilestonesContract {
if env.storage().instance().has(&DataKey::Admin) {
return Err(Error::AlreadyInitialized);
}
if fee_bps as i128 > BPS_DENOMINATOR {
if fee_bps > MAX_FEE_BPS {
return Err(Error::InvalidFee);
}
if treasury == env.current_contract_address() {
Expand Down
Loading