Smart Security Practices From The Best
What do Lido, Red Stone, YieldNest, and Braintrust have in common? They’ve developed effective methods for improving security without drastically increasing costs. Top-tier protocol […]
Permanent blockage in the rewards distribution process.
In the AVSGovernance contract, when processing a payment request from the AttestationCenter contract, the function createOperatorDirectedAVSRewardsSubmission constructs the submission and prepares to interact with the RewardsCoordinator contract. This involves withdrawing rewards from the treasury and granting token approval.
While the withdrawal of rewards and the call to the RewardsCoordinator contract are conducted without the possibility of reverting, the approval process is not handled in the same way. Some tokens do not permit approval from a non-zero value to another non-zero value, leading to a potential revert.
If this occurs, the execution of createOperatorDirectedAVSRewardsSubmission will fail, resulting in successful cross-chain execution on the source chain (in AttestationCenter), but rewards will remain undelivered, and operators’ payment statuses will not be updated.
The situation unfolds as follows:
AVSGovernance contract invokes the function createOperatorDirectedAVSRewardsSubmission. The token is approved successfully, but the subsequent call to createOperatorDirectedAVSRewardsSubmission in the RewardsCoordinator contract fails (for instance, due to the flow being paused).AVSGovernance contract modifies the operator’s list to indicate that no rewards have been distributed.AttestationCenter contract on L2 updates the payment statuses of operators, leaving the claimable fees unaltered.createOperatorDirectedAVSRewardsSubmission, the approval call nowMEDIUM – Permanent blockage in the rewards distribution process.
Implement the SafeERC20 library to manage token approvals robustly, either by increasing or decreasing approval amounts.
Meet Composable Security
Get throughly tested by the creators of Smart Contract Security Verification Standard
Let us help
Get throughly tested by the creators of Smart Contract Security Verification Standard