The compensate() function lacks a minimum-amount parameter, so a borrower may pay an unexpected fragmentation fee if another transaction changes the credit position before their call executes. A malicious user could front-run to cause this fee.
The fragmentation fee is not charged when a user compensates part of their debt by creating a new credit position, because the code calculates the remaining credit as zero. An attacker could split their credit position without paying the intended fee.
The executeBuyCreditMarket function returns the gross cash amount rather than the net amount after fees, so the liquidity check overestimates the required variable pool balance. This could cause a buy order to revert unnecessarily when the pool has enough liquidity for the actual net transfer.
The withdraw function incorrectly applies a collateral ratio check to borrowed tokens, which do not affect the collateral ratio. This can prevent users from withdrawing their borrowed tokens if a slight price fluctuation causes the check to fail, even though they are far from liquidation.
The protocol's fee calculation for selling credit for a specific cash amount was incorrect, resulting in lower swap fees collected than intended. An attacker could exploit this to pay less in fees when selling credit.
A race condition between a borrower's repay transaction and a keeper's liquidateWithReplacement transaction can cause the borrower to repay another borrower's debt. The borrower ends up paying more than double their future value because the debt position's borrower is changed before their repay executes.
The liquidation function incorrectly calculates the collateral remainder cap by using the full liquidation collateral ratio instead of the excess over 100%, causing users with higher collateral ratios to lose more collateral to the protocol. An attacker could exploit this to unfairly penalise users with higher collateral ratios, discouraging healthy collateralisation.
The liquidator reward in the liquidation function was computed by multiplying a USDC-denominated future value by the reward percentage, mixing token decimals, so the reward came out roughly a trillion times too small. Liquidators therefore had little incentive to liquidate unhealthy positions, threatening the protocol's solvency.
The multicall function used the contract's own borrowAToken balance instead of the total supply when checking the borrowAToken cap, so the cap check was skipped. An attacker could deposit more borrowAToken than the cap allows, breaking the invariant that borrowAToken supply increase must not exceed debtToken supply decrease.
Size's liquidity check queries the Aave pool contract's balance instead of the aToken contract's balance, so on a live Aave deployment the check always fails because the pool holds no liquidity. This causes borrow and lend operations to revert, bricking the protocol's main functions.
The validation in buyCreditMarket and sellCreditMarket compared the user's cash amount directly against the minimum credit threshold, so users could not buy or sell the minimum allowed credit when using exactAmountIn. This caused valid transactions to revert with CREDIT_LOWER_THAN_MINIMUM_CREDIT.
The sellCreditMarket() and compensate() functions did not check whether a credit position was marked as not for sale, allowing its owner to sell or use it to compensate debt. A buyer could be forced to acquire a not-for-sale credit position that they could not resell, potentially causing a loss.
A borrower can force the sale of a lender's credit position even when the lender has set it as not for sale, by using the Compensate function with a reserved ID to create a new credit position that is for sale. This allows the borrower to sell the lender's credit at a profit if market conditions are favourable, though the lender does not suffer a direct loss.
The LiquidateWithReplacement function does not charge a swap fee to the borrower when it buys credit, unlike the equivalent BuyCreditMarket function. This means borrowers whose credit is purchased via liquidation avoid a fee that others pay, creating an unfair advantage.
The protocol checks that the Aave pool has enough liquidity when a loan is created but does not reserve or remove that liquidity. An attacker can front-run a loan by depositing liquidity and back-run by removing it, leaving the borrower unable to withdraw their borrowed funds until liquidity returns.
The compensate function reverts if the borrower is still underwater after a single call, preventing a borrower from using multiple healthy credit positions to gradually improve their collateral ratio. An attacker could not exploit this directly, but the borrower is forced to sell credit positions quickly, potentially at a bad price, to avoid liquidation.
The seller can decrypt all bids before revealing their private key, so they can see the bids and decide not to honour the auction or place their own bid to raise the clearing price. This means the reserve price is not respected and bidders may pay more than expected.
The contract uses Solmate's SafeTransferLib, which does not check that the token address has code, so a transfer from an empty address succeeds silently without crediting tokens. An attacker could exploit this to create a honeypot auction and steal a victim's funds once the real token is deployed.
The SizeSealed contract does not correctly handle ERC20 tokens whose balances change unexpectedly, such as fee-on-transfer or rebasing tokens. For base tokens, fee-on-transfer tokens make the contract unusable, and rebasing tokens can lock funds; for quote tokens, fee-on-transfer tokens can cause a denial of service or fund loss, and rebasing tokens can lock funds.
A bidder could submit an encrypted bid whose decrypted base amount is zero, causing the finalize function to divide by zero and revert. This makes the auction impossible to finalize, denying service to the seller and other participants.
Bids in a sealed-bid auction contract were not validated for their public key, commitment or encrypted base amount, so a bidder could submit bids that the finalize loop silently skips. An attacker could fill all 1000 bid slots with such invalid bids and prevent the auction from being finalised, denying service to the seller and honest bidders.
The auction finalisation sorted bids by a rounded price ratio, so two bids with slightly different true ratios could be treated as equal. The seller could then be forced to accept a lower total quote amount than a better bid would have provided.
The createAuction function in the SizeSealed contract lacks re-entrancy protection. An attacker can use a taxed ERC777 token as the base token and, via a malicious ERC777 sender hook, re-enter createAuction to create multiple auctions whose total base amount exceeds the tokens actually received, allowing them to later withdraw more funds from the contract's global pool.
The auction contract uses the user-controlled lowestQuote value to determine whether an auction has been finalised. An attacker can set lowestQuote to its maximum value during finalisation, causing the contract to treat the auction as unfinalised and allowing both the seller and bidder to cancel and recover their funds, resulting in a profit.
The auction contract calculates the seller's payment using a single rounding of the clearing price, while each bidder's refund is calculated with separate roundings, so the seller can receive more quote tokens than the bidders collectively paid. This leaves the contract short of funds, causing the last bidder's withdrawal to fail.
SI
Size
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.