Amun contest - JMukesh's results

We build tokens to make it easy to invest in crypto.

General Information

Platform: Code4rena

Start Date: 13/12/2021

Pot Size: $75,000 USDC

Total HM: 11

Participants: 30

Period: 7 days

Judge: leastwood

Total Solo HM: 4

Id: 68

League: ETH

Amun

Findings Distribution

Researcher Performance

Rank: 9/30

Findings: 3

Award: $2,862.52

🌟 Selected for report: 2

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: JMukesh

Also found by: certora

Labels

bug
2 (Med Risk)
disagree with severity
sponsor confirmed

Awards

1351.9814 USDC - $1,351.98

External Links

Handle

JMukesh

Vulnerability details

Impact

The return value of the low-level call is not checked, so if the call fails, the Ether will be locked in the contract. If the low level is used to prevent blocking operations, consider logging failed calls.

Proof of Concept

https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/EthSingleTokenJoinV2.sol#L26

Tools Used

manual review

add condition to check return value

#0 - 0xleastwood

2022-01-18T10:56:50Z

Nice find! I think this could be marked as medium as it leaks value from the protocol but it doesn't result in assets being lost directly. It requires _INTERMEDIATE_TOKEN to point to a contract which fails upon wrapping the ETH amount.

#1 - 0xleastwood

2022-01-18T10:57:20Z

So considering that _INTERMEDIATE_TOKEN must be improperly set, I will mark this as medium.

Findings Information

🌟 Selected for report: cmichel

Also found by: JMukesh, WatchPug, defsec, p4st13r4

Labels

bug
duplicate
2 (Med Risk)
sponsor confirmed

Awards

394.2378 USDC - $394.24

External Links

Handle

JMukesh

Vulnerability details

Impact

transfer() does not check the return , due which transfer may get failed without reverting . some tokens does not revert on failure , they just return false

Proof of Concept

https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/SingleNativeTokenExitV2.sol#L104

Tools Used

manual review

use safetransferFrom() from oz libraries

#0 - 0xleastwood

2022-01-22T04:08:59Z

Duplicate of #192

Findings Information

🌟 Selected for report: GiveMeTestEther

Also found by: JMukesh, Ruhum, WatchPug, certora, cmichel, kenzo, p4st13r4, pauliax, robee

Labels

bug
duplicate
1 (Low Risk)

Awards

38.7989 USDC - $38.80

External Links

Handle

JMukesh

Vulnerability details

Impact

Use of transfer() might render ETH impossible to withdraw because after istanbul hardfork, there is an increase in the gas cost of the SLOAD operation and therefore breaks some existing smart contracts.Those contracts will break because their fallback functions used to consume less than 2300 gas, and they’ll now consume more, since 2300 the amount of gas a contract’s fallback function receives if it’s called via Solidity’s transfer() or send() methods. Any smart contract that uses transfer() or send() is taking a hard dependency on gas costs by forwarding a fixed amount of gas: 2300.

https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/ https://blog.openzeppelin.com/opyn-gamma-protocol-audit/

Proof of Concept

https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/EthSingleTokenJoin.sol#L37

https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/EthSingleTokenJoinV2.sol#L37

https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/SingleNativeTokenExitV2.sol#L121

https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/SingleNativeTokenExit.sol#L93

Tools Used

manual review

use call() instead of transfer()

#0 - loki-sama

2022-01-03T10:01:45Z

duplicate #175

Findings Information

🌟 Selected for report: sirhashalot

Also found by: GiveMeTestEther, JMukesh, Ruhum, WatchPug, defsec, robee

Labels

bug
duplicate
1 (Low Risk)

Awards

76.0316 USDC - $76.03

External Links

Handle

JMukesh

Vulnerability details

Impact

due to lack of check for the return value of approve() , function may silently fail

Proof of Concept

https://github.com/code-423n4/2021-12-amun/blob/98f6e2ff91f5fcebc0489f5871183566feaec307/contracts/basket/contracts/singleJoinExit/SingleNativeTokenExitV2.sol#L55

Tools Used

manual review

use safeApprove() from oz library

#0 - loki-sama

2021-12-30T13:24:26Z

duplicate #294

Findings Information

🌟 Selected for report: JMukesh

Labels

bug
1 (Low Risk)

Awards

1001.4677 USDC - $1,001.47

External Links

Handle

JMukesh

Vulnerability details

Impact

Initialize() , Initializes important contract state that can be called by anyone. Since it lacks an access modifier, an attacker can initialize the contract before the legitimate deployer. The attacker, hoping that the victim continues to use the same contract, can hijack the victims POAP. In the best case scenario, the target would notice this falsely deployed contract and redeploy their legitimate contract, but this costs them gas.

Proof of Concept

contracts which uses initialize(), they all lack access modifier

Tools Used

manual review

add access control or use constructor to initialize the non-proxy contracts

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