The protocol uses Solidity’s transfer() when transferring asset. This has some notable shortcomings when the recipient is a smart contract, which can render asset impossible to transfer. Specifically, the transfer will inevitably fail when the smart contract:
does not implement a payable fallback function, or
implements a payable fallback function which would incur more than 2300 gas units, or
implements a payable fallback function incurring less than 2300 gas units but is called through a proxy that raises the call’s gas usage above 2300.
Lines of code
https://github.com/code-423n4/2023-10-wildcat/blob/main/src/WildcatSanctionsEscrow.sol#L38
Vulnerability details
Impact
The protocol uses Solidity’s
transfer()
when transferring asset. This has some notable shortcomings when the recipient is a smart contract, which can render asset impossible to transfer. Specifically, the transfer will inevitably fail when the smart contract:Proof of Concept
Tools Used
VS Code, Manual Review
Recommended Mitigation Steps
Using
call
with its returned boolean checked in combination with re-entrancy guard is highly recommended.Assessed type
ETH-Transfer