Safety Rails
📝 Per-Proposal
📅 Daily
📆 Monthly
🔒 Reserve
🔗 Related Pages
TreasuryHow Governance WorksProposals🗳️OverviewLast updated
Last updated
uint256 public constant MAX_PROPOSAL_PERCENTAGE = 1000; // 10%
uint256 public constant MAX_DAILY_PERCENTAGE = 500; // 5%
uint256 public constant MAX_MONTHLY_PERCENTAGE = 2000; // 20%
uint256 public constant RESERVE_FLOOR_PERCENTAGE = 1500; // 15%Attacker gains 51% voting power
→ Passes malicious proposal
→ Drains 100% of treasury
→ DAO loses everythingAttacker gains 51% voting power
→ Passes malicious proposal
→ Gets maximum 10%
→ Daily limit: only 5%
→ Community detects and responds
→ Maximum loss: limitedMulti-sig keys compromised
→ Attackers approve withdrawals
→ Rapid multi-transaction drainage
→ Treasury emptied in hoursMulti-sig keys compromised
→ Attackers try withdrawals
→ 5% daily limit hit
→ Reserve floor blocks further
→ Community has days to respondConvincing fake "emergency"
→ Community approves large withdrawal
→ Funds sent to attacker
→ Irreversible lossConvincing fake "emergency"
→ Community approves withdrawal
→ 10% limit applies
→ Timelock allows verification
→ Damage containedStep 1: Per-proposal check
$1.5M > $1M (10% of $10M)
→ REJECTED: Exceeds per-proposal limit
Proposal must be $1M or less.Step 1: Per-proposal check
$800K < $1M ✓
Step 2: Daily check
$800K > $500K (5% of $10M)
→ REJECTED: Exceeds daily limit
Can only withdraw $500K today.Step 1: Per-proposal check
$400K < $1M ✓
Step 2: Daily check
Daily total: $0 + $400K = $400K
$400K < $500K ✓
Step 3: Monthly check
Monthly total: $0 + $400K = $400K
$400K < $2M ✓
Step 4: Reserve floor check
Post-withdrawal: $10M - $400K = $9.6M
Reserve minimum: $1.5M
$9.6M > $1.5M ✓
→ APPROVEDProposal A: $300K → Approved (daily: $300K)
Proposal B: $250K → Rejected (would exceed $500K daily)
Proposal B revised: $200K → Approved (daily: $500K)
Proposal C: Any amount → Rejected (daily limit hit)Day 29: $1.8M withdrawn this month
Day 30: Max $200K more (hit $2M monthly)
Day 31: New month, limits resetTreasury: $2M
Reserve floor: $300K (15%)
Available: $1.7M for withdrawal
Monthly limit: $400K
Effective limit: min($400K, $1.7M) = $400K
But floor protected: cannot go below $300KTotal need: $3M (30% of $10M treasury)
Month 1: $1M proposal (10% limit)
Month 2: $1M proposal (10% limit)
Month 3: $1M proposal (10% limit)
Total time: 3 months
Total extracted: $3M
Treasury protected throughout// Get current limits
const available = await treasury.getAvailableToWithdraw();
const dailyRemaining = await treasury.getDailyRemaining();
const monthlyRemaining = await treasury.getMonthlyRemaining();
const reserveStatus = await treasury.getReserveStatus();