The fee transfer to the creditor during loan repayment reverts if the creditor is blacklisted for the hold token, preventing all repayments and forcing the borrower to default. Lenders can only recover funds after default and emergency closure.
A malicious lender can burn their LP NFT, causing ownerOf to revert for that token ID. Since all repayment and emergency withdrawal methods query ownerOf for every loan, the entire position becomes permanently locked.
The repayment function lacks slippage protection because it derives the minimum output from a manipulable on-chain price and then calculates slippage parameters dynamically from that same price. An attacker could front-run a repayment to worsen the swap rate, reducing the repayer's profit.
In the takeOverDebt function, the old borrowing key was used instead of the newly generated one when associating old loans with the new borrowing. This could cause the wrong borrowing key to be recorded for the old loans' token IDs, leading to incorrect state.
The contract uses inline assembly to write a value into a memory buffer without checking for overflow in the index calculation. An attacker could craft a malicious token and pool to control the value and index, causing the write to overwrite the function selector and call unintended functions.
The contract stores borrowing keys in an array per LP token, and every repay, liquidation, or takeover iterates over this array. An attacker can create many tiny borrows to make the array very long, so later legitimate transactions run out of gas and funds are locked.
The borrowingCollateral calculation subtracts borrowedAmount from holdTokenBalance, which can underflow when the position's liquidity is in the current tick range because holdTokenBalance includes swapped sale tokens and exceeds borrowedAmount. This causes transactions to revert, making many positions unavailable to borrowers.
The contract computes Uniswap v3 pool addresses using a method that does not match ZkSync Era's address derivation, so the callback check fails and swaps revert. This could prevent borrowers and liquidators from closing positions if the custom router is removed, leading to a short-term denial of service and extra fees.
A borrower who repays shortly after borrowing may not receive their collateral back because the repayment logic fails to add the collateral to the amount transferred from the Vault. The collateral remains stuck in the Vault, causing a loss of funds for the borrower.
The repay() function in emergency mode computes a percentage using the remaining borrowed amount instead of the initial amount, which can make the percentage larger than accLoanRatePerSeconds and cause an underflow. This reverts the call, preventing the lender from recovering their tokens via emergency repayment.
The takeOverDebt() function lacked a reentrancy guard, allowing an attacker to reenter it during a liquidation repayment via a malicious token. This let the attacker duplicate a liquidatable position, causing the vault to repay liquidity providers twice and draining funds.
The fee calculation in the contract uses checked arithmetic, but the original Uniswap V3 code relies on unchecked underflow/overflow to correctly compute fees. This could cause some user transactions to revert.
The `_checkpositionsRange` function divides a signed integer range by two before a modulo check, so the fractional part is truncated and the comparison can be wrong. This could let an invalid positions range pass validation.
The protocol's deposit, withdraw, and trade functions lack a deadline check, so transactions can be executed long after submission. An attacker or delayed transaction could result in trades at suboptimal prices, harming users.
The fee accounting in the Multipool contract's deposit and withdraw functions incorrectly calculates protocol fees by subtracting the position's previously accrued fees, so an attacker can mint tiny amounts to accrue fees beforehand and cause the protocol to lose most of its fees.
The rebalanceAll function withdraws and deposits liquidity without slippage protection, exposing LPs to losses from price movements during the transaction. An attacker could exploit this by manipulating prices to cause the protocol to receive less liquidity than expected.
The contract hardcoded a 500 fee tier when reading tick cumulatives from a Uniswap V3 pool, so for tokens whose liquidity sits in other fee tiers the time-weighted price data was wrong. That produced an incorrect slippage check, raising the risk that a rebalance transaction would execute at a bad price.
The `_estimateWithdrawalLp` function calculates LP shares using an average of token ratios, which can return an inflated value when the underlying Uniswap V3 pool reserves fluctuate. This can cause underflow reverts, preventing users from depositing or withdrawing, or lead to excessive LP withdrawals.
The deposit function in a multipool contract lacks a minimum LP token output parameter, only checking minimum token amounts. An attacker could front-run a deposit by manipulating prices across multiple fee tiers to inflate reserves, causing the victim to receive fewer LP tokens and lose funds.
RW
Real Wagmi #2
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.