Skip to content

Code4rena

Hubble contest

Every publicly disclosed report for Hubble contest and what kind of bugs they were.

disclosed reports
20
most reported class
Business logic
bug classes found
5
first disclosure
2022
Find Hubble contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Hubble contest chose to make public.

DoS

denial of service

The withdraw function allowed zero-amount withdrawals, so an attacker could flood the withdrawal queue with many empty entries. This made processWithdrawals very expensive to run, potentially locking funds because governance or users could not afford the gas to clear the queue.

Hubble contest

High
Smart contracts

InsuranceFund depositors can be priced out & deposits can be stolen

The InsuranceFund deposit function mints shares based on the contract's VUSD balance, allowing an attacker to inflate the share price and steal deposits. An attacker can deposit a tiny amount, directly transfer a large amount of VUSD to the contract, causing subsequent deposits to mint zero shares, then withdraw their single share to take the entire pool balance.

Hubble contest

High
Access control

Hidden governance

The VUSD contract uses two separate governance mechanisms: VanillaGovernable and role-based access from [redacted]. This dual model could hide a rogue pool and damage user trust.

Hubble contest

Medium
Audit finding

Oracle.getUnderlyingPrice could have wrong decimals

The Oracle.getUnderlyingPrice function divides the Chainlink price by 100, assuming all price feeds have 8 decimals. If a feed with different decimals is used, the returned price would be incorrect, potentially leading to mispriced assets.

Hubble contest

Medium
DoS

All AMMs have to be past nextFundingTime to update

The funding settlement routine reverts whenever any single AMM is not yet past its next funding time, so one AMM that is not ready blocks updates for every other AMM. An attacker or ordinary timing could therefore stall funding settlement across all markets until the slowest AMM's timer elapses.

Hubble contest

Medium
Audit finding

Liquidations can be run on the bogus Oracle prices

The oracle price feed is used without checks for zero or stale prices, so an attacker monitoring the feed can liquidate a healthy position when a price outbreak occurs, obtaining collateral at a discount.

Hubble contest

Medium
Business logic

[WP-H7] InsuranceFund#syncDeps() may cause users’ fund loss

The InsuranceFund contract allows governance to change the VUSD token address at any time, which can cause users to lose funds if the change occurs between their deposit and withdrawal. An attacker (or governance) could change the token address so that a user withdrawing shares receives a different token with zero balance.

Hubble contest

Medium
DoS

settleFunding will exceed block gas with more markets and activity

The settleFunding function iterates over all markets and calls _calcTwap, which uses an unbounded while loop, so as markets and activity grow, gas usage could exceed the block gas limit, preventing users from calling the function and causing a denial of service.

Hubble contest

Medium
Business logic

After debt seizure from InsuranceFund , user can dilute all past participants.

After a debt seizure leaves the insurance fund with pending obligations and zero balance, an attacker can deposit a tiny amount to receive an enormous number of shares, diluting earlier liquidity providers. The attacker then takes a much larger share of future profits.

Hubble contest

Medium
Access control

Ownership of Swap.vy cannot be transferred

The ownership transfer function in Swap.vy is commented out, so the contract owner cannot be changed. If the owner keys are compromised or an upgrade is needed, funds could be stuck because there is no way to transfer ownership.

Hubble contest

Medium
Race condition

Users are able to front-run bad debt settlements to avoid insurance costs

A user can front-run the public call to settle bad debt by withdrawing their insurance fund shares first, avoiding the cost of the debt being seized from the fund. This lets them keep their share of insurance payments while shifting the loss to other users.

Hubble contest

Medium
Access control

AMM Cannot Be initialize() Except By Governance

The AMM contract's initialize function calls syncDeps, which has an onlyGovernance modifier, so initialisation reverts unless the caller is the governance address. This prevents deployment by a normal deployer account and requires governance to deploy the proxy and encode arguments.

Hubble contest

Medium
Business logic

Liquidation is vulnerable to sandwich attacks

When a position is liquidated, the swap has no minimum output amount, so an attacker can sandwich the liquidation swap to profit from the price impact. The attacker opens a short position, triggers the liquidation, then redeems the short to gain from the reduced price.

Hubble contest

Medium
DoS

USDC blacklisted accounts can DoS the withdrawal system

The withdrawal system processes queued withdrawals in a loop, but a transfer to a USDC-blacklisted address fails and the blacklisted user is never removed, causing the entire withdrawal queue to be blocked. An attacker could use a blacklisted address to prevent all other users from withdrawing.

Hubble contest

Medium
Business logic

ClearingHouse May Whitelist Duplicate AMMs

The whitelistAmm function allows the same AMM contract to be added multiple times, causing unrealized profits and notional positions to be counted more than once. This can lead to incorrect margin calculations, potentially allowing insolvent trading or wrongful liquidations.

Hubble contest

Medium
Smart contracts

Update initializer modifier to prevent reentrancy during initialization

The project used an outdated OpenZeppelin contracts library version with a known high-severity flaw in its initializer logic. An attacker could potentially re-enter an initializer function during initialisation, which the report says could undermine the contract's setup.

Hubble contest

High