Swivel contest - loop's results

The Decentralized Protocol For Fixed-Rate Lending & Tokenized Cash-Flows.

General Information

Platform: Code4rena

Start Date: 30/09/2021

Pot Size: $75,000 ETH

Total HM: 9

Participants: 15

Period: 7 days

Judge: 0xean

Total Solo HM: 2

Id: 39

League: ETH

Swivel

Findings Distribution

Researcher Performance

Rank: 8/15

Findings: 3

Award: $2,702.21

🌟 Selected for report: 3

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: 0xsanson

Also found by: 0xRajeev, GalloDaSballo, JMukesh, cmichel, defsec, leastwood, loop, nikitastupin, pants, pauliax

Labels

bug
duplicate
3 (High Risk)

Awards

0.1048 ETH - $310.65

External Links

Handle

loop

Vulnerability details

ERC20.transfer and ERC20.transferFrom are used for transfers of underlying tokens. The return value of transfer and transferFrom are not checked when used.

The same goes for using ERC20.approve for approving the underlying tokens.

Impact

Several tokens do not revert in case of failure and return false. If one of these tokens is used as underlying the transfer might not have actually been performed and still count as a correct transfer as it returned false but wasn't checked.

Proof of Concept

Slither reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-transfer Similar issue in another c4 contest: https://github.com/code-423n4/2021-08-yield-findings/issues/31

Lines with transfer/transferFrom:

Lines with approve:

Tools Used

Slither

Use the SafeERC20 library with safeTransfer, safeTransferFrom and safeApprove instead.

#0 - 0xean

2021-10-16T23:06:37Z

dupe of #155

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