yAxis contest - defsec's results

The trusted #DeFi platform to earn reliable returns on digital assets.

General Information

Platform: Code4rena

Start Date: 09/09/2021

Pot Size: $60,000 USDC

Total HM: 24

Participants: 12

Period: 7 days

Judge: GalloDaSballo

Total Solo HM: 14

Id: 30

League: ETH

yAxis

Findings Distribution

Researcher Performance

Rank: 11/12

Findings: 2

Award: $228.57

๐ŸŒŸ Selected for report: 1

๐Ÿš€ Solo Findings: 0

Findings Information

๐ŸŒŸ Selected for report: cmichel

Also found by: defsec, jonah1005, tensors

Labels

bug
duplicate
2 (Med Risk)

Awards

37.6774 YAXIS - $146.94

External Links

Handle

defsec

Vulnerability details

Impact

It is good to add a require() statement that checks the return value of token transfers or to use something like OpenZeppelinโ€™s safeTransfer/safeTransferFrom unless one is sure the given token reverts in case of a failure. Failure to do so will cause silent failures of transfers and affect token accounting in contract.

While most places use a require or safeTransfer/safeTransferFrom, there are three missing cases in the withdrawal of staking token and rescue of arbitrary tokens sent to the Manager contract.

Reference this similar medium-severity finding from Consensys Diligence Audit of Fei Protocol: https://consensys.net/diligence/audits/2021/01/fei-protocol/#unchecked-return-value-for-iweth-transfer-call

Proof of Concept

  1. Navigate to https://github.com/code-423n4/2021-09-yaxis/blob/main/contracts/v3/Manager.sol#L451 contract.
  2. Transfer function is used instead of safe transfer.

Tools Used

Manual Code Review

Consider using safeTransfer/safeTransferFrom or require() consistently.

#0 - transferAndCall

2021-09-12T20:19:11Z

#1 - GalloDaSballo

2021-10-14T00:00:41Z

Duplicate of #114

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