JUSD borrow fee rate is less than it should be
The borrow fee rate calculation in JUSD is incorrect, causing the protocol to charge less than the intended fee. An attacker could borrow JUSD at a lower cost than expected.
JOJO Exchange
MediumSherlock
Every publicly disclosed report for JOJO Exchange and what kind of bugs they were.
Newest first. Only what JOJO Exchange chose to make public.
The borrow fee rate calculation in JUSD is incorrect, causing the protocol to charge less than the intended fee. An attacker could borrow JUSD at a lower cost than expected.
JOJO Exchange
MediumThe FlashLoanLiquidate.JOJOFlashLoan function lacks slippage control when swapping USDC, unlike similar functions that use a user-supplied minReceive parameter. This could expose users to sandwich attacks during the swap.
JOJO Exchange
MediumThe handleBadDebt function can be called on the insurance account when its primaryCredit is negative, resetting both primaryCredit and secondaryCredit to zero. This breaks the insurance accounting and could disrupt the protocol's loss coverage.
JOJO Exchange
MediumThe updateImpact function accepts a uint32 parameter, but the impact variable is used in a calculation that can produce values larger than uint32, causing getMarkPrice to revert. An attacker could not directly exploit this, but the adaptor would malfunction and fail to return the price from Uniswap Oracle.
JOJO Exchange
MediumThe price oracle function `quoteAllAvailablePoolsWithTimePeriod` averages tick prices from all Uniswap V3 pools for a pair, including low-liquidity pools that can be manipulated. An attacker could manipulate the price of a token used in a perpetual, leading to arbitrage and potential denial of service of the fallback oracle.
JOJO Exchange
MediumJOJO Exchange
MediumThe JUSDBank contract allows users to repay JUSD debt by transferring JUSD tokens to itself, but it never burns those tokens, so the JUSD supply grows without being backed by collateral. This oversupply could destabilise JUSD and potentially cause a depeg.
JOJO Exchange
MediumThe chainlinkAdaptor contract used a single heartbeat value to check the freshness of two different Chainlink price feeds that have different heartbeat intervals. This could cause the contract to revert most of the time or accept stale price data from one feed.
JOJO Exchange
MediumThe GeneralRepay#repayJUSD function sends any excess USDC to the 'to' address (the repayment recipient) instead of the caller (msg.sender). When repaying on behalf of another user, the caller's excess funds are incorrectly transferred to that user.
JOJO Exchange
MediumThe helper contracts DepositStableCoinToDealer and GeneralRepay make an unprotected external call to any address, allowing an attacker to invoke token contracts directly and transfer tokens from users who have approved the contract. This lets an attacker steal all allowances.
JOJO Exchange
HighThe Subaccount contract's execute function is not marked payable, so it cannot receive Ether. If a caller tries to send a non-zero value, the transaction will always revert.
JOJO Exchange
MediumThe liquidation process transfers leftover collateral to the borrower as USDC, but if the borrower is blacklisted by the USDC contract, that transfer reverts and blocks liquidation. An attacker who is blacklisted could therefore prevent their loan from being liquidated, potentially causing bad debt.
JOJO Exchange
MediumIn over-liquidation, the liquidator can avoid paying the required USDC to the liquidatee by buying the liquidatee's USDC-denominated assets in the callback, which increases the liquidatee's USDC balance and satisfies the balance check. This lets the liquidator acquire collateral without compensating the liquidatee with additional USDC.
JOJO Exchange
MediumThe JUSDBank contract enforces individual collateral borrow caps only during borrow operations, but not during withdrawals. An attacker can use a flash loan to temporarily deposit extra collateral, borrow beyond the cap, then withdraw the extra collateral to repay the flash loan, leaving an over-cap borrow.
JOJO Exchange
Medium