Skip to content
Request an audit

‹ All findings

Using transfer() instead of call() may revert

Low/InfoOstium·Three Sigma · RWA perpetuals DEX · 19th February, 20243S-OS-L16

Description

When withdrawing ETH in OstiumPriceUpKeep::withdrawEth() using the deprecated transfer() function will make the transaction revert when:

  1. The claimer smart contract does not implement a payable function.
  2. The claimer smart contract does implement a payable fallback which uses more than 2300 gas units.
  3. The claimer smart contract implements a payable fallback function that needs less than 2300 gas units but is called through proxy, raising the call's gas usage above 2300. Additionally, using higher than 2300 gas might be mandatory for some multisig wallets.

Recommendation

solidity
Use sendValue() or: payable(msg.sender).call{value: amount}("");

Status

Addressed in #173093.