Lucene search

K
code423n4Code4renaCODE423N4:2022-11-CANTO-FINDINGS-ISSUES-26
HistoryNov 25, 2022 - 12:00 a.m.

Funds are locked if can’t transfer reward to recipient in withdraw

2022-11-2500:00:00
Code4rena
github.com
6
locked funds
recipient
transfer error
withdraw
mitigation steps
vulnerability
proxy pattern
lost fees
locked funds back

Lines of code

Vulnerability details

Impact

When recipient not able to received reward when call withdraw, as natspec: If contract is using proxy pattern, it’s possible to register retroactively, however past fees will be lost.
We not handle that case to get locked funds back. We should add withdrawForOwner() to release locked funds.

#Proof of Concept

Recommended Mitigation Steps

error TransferError();
function withdrawForOwner(uint256 amount) external onlyOwner {
(bool success, ) = payable(msg.sender).call{value: amount}(‘’);
if (!success) revert TransferError();
}


The text was updated successfully, but these errors were encountered:

All reactions