The deposit function in yVault caches the balance before calling token.transferFrom, allowing a reentrant token to manipulate share minting. An attacker could split deposits and reenter to mint excess shares, then withdraw for a profit and repeat until the vault is drained.
The farming contract's reward accrual subtracts a stored previous balance from the current balance, and if the vault's controller is changed so that the reported balance drops, the subtraction underflows and reverts. Because withdrawals call the same update first, users can no longer withdraw their funds.
The balanceOfJPEG function called the Convex reward pool's earned function without the required address argument, causing it to always revert. This made the entire farming contract unusable, potentially leading to loss of funds.
The LPFarming contract allows the owner to add a staking pool whose staking token is the same as the reward token (jpeg). Because reward calculation uses the contract's balance of the staking token, minting rewards inflates that balance and makes the pool's reward per share lower than intended.
The NFT helper contract lacks a check that the receiver address is not the zero address, allowing the owner to transfer NFTs to the zero address and burn them permanently. An attacker who gains access to the owner address could also burn NFTs.
The farming contract calculates the total LP tokens in a pool by checking its own token balance, which includes tokens sent directly without using the deposit function. This causes rewards to be under-distributed and a portion locked forever when such direct transfers occur.
The harvest function swaps reward tokens to WETH using a hardcoded two-token path, which may not be the most liquid route. An attacker could not directly exploit this, but the strategy could lose most of the reward tokens if the direct pool has low liquidity.
If no liquidity provider deposits at the exact start block of a farming epoch, a portion of the reward tokens remains locked in the contract because the reward calculation only counts from the first deposit block. An attacker cannot directly steal these tokens, but they become permanently stuck, reducing the rewards available to participants.
The controller's strategy migration calls a withdraw function that the strategy may have blacklisted, causing the migration to revert. An attacker cannot directly exploit this, but it prevents the protocol from migrating strategies.
The noContract modifier in yVault and yVaultLPFarming uses isContract() to restrict access to externally owned accounts, but isContract() relies on code length, which is zero during contract construction. An attacker could deploy a contract that calls the protected functions from its constructor, bypassing the modifier.
The interest calculation in NFTVault._calculateAdditionalInterest() performs division before multiplication, so the per-second interest can round down to zero and no interest accrues. For tokens with few decimal places, this understates the interest owed.
The smart contract read the oracle's latest answer without checking whether the price was stale or the round complete. An attacker could exploit a stale or incomplete price to cause the contract to return an incorrect value.
The yVault contract's getPricePerFullShare function hardcodes 1e18 for decimal scaling, assuming the underlying token always has 18 decimals. For tokens with different decimals, such as USDC with 6, the price per share is calculated incorrectly, potentially causing users or the protocol to lose funds.
The smart contracts used Chainlink's deprecated latestAnswer function to fetch asset prices, which could stop working or return stale data. An attacker could exploit stale prices to manipulate the vault, though the report does not detail a specific attack.
The setDebtInterestApr function changes the debt interest rate without first accruing the debt, so the new rate is applied retroactively to the unaccrued period on the next accrue() call. Borrowers can incur more debt than they should.
The first depositor can mint a single share and then donate a large amount to the strategy contract, inflating the share price so that later depositors receive zero shares for their deposits. The attacker can then withdraw both their own and the victims' funds.
A user's locked JPEG tokens could be overwritten when another user finalizes a proposal for the same NFT index, because the lock schedule is stored by NFT index and not by user. The original user then cannot withdraw their locked JPEGs, causing permanent loss of funds.
The project used outdated OpenZeppelin contracts with a known reentrancy vulnerability in the initializer modifier, affecting several upgradeable contracts. An attacker could potentially reenter during initialization, though the exact impact is not detailed in the text.
The yVaultLPFarming contract assumes that the JPEG balance reported by the vault never decreases, but if it does, a subtraction underflow causes deposits and withdrawals to fail. An attacker could exploit this by triggering a farm migration or strategy change that reduces the balance, locking users' funds.
The protocol allows bad debt to keep accruing interest, and when the DAO collects interest it mints new stablecoins. An attacker could exploit this by leaving a position unliquidated, causing unbacked stablecoins to be minted and damaging the stablecoin's authenticity.
JD
JPEG'd 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.