Closed c4-submissions closed 1 year ago
https://github.com/code-423n4/2023-09-delegate/blob/a6dbac8068760ee4fc5bababb57e3fe79e5eeb2e/src/DelegateToken.sol#L360 https://github.com/code-423n4/2023-09-delegate/blob/a6dbac8068760ee4fc5bababb57e3fe79e5eeb2e/src/DelegateToken.sol#L369
If a transfer were to fail, the contract balance would be incorrect, showing less tokens than it actually holds. This could lead to errors or exploits down the line if relying on an inaccurate balance
Manual
A better approach is to transfer first, then decrement if successful
Other
GalloDaSballo marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-09-delegate/blob/a6dbac8068760ee4fc5bababb57e3fe79e5eeb2e/src/DelegateToken.sol#L360 https://github.com/code-423n4/2023-09-delegate/blob/a6dbac8068760ee4fc5bababb57e3fe79e5eeb2e/src/DelegateToken.sol#L369
Vulnerability details
Impact
If a transfer were to fail, the contract balance would be incorrect, showing less tokens than it actually holds. This could lead to errors or exploits down the line if relying on an inaccurate balance
Proof of Concept
Tools Used
Manual
Recommended Mitigation Steps
A better approach is to transfer first, then decrement if successful
Assessed type
Other