Streaming Protocol contest - Ruhum's results

General Information

Platform: Code4rena

Start Date: 30/11/2021

Pot Size: $100,000 USDC

Total HM: 15

Participants: 36

Period: 7 days

Judge: 0xean

Total Solo HM: 4

Id: 62

League: ETH

Streaming Protocol

Findings Distribution

Researcher Performance

Rank: 21/36

Findings: 2

Award: $1,417.60

🌟 Selected for report: 1

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: cmichel

Also found by: 0x0x0x, Ruhum, gpersoon, gzeon, hack3r-0m, pauliax

Labels

bug
duplicate
3 (High Risk)

Awards

611.7761 USDC - $611.78

External Links

Handle

Ruhum

Vulnerability details

Impact

The user has the possibility of creating a stream where the reward and deposit token are the same. This would potentially break the claiming of the deposit and the reward since the contract might not have enough funds.

Anyway, it would be the stream creator's fault but I think outright blocking that scenario would be the best approach here.

Proof of Concept

No checks whether depositToken and rewardToken are the same:

https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/Locke.sol#L809-L814

https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/Locke.sol#L281-L310

Tools Used

none

Add following check to either createStream() or Stream.constructor()

require(rewardToken != depositToken)

#0 - 0xean

2022-01-16T01:12:20Z

dupe of #215

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