Skip to content

Use SafeERC20 for reward flows and add non-compliant token tests#5

Open
ramGit22 wants to merge 2 commits intoAztecProtocol:masterfrom
ramGit22:master
Open

Use SafeERC20 for reward flows and add non-compliant token tests#5
ramGit22 wants to merge 2 commits intoAztecProtocol:masterfrom
ramGit22:master

Conversation

@ramGit22
Copy link

@ramGit22 ramGit22 commented Oct 8, 2025

Summary

  • Switched rollup reward withdrawals and fee burns to SafeERC20 helpers so non-standard ERC-20 tokens cannot silently short-change sequencers or provers.
  • Hardened staking and governance staking escrow token handling with safeTransfer, safeTransferFrom, and defensive allowance resets to ensure deposits, refunds, and proposal locks revert on failed ERC-20 operations.
  • Added a configurable non-compliant ERC-20 mock, enabled builder token overrides, and wrote targeted regression tests that assert SafeERC20 reverts across staking, GSE deposits, and rollup reward claims.

Testing

⚠️ forge test --match-test NonCompliant -vv (forge binary unavailable in container)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant