The getLockedAmount function in CreditLimitByMedian.sol incorrectly subtracts 1 instead of the requested amount when decreasing locked funds, so users cannot unlock their locked amounts. An attacker could not exploit this directly, but it prevents legitimate users from unlocking funds.
The UnionToken whitelist check in the transfer hook tested the caller rather than the account the tokens were moved from. A single whitelisted account acting as an operator could therefore move tokens for non-whitelisted holders, sidestepping the whitelist.
The interest rate model owner can set an excessively high interest rate that causes the repay function to fail, preventing borrowers from repaying their loans. This could be exploited adversarially to force borrowers to pay more interest later.
The Comptroller's reward calculation uses a manipulable effective stake amount (totalStaked minus totalFrozen), allowing a staker to inflate rewards by adding a tiny stake that is not approved for borrowing. An attacker could drain the Comptroller's reward tokens.
The smart contract's addUToken and addUserManager functions allow duplicate entries to be added to their respective lists. If an admin later tries to delete a market, only the first instance is removed, leaving duplicates and meaning the market is not fully deleted.
The deposit function accepts tokens from unsupported markets and transfers them into the contract, but the withdraw function cannot process those same tokens, so the funds become stuck. An attacker or user could deposit an unsupported token and then be unable to withdraw it, causing a loss of funds.
The smart contracts use an expensive sort function that could run out of gas if the list of stakers becomes too long. An attacker could add themselves as a staker to lengthen the list and cause a denial of service, though a limit of 100 stakers is in place.
The borrow function checks the user's borrowed balance and credit limit before accruing interest, so the checks use stale values. In low-activity markets, a borrower could borrow more than the maximum borrow amount and more than their credit limit.
The getLockedAmount function in CreditLimitByMedian.sol locks the full borrowed amount from each staker who vouched for the borrower, rather than proportionally, so a single loan can lock a multiple of the borrowed amount across all stakers. An attacker could borrow a small amount and cause many stakers' funds to be locked, potentially blocking their tokens.
The rebalance function requires the contract's token balance to be zero after deposits, but because percentages are expressed in basis points with low precision, small amounts of dust remain and the check reverts. This causes rebalancing to fail when the last market does not support the token.
The debtWriteOff function updates totalFrozen before withdrawing unionToken rewards, which can cause the staker to lose rewards if totalStaked equals totalFrozen. An attacker could exploit this by calling debtWriteOff when overdue, resulting in zero rewards.
The contract's updateTotalFrozen and batchUpdateTotalFrozen functions only check that totalStaked is at least totalFrozen before updating, not after. An attacker could potentially break the invariant that totalStaked remains greater than or equal to totalFrozen, compromising system integrity.
The rebalance function attempts to withdraw all tokens from each money market, but in peer-to-peer lending protocols like Compound or Aave, full withdrawal may be impossible when utilisation is high. An attacker could cause rebalancing to fail by creating a liquidity crunch in a single market.
UF
Union Finance contest
Medium
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.