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
[security] Constrain BuybackBurner.rescueUSDC to the treasury (drop arbitrary destination) #2034
BuybackBurner.rescueUSDC(address to, uint256 amount) (GOVERNANCE_ROLE) can send the accumulated 30% buyback bucket to any address — a clean drain vector for a captured governance. Constrain the destination to the protocol treasury.
Fix
rescueUSDC(uint256 amount) sends only to the protocol treasury (FeeRouter.treasury()); remove the caller-chosen to. Rescue stays a misconfiguration escape hatch but can no longer target an arbitrary address in a single call.
Note: treasury is mutable — this consolidates, not eliminates, the surface
setTreasury is intentionally governance-mutable (doesn't affect voting, recoverable — see the dropped FeeRouter-destinations issue). So this isn't a hard non-extractive guarantee: a captor could setTreasury(self) then rescueUSDC. What it does remove is rescue as an independent, silent, per-call arbitrary-destination lever — the drain surface collapses onto the single, visible, already-accepted treasury pointer (telegraphed via setTreasury, one place to watch), instead of a bare transfer to any address.
Implementation
The burner has no treasury/FeeRouter reference today (only usdc/token/admin). Add an immutable FeeRouter reference at construction and read feeRouter.treasury() at rescue time (single source of truth, tracks the current treasury). Alternative: snapshot treasury immutable at deploy (fixed even if FeeRouter.treasury later moves) — decide which; I lean reading FeeRouter.treasury().
Acceptance criteria
rescueUSDC takes only amount; funds go only to the current protocol treasury.
Activity
feat(contracts)!: governance hardening — bound capture, remove struct…