The depeg trigger condition in the smart contract used a strict less-than comparison, so a depeg event could be triggered when the asset price was exactly equal to the strike price, contrary to the documented requirement that it be below. An attacker could call the trigger function at the equal price to cause the vaults to swap assets prematurely.
The smart contract calculates the depeg ratio using the lower of the two asset prices, so a pegged asset trading above its underlying is treated as a depeg event. This means risk users (sellers of insurance) are required to pay out even though the pegged asset is worth more, which is not a real depeg.
The PegOracle design treats both assets in a pair symmetrically, so a depeg event can be falsely triggered if the underlying asset (e.g., WBTC or USDC) deviates from its canonical value, even when the tracked asset (e.g., renBTC or MIM) remains stable. An attacker could exploit this to cause incorrect depeg events, potentially leading to indirect loss of assets.
The StakingRewards contract inherits a pausable base but never exposes any external function to pause or unpause it, so the whenNotPaused modifier on stake has no effect. An attacker could continue staking even when the owner intends to pause the contract.
The reward rate per second is calculated with rounding down, which over a long duration can cause a large portion of intended rewards to remain undistributed. An attacker could exploit this to cause stakers to lose a significant amount of rewards.
The notifyRewardAmount function only checks that the contract's current reward token balance covers the new reward rate, ignoring rewards already owed to users but not yet withdrawn. If the rewards distributor calls notifyRewardAmount again without sending new tokens, the contract can become insolvent, causing users' getReward calls to fail.
After a vault epoch ends, its tokens become worthless, but the associated StakingRewards contract may still allow staking those tokens to earn rewards. An attacker could stake expired tokens and receive rewards intended for future valid epochs.
The admin can change the controller address of any vault at any time, and the new controller can call sendTokens to transfer all assets out of the vault. This allows the admin to withdraw all user funds from both risk and insure vaults.
The withdraw functions in the vault contracts check that the receiver is approved by the owner, rather than the caller. This allows anyone to trigger a withdrawal for an owner who has approved any address, potentially causing the owner to lose their payout if timed just before the epoch ends.
The Vault contract only lets users withdraw after an epoch ends, with no way to withdraw during the period between depositing and the epoch start. A user whose position becomes unfavourable before the epoch begins is therefore stuck with no way to exit.
The withdrawal function charges a fee on the entire collateral deposited by risk users, not just on premiums and payouts. This could discourage risk users from providing collateral because fees may exceed their profits.
The withdraw function calculates the entitled amount by dividing before multiplying, which can round down to zero for small amounts. An attacker could call withdraw with a positive amount and receive nothing, losing their shares.
The recoverERC20 function only prevents the owner from withdrawing the staking token, but not the rewards token. A malicious owner could therefore sweep all reward tokens, depriving depositors of their rewards.
The StakingRewards contract's notifyRewardAmount function recalculates the reward rate by spreading the remaining rewards plus any new deposit over a fresh rewardsDuration period. A malicious actor could call notifyRewardAmount with zero rewards to repeatedly dilute the reward rate and drag out rewards for all stakers.
The oracle contract's timestamp check only verifies that the timestamp is not zero, so it accepts prices that are years old. An attacker could exploit this to use outdated prices, potentially causing economic losses.
The VaultFactory contract allows an admin to set a new Controller for a market without verifying that the new Controller's VaultFactory address matches the current VaultFactory. This mismatch causes the Controller to be unable to locate the market's vaults, so functions like triggerDepeg and triggerEndEpoch fail, resulting in a loss of functionality.
The vault and controller contracts do not account for tokens that charge a fee on transfer, so the vault mints more shares than the assets received and later attempts to send the full balance fail. This can leave the last users unable to withdraw and prevent the end of an epoch from being triggered.
The protocol stores oracles keyed only by a single token rather than by the token pair, so when a new pair is created with a different oracle, the assignment is silently skipped and the old oracle is reused. This can produce incorrect price comparisons for the new pair, leading to wrong results if the assets move relative to each other.
Rewards distributed during periods with no deposits are not rolled over and remain stuck in the contract. An attacker could potentially withdraw these stuck rewards if the sweeper function is available, but the report does not claim direct theft.
The Vault contract does not fully implement the EIP-4626 tokenised vault standard: it lacks the mint and redeem functions, its max* functions do not return zero when deposits or withdrawals are disabled, previewDeposit ignores fees, and totalAssets omits assets paid out during a depeg or at epoch end. Other protocols integrating with Y2K may wrongly assume compliance, which could cause integration problems and potentially loss of funds.
If users deposit in only one of the two vaults (hedge or risk) and the counterparty vault has no deposits, then after a depeg event the withdraw function returns zero entitled amount, causing users to lose their entire deposit. The deposits are transferred to the empty counterparty vault, and the user receives nothing.
The oracle contract incorrectly scales price feed values based on the feed's decimals, assuming 8 decimals. For feeds with other decimal counts, the returned price is wrong by orders of magnitude or zero, which could break depeg detection and market creation.
YF
Y2k Finance contest
High
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.