Hunt prep
Before you test Streaming Protocol contest
What 15 disclosed reports say about Streaming Protocol contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 10 | 0 | – | – | $0 |
| Access control lesson | 3 | 0 | – | – | $0 |
| DoS lesson | 1 | 0 | – | – | $0 |
| Race condition lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Wrong calculation of excess depositToken allows stream creator to retrieve depositTokenFlashloanFeeAmount , which may cause fund loss to users
The excess calculation should also subtract depositTokenFlashloanFeeAmount.
Disclosed
-
Reward token not correctly recovered
The claimed rewards should be tracked and rewardTokenAmount decreased in claimReward, similar to how claimed deposits are tracked.
Disclosed
-
Improper implementation of arbitraryCall() allows protocol gov to steal funds from users’ wallets
The fix should add a mapping to track incentive tokens and require that the target address is not an incentive token in arbitraryCall.
Disclosed
-
LockeERC20 is vulnerable to frontrun attack
The approve function should either require the caller to provide the current allowance and check it matches, or be replaced with separate increase and decrease functions.
Disclosed
-
recoverTokens doesn’t work when isSale is true
The fix should set redeemedDepositTokens to depositTokenAmount inside creatorClaimSoldTokens, so that the excess calculation in recoverTokens becomes correct.
Disclosed
-
ts.tokens sometimes calculated incorrectly
The code should be changed so that ts.lastUpdate is always updated when time has elapsed, regardless of the token balance.
Disclosed
-
Tokens can be stolen when depositToken == rewardToken
Add a special case in recoverTokens for when depositToken equals rewardToken, subtracting both the outstanding deposit amount and the total reward amount from the contract balance to calculate the true excess.
Disclosed
-
Any arbitraryCall gathered airdrop can be stolen with recoverTokens
The contract should track airdropped token balances in a mapping and prevent their withdrawal in recoverTokens, similar to how incentive tokens are handled.
Disclosed
-
Possible incentive theft through the arbitraryCall() function
The contract should limit the types of incentive tokens or validate that the allowance of the target contract has not changed.
Disclosed
-
Storage variable unstreamed can be artificially inflated
Add a line to `withdraw` to decrement `unstreamed` by the withdrawn amount.
Disclosed
-
arbitraryCall() can get blocked by an attacker
The team acknowledged the risk as a tradeoff and recommended communicating it to users; no code fix was applied.
Disclosed
-
This protocol doesn’t support all fee on transfer tokens
The protocol should either clearly state it does not support such tokens or adjust its accounting to measure the actual received amount.
Disclosed
-
DOS while dealing with erc20 when value(i.e amount*decimals) is high but less than type(uint112).max
The arithmetic should be performed in two steps or by upcasting to a larger type and then downcasting, or a threshold should be enforced to prevent stakes that cause overflow.
Disclosed
-
Business logic bug in __abdicate() function - 2 Bugs
The abdicate function should also set the emergency governor and pending governor to the zero address.
Disclosed