Swivel contest - GalloDaSballo'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: 14/15

Findings: 3

Award: $1,229.67

🌟 Selected for report: 2

🚀 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

GalloDaSballo

Vulnerability details

Impact

initiateZcTokenFillingZcTokenExit and initiateVaultFillingVaultExit in Swivel.sol are using transferFrom https://github.com/Swivel-Finance/gost/blob/5fb7ad62f1f3a962c7bf5348560fe88de0618bae/test/swivel/Swivel.sol#L191 https://github.com/Swivel-Finance/gost/blob/5fb7ad62f1f3a962c7bf5348560fe88de0618bae/test/swivel/Swivel.sol#L253

This function call can fail (meaning the tokens are not transferred) without causing a revert

This would break the accounting in the protocol

I highly recommend using OpenZeppelin's safeTransferFrom to avoid issue

Tools Used

See a similar finding in Pool Together audit: https://github.com/code-423n4/2021-07-pooltogether-findings/issues/61

Replace transferFrom with safeTransferFrom

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