Streaming Protocol contest - csanuragjain'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: 31/36

Findings: 3

Award: $362.31

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: harleythedog

Also found by: WatchPug, csanuragjain, gpersoon, hubble

Labels

bug
duplicate
2 (Med Risk)

Awards

317.2172 USDC - $317.22

External Links

Handle

csanuragjain

Vulnerability details

Impact

Contract variable unstreamed is not updated in withdraw function which can lead to unstability

Proof of Concept

  1. Observe the stake function of Stream contract
function stake(uint112 amount) public lock updateStream(msg.sender) { ... unstreamed += trueDepositAmt; ... }
  1. As we can see once user stakes the unstreamed variable is increased by user's stake amount

  2. Now lets see the withdraw function. This function does not decrease the unstreamed variable by user withdrawn amount bringing contract variable to instability.

Add below statement in withdraw function

unstreamed -= trueDepositAmt;

#0 - 0xean

2022-01-16T00:25:42Z

dupe of #118

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