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.
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.
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.
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.
The ClearingHouse contract assumes all whitelisted AMMs return position values with exactly 6 decimals, but no check enforces this. If an AMM with different precision is whitelisted, margin calculations become incorrect, potentially allowing an attacker to liquidate valid positions.
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.
The InsuranceFund contract lacks a function to transfer non-VUSD tokens, so any such assets sent to it become stuck. An attacker could not directly exploit this, but assets sent by mistake or design would be locked.
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.
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.
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.
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.
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.
A zero-value withdrawal can be added to the VUSD withdraw queue, and if the reserve token does not support zero-value transfers, the queue processing will revert on that entry, blocking all subsequent withdrawals and freezing user funds.
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.
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.
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.
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.
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.
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.
The contracts used the standard non-upgradeable Ownable library inside proxy-based upgradeable contracts, so the constructor that sets the owner never runs and no owner is assigned. As a result, every function restricted to the owner would be unusable after deployment.
HC
Hubble contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.