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: 27/36

Findings: 3

Award: $871.45

🌟 Selected for report: 2

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: toastedsteaksandwich

Also found by: Meta0xNull, Omik, ScopeLift, bitbopper, gzeon, pedroais, wuwe1

Labels

bug
duplicate
3 (High Risk)

Awards

481.7736 USDC - $481.77

External Links

Handle

Omik

Vulnerability details

Impact

In the stream contract the inherited governance is allowed to call arbitraryCall() function with the intention to claiming any airdrop that may have accrued on behalf of this contract, and protect the deposittoken and rewardtoken balance with a require check on https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/Locke.sol#L749, however the data is controllable by the inherited governance, which can lead to the governance calling an approval function, and executing for an unlimited approval of the incentives token that will be frontrun, and the attacker would monitor the mempool for a createincentives() function call, and before the createincentives() get executed, the attacker make the first move by make an arbitrary call to execute an unlimited approval for the token that will be use to createincentives, and the other way the attacker could request an unlimited approval for any major token like USDC, USDT, before other user create any incentives.

Proof of Concept

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

#0 - brockelmore

2021-12-06T16:50:13Z

duplicate #107

#1 - 0xean

2022-01-14T21:57:12Z

dupe of #199

Findings Information

🌟 Selected for report: Omik

Also found by: pauliax

Labels

bug
1 (Low Risk)
sponsor disputed

Awards

362.6168 USDC - $362.62

External Links

Handle

Omik

Vulnerability details

Impact

In the https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/LockeERC20.sol#L95, is similar with the erc20, however there is a missing address(0) check on transfer() and transferfrom(), this can lead to accidental transfer to address(0), this will be treated as burning token, without reducing the total supply, since the transfer event is emitted.

Proof of Concept

#0 - brockelmore

2021-12-06T17:22:19Z

Transfers to 0 address are fine.

#1 - 0xean

2022-01-15T01:58:31Z

Marking down to low risk as it will change the total supply and does diverge from best practices as outlined by open zep - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/3eb2d43b0610758c6b85bf4b8ae160db3679c34d/contracts/token/ERC20/ERC20.sol#L233

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