The auction calculation incorrectly moves the entire collateral and debt when the proportional amount falls below the minimum debt, instead of only increasing to the minimum. An attacker could cause a vault's full collateral to be auctioned when only a portion should be, potentially leading to loss of collateral for the user.
The auction function allows the auctioneer address to be set to address(0), and when the auctioneer reward is paid out, the token transfer to address(0) reverts on some tokens, making the auction impossible to liquidate. A malicious user could start an auction on their own underwater vault with a zero auctioneer to avoid liquidation and force the protocol to take on bad debt.
The smart contract's price oracle did not check whether the Chainlink price feed data was stale or from an incomplete round. An attacker could exploit this to get an incorrect quote amount, potentially leading to financial loss.
The reward accounting variable is stored as a 128-bit integer, and the calculation that updates it can exceed that range. An early user who wraps a tiny amount and then sends reward tokens to the contract could make the value overflow, disrupting reward distribution.
The ConvexYieldWrapper contract calculates a user's deposited balance by summing collateral across all vaults they own, but vault ownership can be transferred without updating checkpoints. An attacker can transfer a vault to another account and create a new checkpoint, allowing both accounts to claim yield on the same collateral, thereby extracting additional yield from the protocol.
The ConvexYieldWrapper contract omitted a checkpoint on token transfers, so a user could transfer wCVX tokens to another account and manually checkpoint the recipient, causing both accounts to show the same deposited balance. This allowed the attacker to claim more than their fair share of rewards, draining yield from other users.
The rewards accumulator can fail to increase when the reward rate is low relative to the token supply, because integer division rounds down to zero. An attacker could repeatedly transfer tokens to keep the time since last update very small, preventing rewards from ever accumulating.
The CompositeMultiOracle contract's price calculation functions may return incorrect prices due to a decimal scaling error. An attacker could potentially exploit this to inflate the value of a token when swapping, leading to incorrect amounts.
The claim function calls ERC20 transfer without checking the return value, so tokens that return false on failure are treated as successful transfers. Also, tokens like USDT that do not return a boolean cause the transaction to revert, making them unusable in the protocol.
The contract allows the rewards token to be changed, so users can front-run the change to claim old rewards if the new token is less valuable, or let their balance roll into the new token if it is more valuable. This creates an economic attack and prevents the protocol from later issuing a more valuable reward token.
The CTokenMultiOracle contract assumed Compound exchange rates always have 18 decimals, but the actual scaling depends on the underlying token's decimals. This could cause incorrect token pricing.
The TimeLock contract's schedule function reverts when the same target and data are used because the transaction hash is identical, preventing identical transactions from being scheduled multiple times. An attacker could not exploit this, but it caused a functional limitation for legitimate users needing recurring payments.
The setRewards function allows changing the reward token, but unclaimed rewards from previous periods are paid in the new token without adjusting for decimals or value. An attacker could wait for a token with fewer decimals and claim a vastly larger amount.
The contract called the ERC20 transfer function without checking its return value, so a token that returns false on failure would not be detected. An attacker could exploit this to make transfers appear successful when they actually failed, potentially causing loss of funds or incorrect accounting.
The ERC20Rewards contract fails to update the lastUpdated timestamp when totalSupply is zero, causing the first minter to receive all rewards accumulated since the rewards period started. An attacker could exploit this by minting the first token and claiming the entire reward pool.
The auctionInterval state variable in the Cauldron contract is uninitialized and defaults to zero, and its setter does not validate the value. An attacker could repeatedly call grab to prevent auction prices from dropping, causing a livelock where liquidation engines keep re-grabbing vaults without progress.
A user-chosen vault identifier can be front-run by an attacker who creates a vault with the same identifier, causing the victim's batch transaction to fail. This griefing attack prevents legitimate users from opening vaults and interacting with the protocol.
The chi oracle derives its exchange rate from Compound's stored exchange rate, which depends on total borrows and can be pushed up within a single transaction by a large borrow. An attacker could therefore redeem matured fyTokens for more underlying tokens than a normal redemption, paying only gas.
A user can avoid paying borrowing interest after maturity by giving their vault to the Witch contract and then buying all collateral with underlying tokens, because the auction price is calculated without accounting for accrued interest. This allows the user to repay debt without the interest, and could disincentivise timely repayment.
The Witch contract overwrites the stored original vault owner when a second grab occurs, so after the debt is sold the vault cannot be returned to the original owner. An attacker could exploit this to prevent the original owner from recovering their vault.
The JoinFactory contract allows anyone to create a Join contract at a deterministic address using CREATE2, and an attacker can pre-deploy fake Joins for common assets to block the Wand from deploying the real ones. This causes a denial of service for the Wand's deployment process.
The auth modifier in AccessControl.sol checks msg.sig, which reflects the first function called in a transaction, not the current function. Thus, if a public function with auth is called internally from another function, the modifier checks authorisation for the caller function instead of the intended one, potentially allowing unauthorised access if such a call path exists.
The Cauldron contract's stir function caches balances before updating them, so a transfer to self incorrectly adds the transferred amount instead of leaving the balance unchanged. An attacker could duplicate any amount of ink or art, breaking the accounting system.
The access control contract uses four-byte function selectors as role identifiers, so a function whose selector equals the root role's selector would grant root privileges. An attacker who could add a module with such a function could obtain full authorisation for the project.
The Ladle contract allows batched operations but does not enforce implicit constraints on operation order and multiplicity, such as requiring Join Ether to be first and Exit Ether to be last. An attacker or integrator could craft a batch that violates these constraints, potentially causing failed transactions, undefined behaviour, or loss/lock of funds.
The log_2 function in YieldMath.sol used a strict greater-than comparison instead of greater-than-or-equal, causing incorrect rounding in the logarithm calculation. This could lead to a slightly different or unpredictable yield curve in Pool.sol, potentially allowing pools to be slowly drained over time.
The Uniswap oracle contract used a mock with hard-coded prices, so the price could change from the set price and updating via set would be too slow and gas expensive. An attacker could potentially exploit the stale or incorrect price.
YW
Yield Witch v2 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.