Hunt prep
Before you test Surge
What 11 disclosed reports say about Surge: 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 | 6 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
| Race condition lesson | 1 | 0 | – | – | $0 |
| Smart contracts 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.
-
Approve and transferFrom functions of Pool tokens are subject to front-run attack
The fix was to add functions to increase or decrease approval instead of using approve directly.
Disclosed
-
First depositor can abuse exchange rate to steal funds from later depositors
The fix was to lock a small amount of the first deposit to create minimum liquidity, making manipulation nearly impossible.
Disclosed
-
Fee share calculation is incorrect
The fee share calculation was fixed to use the correct formula that accounts for interest and fee.
Disclosed
-
Attackers can force surge to never update the collateralization ratio
The fix requires that _collateralRatioFallDuration and _collateralRatioRecoveryDuration be less than _maxCollateralRatioMantissa.
Disclosed
-
Users can borrow all loan tokens
The project fixed this by forbidding deposits and withdrawals in a single block and later by adding a longer lock period for deposits.
Disclosed
-
transferFrom uses allowance even if spender == from
The allowance should only be reduced when the caller is not the token owner, and the project states this was fixed.
Disclosed
-
fund loss because calculated Interest would be 0 in getCurrentState() due to division error
The fix was to not update lastAccrueInterestTime when the calculated interest is zero, as confirmed by the discussion.
Disclosed
-
Operator can cause fee shares to be minted to address(0)
The fix adds a check to prevent setting the fee recipient to address(0), as confirmed by the discussion.
Disclosed
-
Precision differences when calculating userCollateralRatioMantissa causes major issues for some token pairs
The calculation was fixed by normalising debt and collateral values to 18 decimal points before computing the ratio.
Disclosed
-
Attackers may skip the collateral ratio recovery duration to inflate collateralization ratios and steal funds
The fix caches the loan token balance instead of using balanceOf, updating it at the end of all state-changing functions.
Disclosed