The token transfer function used temporary variables to update balances, so when sender and recipient were the same address, the recipient balance was overwritten with the sender balance plus the amount, effectively doubling the balance. An attacker could repeatedly transfer tokens to themselves to inflate their balance without limit.
The function that updates fee parameters in a liquidity pair contract incorrectly combines the new and old values without shifting the old variable parameters, causing the stored fee parameters to be corrupted. This can make the bin step exceed the maximum allowed, breaking all swap, mint, and flash loan functionality and locking user tokens in the pool.
The volatility fee mechanism in TraderJoe's AMM updates the last swap timestamp even when the time since the last swap is below the filter period, so the volatility reference does not decay. An attacker can perform tiny swaps just under every filter period to keep fees high at negligible cost, making the pair uncompetitive.
The flashloan fee mechanism only pays fees to liquidity providers in the active bin, even though the entire pair's liquidity can be borrowed. An attacker could add liquidity to the active bin just before a flashloan to capture most of the fees, or a borrower could atomically add and remove liquidity to reduce the effective fee they pay.
The LBPair contracts collected less swap fees than specified by their FeeParameters due to incorrect fee calculation logic in SwapHelper.getAmounts and related functions. An attacker could exploit this to pay lower fees, causing a loss of yield for liquidity providers.
The swapAVAXForExactTokens function is supposed to refund any excess AVAX sent, but the refund calculation subtracts the sent amount from the required amount, causing an underflow revert whenever more than the required amount is sent. An attacker could not exploit this for gain, but ordinary users sending extra AVAX would have their transactions fail.
The contract owner has many privileged functions with no timelock, and the owner is assumed to be an externally owned account (EOA). If the owner's private key is stolen, an attacker could use these privileges to cause complete destruction of the project.
The LBToken._burn function calls the _beforeTokenTransfer hook with the wrong arguments, passing address(0) as the from address and the account as the to address. This could break future extensions that rely on the hook to distinguish mints from burns, potentially causing loss of funds or a bricked system.
The fee accounting in the LBPair contract skips updating user debts when the sender or recipient is the pair contract itself, allowing an attacker to mint LP tokens to the pair and then collect fees that were never properly accounted for. By repeating this and exploiting an unchecked block that lets fee totals overflow, the attacker can drain the entire reserves of the pair.
The LBRouter contract's _getAmountsIn function used an incorrect formula when calculating the required input amount for swaps through a JoePair (Uniswap V2 style pair). This caused users to send far more tokens than necessary, with the excess effectively gifted to the pair.
The LBRouter contract calculates output amounts incorrectly for Trader Joe V1 pools when performing chained swaps, using a formula that underestimates the amount out. This causes users to receive fewer tokens than they should, resulting in a loss of funds.
TJ
Trader Joe v2 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.