Hunt prep
Before you test Hubble Exchange
What 16 disclosed reports say about Hubble Exchange: 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 | 3 | 0 | – | – | $0 |
| Race condition lesson | 2 | 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.
-
min withdraw of 5 VUSD is not enough to prevent DOS via VUSD.sol#withdraw(amount)
The team should limit the number of withdrawal requests per address, remove the minimum withdrawal limit, or implement a priority queue based on withdrawal amount; they have stated they will increase maxWithdrawalProcesses or the minimum withdrawal amount if needed.
Disclosed
-
ProcessWithdrawals is still DOS-able
The call in processWithdrawals now limits gas consumption to a governance-adjustable maxGas, and it is recommended to enforce a minimum value for maxGas.
Disclosed
-
Funding settlement will be DOS'd for a time after the phaseID change of an underlying chainlink aggregator
The recommendation is to use a try block when calling the aggregator and, if the round ID is nonzero and reverting, retry with a lower phase ID.
Disclosed
-
Failed withdrawals from VUSD#processWithdrawals will be lost forever
The issue was fixed by caching failed withdrawals so governance can retry them case by case.
Disclosed
-
`Chainlink.latestRoundData()` may return stale results
The fix was to store a heartbeat per aggregator and revert if the price update is outside the heartbeat window.
Disclosed
-
Malicious user can control premium emissions to steal margin from other traders
The report recommends disincentivising the attack by making it a net loss through measures such as increasing minimum order size, fees, capping position size, reducing maximum price deviation, and increasing margin requirements.
Disclosed
-
MarginAccountHelper will be bricked if registry.marginAccount or insuranceFund ever change
The recommendation is to remove approvals to the old contracts before changing the references and then approve the new contracts after.
Disclosed
-
User will be forced liquidated
A grace period or delay before liquidations after unpausing should be added, but the sponsor says they will fix this later.
Disclosed
-
Potential accounting problems due to issue in `ClearingHouse.updatePositions()`
The code should be adjusted to track whether any market reached its next funding time, and update lastFundingTime accordingly.
Disclosed
-
No `minAnswer/maxAnswer` Circuit Breaker Checks while Querying Prices in Oracle.sol
The contract should check for minAnswer/maxAnswer and revert, or use a fallback oracle without circuit breakers; the team said they will fix this in later releases.
Disclosed
-
Malicious users can donate/leave dust amounts of collateral in contract during auctions to buy other collateral at very low prices
The auction should close when the remaining balance is below a small threshold, not only when it is exactly zero.
Disclosed
-
Malicious user can grief withdrawing users via VUSD reentrancy
The fix was to add the nonreentrant modifier to mintWithReserve, withdraw, and withdrawTo.
Disclosed
-
Malicious user can frontrun withdrawals from Insurance Fund to significantly decrease value of shares
The report recommends adding a slippage parameter to withdraw and withdrawFor so users can set a minimum vUSD amount, or using the total pool value instead of the vUSD balance; the maintainer says it will be fixed in later releases.
Disclosed
-
Setting stable price in oracle can result in arbitrate opportunities and significant bad debt if the stable depegs
The protocol team stated that the stable price mechanism is only for testnet and that mainnet will use oracle price feeds for USDC, so no contract change was made.
Disclosed
-
Risk of Unfair Order Execution Price in `_validateOrdersAndDetermineFillPrice` Function
The recommendation is to calculate the average of the buy and sell order prices, but the sponsor stated they will fix this in later releases when anyone can become a validator.
Disclosed