You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ADR 003/004: Fee discount should use stake multiplier, not hardcoded absolute #12
ADR 004: "Providers staking ≥10× the minimum (10,000 TOKEN)"
These are consistent now (10× × 1,000 = 10,000). But if governance changes the minimum stake (e.g., to 5,000 TOKEN), the 10× multiplier and the 10,000 absolute number diverge.
Recommendation
The StablePaymentChannel.getEffectiveFee() contract should call StakingRegistry.getStakeMultiple(provider) and check multiple >= 10, rather than comparing against a hardcoded 10,000 TOKEN threshold. ADR 003 and 004 should be aligned on this.
ADR 003: Added getEffectiveFee implementation showing it calls StakingRegistry.getStakeMultiple(provider) >= DISCOUNT_MULTIPLE (where DISCOUNT_MULTIPLE = 10) rather than comparing against a hardcoded 10,000 TOKEN threshold. Also clarified the getStakeMultiple comment to note it scales with governance changes to minStake.
ADR 004: Removed the parenthetical (10,000 TOKEN) absolute value and noted that the contract uses the multiplier check with a cross-link to ADR 003. The threshold now auto-scales if governance changes the minimum stake.
Activity
alpergundogdu commentedon Mar 30, 2026
Fixed in commit 5dce950.
ADR 003: Added
getEffectiveFeeimplementation showing it callsStakingRegistry.getStakeMultiple(provider) >= DISCOUNT_MULTIPLE(whereDISCOUNT_MULTIPLE = 10) rather than comparing against a hardcoded 10,000 TOKEN threshold. Also clarified thegetStakeMultiplecomment to note it scales with governance changes tominStake.ADR 004: Removed the parenthetical
(10,000 TOKEN)absolute value and noted that the contract uses the multiplier check with a cross-link to ADR 003. The threshold now auto-scales if governance changes the minimum stake.docs(adr): post-PR-review fixes from gemini/copilot bots (14 items)