Skip to content

Code4rena

Sublime contest

Every publicly disclosed report for Sublime contest and what kind of bugs they were.

disclosed reports
25
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find Sublime contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Sublime contest chose to make public.

Audit finding

Interest accrued could be zero for small decimal tokens

The 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

Medium
Business logic

CreditLine.liquidate doesn’t transfer borrowed ETH to a lender

The 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

Medium
Business logic

Ether can be locked in the PoolFactory contract without a way to retrieve it

The 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

Medium
Business logic

Collateral can be deposited in a finished pool

The 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

Medium
Business logic

Extension voting threshold check needs to rerun on each transfer

The 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

Medium
Business logic

NoYield.sol Tokens with fee on transfer are not supported

The 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

Medium
Smart contracts

Missing approve(0)

The 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

Medium
Business logic

Wrong returns of SavingsAccountUtil.depositFromSavingsAccount() can cause fund loss

The 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

High
Access control

Possibility to drain SavingsAccount contract assets

The 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

High
Audit finding

PriceOracle Does Not Filter Price Feed Outliers

The 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

High
Business logic

Wrong implementation of NoYield.sol#emergencyWithdraw()

The 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

High
Business logic

In CreditLine#_borrowTokensToLiquidate , oracle is used wrong way

In 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

High
Smart contracts

AaveYield: Misspelled external function name making functions fail

Three 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

Medium
Access control

Unlinked address can link immediately again

The 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

Medium
DoS

denial of service

When 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

High
Business logic

Yearn token <> shares conversion decimal issue

The 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

High
Business logic

Aave’s share tokens are rebasing breaking current strategy code

The 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

High
Business logic

SavingsAccount withdrawAll and switchStrategy can freeze user funds by ignoring possible strategy liquidity issues

The 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

High
Business logic

Unable To Call emergencyWithdraw ETH in NoYield Contract

The 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