Lack of access control allow anyone to withdrawInterest() for any lender
Sublime contest
MediumCode4rena
Every publicly disclosed report for Sublime contest and what kind of bugs they were.
Newest first. Only what Sublime contest chose to make public.
Sublime contest
MediumThe interest calculation in PooledCreditLine.sol can round down to zero for tokens with few decimals when the principal is small and the time elapsed is short. An attacker could repeatedly borrow and repay tiny amounts to avoid paying any interest.
Sublime contest
MediumThe LenderPool's start function could be called by anyone at a pre-announced time, depositing the entire pool into a yield strategy. An attacker could manipulate the strategy's exchange rate beforehand to cause the deposit to occur at an unfavourable rate, potentially leaking value.
Sublime contest
MediumThe start() function in the LenderPool contract uses IERC20.transfer to send a fee, which will revert for tokens like USDT that do not return a boolean value. This prevents the credit line from starting when such tokens are used as the borrowed asset.
Sublime contest
MediumThe terminate function in PooledCreditLine calculates a principal withdrawal amount in borrowAsset units but then passes it to withdrawShares as if it were a share amount. This mismatch likely causes termination to fail or withdraw an incorrect number of shares.
Sublime contest
HighThe principal withdrawable amount is calculated incorrectly when a start fee reduces the borrow limit, causing the calculation to exceed the actual available principal. This leads to failed withdrawals for lenders.
Sublime contest
HighThe CreditLine.liquidate function does not transfer the borrowed ETH to the lender when autoLiquidation is enabled; instead, the ETH remains in the contract. An attacker could exploit this by liquidating a loan and causing the lender to lose the expected repayment, though the funds are not permanently lost.
Sublime contest
MediumThe PoolFactory contract's createPool function allows a borrower to send Ether while specifying a non-zero ERC20 collateral token address, causing the Ether to be locked in the contract with no way to retrieve it. An attacker could not directly steal funds, but a user error could permanently lock Ether.
Sublime contest
MediumThe depositCollateral function does not check the pool's status, so collateral can be deposited into a finished loan. This can happen by mistake and all funds will be lost.
Sublime contest
MediumThe Extension contract updates vote counts on token transfers but does not re-evaluate whether the extension's voting threshold has been met after the transfer. This can prevent an extension from being granted even when the new token holder's votes would push total support over the threshold.
Sublime contest
MediumThe contract assumes the full transfer amount is received when locking tokens, but fee-on-transfer tokens reduce the actual amount. Later users may be unable to withdraw their tokens because the contract's balance is insufficient.
Sublime contest
MediumThe smart contract calls the ERC20 approve function without first resetting the allowance to zero. For tokens like USDT that require this, transactions will revert, affecting protocol availability.
Sublime contest
MediumThe function `SavingsAccountUtil.depositFromSavingsAccount()` returns the input `_amount` instead of the actual shares received from the transfer, so when the price per share is not 1, the recorded shares are incorrect. This can cause a user to lose funds because the pool records more collateral than actually deposited, preventing cancellation and potentially causing liquidation failures.
Sublime contest
HighThe SavingsAccount contract's switchStrategy function does not validate that the current strategy is a registered strategy, allowing an attacker to supply a malicious contract that returns arbitrary values. This could let the attacker withdraw tokens held by the contract and lock them in a new strategy, crediting shares to the attacker.
Sublime contest
HighThe price oracle returns whatever value Chainlink supplies without checking it against any other source or historical range. If the feed were manipulated or malfunctioned, users would receive a malformed price, which could cause unintended liquidations or other economic harm.
Sublime contest
HighThe emergencyWithdraw function transfers zero tokens because the received variable is used before being assigned. As a result, the emergency withdrawal fails and assets remain stuck in the contract.
Sublime contest
HighIn the liquidation path of the CreditLine contract, the price oracle was queried with the borrow asset and collateral asset in the wrong order, so the ratio returned was inverted relative to what the calculation expected. A liquidator or lender could therefore lose or gain funds during liquidation because of the miscalculated price.
Sublime contest
HighThe liquidate function only restricts the caller to the lender when autoLiquidation is true, so when autoLiquidation is false anyone can liquidate and receive all collateral without supplying the required borrow tokens. This causes a total loss of collateral for the lender.
Sublime contest
HighThree functions in the AaveYield contract call a misspelled external function name that does not exist on the WETH gateway contract, so the calls fail with a fallback error. As a result, the affected deposit, withdraw and liquidity-token functions could not work as intended.
Sublime contest
MediumThe unlinkAddress function deletes the linked address record but does not clear the pending link request, so the unlinked address can immediately call linkAddress again and become linked without the master's permission. An attacker who controls a previously unlinked address could re-link to the master without approval.
Sublime contest
MediumWhen the borrow token is ether, calling withdrawLiquidity causes the contract to transfer msg.value (the amount sent with the call) instead of the intended liquidity amount, while still burning the user's liquidity tokens. As a result, users cannot recover their funds.
Sublime contest
HighThe YearnYield strategy incorrectly converts shares to tokens by dividing by 1e18 instead of the vault's decimal precision. For tokens with non-18 decimals, this causes incorrect payouts, leading to losses for either the protocol or the user.
Sublime contest
HighThe Aave yield strategy caches a static share amount for each user, but the total share supply used in `getTokensForShares` is rebasing. As a result, users do not receive accrued interest, and collateral is undervalued, potentially causing early liquidations.
Sublime contest
HighThe withdrawAll and switchStrategy functions in SavingsAccount assume that a single withdrawal from the underlying yield strategy will return the full requested amount. If the strategy has liquidity issues, the functions still delete the user's accounting entry or subtract the full share amount, leaving the remaining funds frozen in the system.
Sublime contest
HighThe emergencyWithdraw function in the NoYield contract cannot withdraw ETH because it treats ETH as a zero address and calls balanceOf on that address, which reverts. As a result, the owner cannot recover ETH in an emergency, leaving funds stuck.
Sublime contest
High