Golom contest - bearonbike's results

An NFT marketplace that offers the lowest industry fee, a publicly available order-book along with analytical tools.

General Information

Platform: Code4rena

Start Date: 26/07/2022

Pot Size: $75,000 USDC

Total HM: 29

Participants: 179

Period: 6 days

Judge: LSDan

Total Solo HM: 6

Id: 148

League: ETH

Golom

Findings Distribution

Researcher Performance

Rank: 176/179

Findings: 1

Award: $0.00

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-07-golom/blob/e5efa8f9d6dda92a90b8b2c4902320acf0c26816/contracts/core/GolomTrader.sol#L154

Vulnerability details

Impact

Use deprecated transfer() may cause revert.

Proof of Concept

Transfer() used to send ether with 2300 limited gas. If payAddress is a contract, and it's fallback()/receive() function use more than 2300 gas, the transaction will revert.

fallback() external payable { // Do something that use more than 2300 gas. }

A blog explain this: https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/

Tools Used

Vscode

Use call instead, for example:

function payEther(uint256 payAmt, address payAddress) internal { if (payAmt > 0) { // if royalty has to be paid (bool success, ) = payAddress.call{value:payAmt}(""); require(success, "Transfer failed."); } }

#0 - KenzoAgada

2022-08-03T14:03:44Z

Duplicate of #343

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter