Hunt prep
Before you test Frax Ether Liquid Staking contest
What 27 disclosed reports say about Frax Ether Liquid Staking 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 | 16 | 0 | – | – | $0 |
| DoS lesson | 5 | 0 | – | – | $0 |
| Access control lesson | 3 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 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.
-
Liquidator might end up paying much more asset than collateral received
The protocol should check that the shares intended to be repaid are worth the collateral plus fee, and if not, reduce the amount of shares to be repaid accordingly.
Disclosed
-
FraxlendPair.sol is not fully EIP-4626 compliant
The functions should be updated to return zero when the contract is paused, without reverting, since EIP-4626 requires these functions never to revert.
Disclosed
-
Fraxlend pair deployment can be front-run by a custom pair deployment
The mitigation is to validate that the _name parameter in deployCustom is not 'public' and to prefix custom pair names to prevent front-running.
Disclosed
-
Wrong percent for FraxlendPairCore.dirtyLiquidationFee .
The constant should be changed from 9000 to 90000 so the dirty fee equals 90% of the clean fee; the sponsor confirmed the issue.
Disclosed
-
FraxlendPair.changeFee() doesn’t update interest before changing fee.
The changeFee() function should call _addInterest() before updating the fee rate.
Disclosed
-
Impossible to setCreationCode() with code size less than 13K
The code should skip the slice when the creation code is 13K or less and read only from the first stored address during deployment.
Disclosed
-
Owner of FraxlendPair can set arbitrary time lock contract address to circumvent time lock
The time lock should be implemented directly in the contract rather than relying on an external, owner-settable address.
Disclosed
-
Denial of service in globalPause by wrong logic
The fix is to initialize the _updatedAddresses array with the correct length before the loop.
Disclosed
-
Any borrower with bad debt can be liquidated multiple times to lock funds in the lending pair
The liquidation logic should add the leftover shares to the shares to liquidate so the borrower's debt is properly reduced.
Disclosed
-
liquidate() doesn’t mark off bad debt, leading to a ‘last lender to withdraw loses’ scenario
Bad debt should be marked off when remaining collateral reaches zero or near-zero value.
Disclosed
-
No incentives to write off bad debt when remaining collateral is very small
The reporter suggests capping how much collateral a dirty liquidation can remove, for example at 95%, so a meaningful remainder always stays; the sponsor acknowledged but disagreed with severity.
Disclosed
-
Penalty rate is used for pre-maturity date as well
The interest for the period before maturity should be calculated at the normal rate, and the penalty rate applied only to the time after maturity.
Disclosed
-
Interest can be significantly lower if addInterest isn’t called frequently enough
The interest calculation should be split into smaller periods when a long time has passed since the last update, and users should be informed of the risk.
Disclosed
-
FraxlendPair#setTimeLock: Allows the owner to reset TIME LOCK ADDRESS
Add a boolean mutex to ensure setTimeLock can only be called once, as suggested in the report.
Disclosed
-
Withheld ETH shoud not be sent back to the frxETHMinter contract itself
A check should be added to prevent sending withheld ETH to the contract itself, and a separate payable function that does not mint frxETH should be used for receiving special ETH.
Disclosed