Golom contest - ych18'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: 123/179

Findings: 2

Award: $39.69

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

4.5163 USDC - $4.52

Labels

bug
duplicate
2 (Med Risk)

External Links

Lines of code

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

Vulnerability details

Impact

  • When using GolomTrader.fillAsk() function, the msg.value can be bigger than the value that will be used by this function. However, there is no function for withdrawing the extra ether of the contract and hence the extra ether will be locked forever in GolomTrader contract.
Recommendation :
  • Add a withdraw() function with onlyOwner modifier that will withdraw the extra ether locked in the contract.

#0 - KenzoAgada

2022-08-04T02:51:00Z

Duplicate of #75 Probably not the best mitigation suggested - can send excess back to caller straight away

RewardDistributor

  • startTime is hardcoded to 1659211200 which is equal to 7/30/2022, 9:00:00 PM, hence the contract would be directly activated when deployed. We recommend setting this variable when deploying the contract with _starTime calldata argument.
  • secInDay = 24 * 60 * 60 can be replaced by secInDay = 1 days
  • Missing event for all the functions. it's good to add event for monitoring

GolomTrader

  • It's better to use OZ ECDSA library for checking signtaure instead of ecrecover to prevent against malleable signatures
  • As this contract will be depolyed in different chains, we recommend renaming WETH by an immutable variable NATIVE_TOKEN that will be set during constrcution.

GolomToken

  • Missing event for all the functions. It's good to add event for monitoring
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