Hunt prep
Before you test Exactly Protocol Update - Staking Contract
What 13 disclosed reports say about Exactly Protocol Update - Staking Contract: 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 | 8 | 0 | – | – | $0 |
| DoS lesson | 4 | 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.
-
Anyone will DoS setting a new rewards duration which harms the protocol/users as they will receive too much or too little rewards
The issue was fixed by the protocol team, and the fix was reviewed and signed off by the Lead Senior Watson.
Disclosed
-
Attackers will reset `avgStart` of any user making rewards stuck for longer and get lost to savings
The protocol team fixed this issue by removing the avgStart reset mechanism in _update().
Disclosed
-
Frozen/paused Market that is harvested from in StakedEXA will DoS deposits leading to loss of yield
The issue was fixed by checking if the market is paused or frozen and skipping the harvest in that case.
Disclosed
-
Liquidating maturies with unassigned earnings will not take into account floating assets increase leading to loss of funds
The liquidation check should preview the floating assets increase from accrued unassigned earnings, or those earnings should increase the earnings accumulator instead of floating assets.
Disclosed
-
Some bad debt will not be cleared when it should which will cause accrual of bad debt decreasing the protocol's solvency
The earnings accumulator should be increased first and only then compared against the bad debt.
Disclosed
-
Rewards Can Be Harvested Even When Distribution Is Marked As Finished
The provider should set zero allowances on the market or withdraw the assets to prevent new distributions.
Disclosed
-
Liquidations will leave dust when repaying expired maturities, making it impossible to clear bad debt putting the protocol at a risk of insolvency
The rounding error is hard to deal with; it's easier to set a threshold to clear bad debt so rounding errors can be disregarded.
Disclosed
-
Liquidator will leave a pool with unassigned earnings on `Market::clearBadDebt()` free to claim for anyone when the repaid maturity is not the last
The unassigned earnings should be assigned to the earnings accumulator pro-rata to the floatingBackupBorrowed cleared in the bad debt clearance.
Disclosed
-
Setting a new market will make depositing to the market impossible when harvesting, DoSing deposits
The protocol team fixed this issue by approving the new market's asset when setMarket() is called, as done in the constructor.
Disclosed
-
Depositing to another receiver othan than `msg.sender` will lead to stuck funds by increasing `avgStart` without claiming
The claim should be made to the receiver of the funds (`to`), and the `_claim()` function should be adapted to accept an `account` argument.
Disclosed
-
Precision Loss in `notifyRewardAmount` Function Causes Unclaimable RewardToken
The protocol team fixed this issue by adding an admin function to extract the remaining undistributed reward tokens.
Disclosed
-
Having no deposits in `StakedEXA` will lead to stuck rewards when harvesting
The issue was fixed by calculating the undistributed amount (rate times deltaTime) and sending it to savings when total supply is zero.
Disclosed
-
Market utilization ratio near 100% will DoS deposits as harvest tries to withdraw and reverts
The protocol team fixed this issue by capping the withdrawal amount to the maximum that does not revert.
Disclosed