28687 - [SC - Low] Timelocks executeTransaction incorrectly delete...
Submitted on Feb 23rd 2024 at 23:58:18 UTC by @honeymewn for Boost | Puffer Finance
Report ID: #28687
Report type: Smart Contract
Report severity: Low
Target: https://etherscan.io/address/0x3C28B7c7Ba1A1f55c9Ce66b263B33B204f2126eA#code
Impacts:
Contract fails to deliver promised returns, but doesn't lose value
Description
Brief/Intro
Timelock's executeTransaction deletes transaction after executing it. However, if it fails it should keep it otherwise operations multisig will have to wait for a week to reexecute it.
Vulnerability Details
executeTransaction in Timelock.sol executes a transaction from the queue. However there's no revert on failure. Therefore if proposed transaction fails due to insufficient gas or PufferVault temporarily not having enough funds for a deposit community will have to wait for another delay_period to reexecute it.
Impact Details
Operations will have to wait for a week or ask community to execute a transaction if it's urgent.
References
https://github.com/PufferFinance/pufETH/blob/main/src/Timelock.sol#L217
Recommendation
I suggested slightly modifying the function to keep the txn on failure. One can always call cancelTransaction if needed.
Optionally add a reentrancy guard but I don't really think this is needed here.
Proof of Concept
As I said earlier a transaction should be kept when it fails. Otherwise operations will need to wait for another week to reexecute. PoC demonstrates a case when operations multisig runs out of gas when pausing targets (there could be other cases of when a transaction fails temporarily). Run with:
Last updated
Was this helpful?