Skip to content

Sherlock

USSD - Autonomous Secure Dollar

Every publicly disclosed report for USSD - Autonomous Secure Dollar and what kind of bugs they were.

disclosed reports
22
most reported class
Business logic
bug classes found
5
first disclosure
2023
Find USSD - Autonomous Secure Dollar on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what USSD - Autonomous Secure Dollar chose to make public.

Smart contracts

Wrong computation of the amountToSellUnit variable

The rebalancer contract computed the amount of collateral to sell during a peg-down recovery with an extra 1e18 scaling factor, so the figure was far smaller than intended. An attacker or ordinary user could then trigger a recovery that sells the wrong quantity of collateral, leaving the peg correction ineffective.

USSD - Autonomous Secure Dollar

High
Smart contracts

The price from `StableOracleDAI` is returned with the incorrect number of decimals

The StableOracleDAI contract incorrectly assumes the Chainlink DAI/ETH price feed returns 8 decimals, but it actually returns 18 decimals, causing the returned price to have 28 decimals instead of 18. This drastically overvalues DAI, allowing users to mint 1e10 times more USSD than intended.

USSD - Autonomous Secure Dollar

High
Business logic

Uniswap v3 pool token balance proportion does not necessarily correspond to the price, and it is easy to manipulate

The getSupplyProportion() function in the USSD rebalancer calculates the proportion of Uniswap v3 pool token balances, but this proportion does not necessarily correspond to the price, and it can be easily manipulated. An attacker could manipulate the pool balances to cause rebalance() to malfunction or to sell a significantly larger amount of collateral assets than intended.

USSD - Autonomous Secure Dollar

High
Audit finding

Wrong Oracle feed addresses

Several oracle contracts used incorrect or zero addresses for price feeds, so the system would read wrong prices for collateral assets. An attacker could potentially exploit these wrong prices to manipulate the protocol.

USSD - Autonomous Secure Dollar

High
Business logic

Inaccurate collateral factor calculation due to missing collateral asset

The collateralFactor() function in the USSD smart contract fails to account for collateral assets that have been removed from the collateral list, leading to an inaccurate calculation of the protocol's collateral factor. This can cause the reported collateral factor to be lower than it should be, potentially affecting risk assessment and stability.

USSD - Autonomous Secure Dollar

Medium
Audit finding

`BuyUSSDSellCollateral()` always sells 0 amount if need to sell part of collateral

The BuyUSSDSellCollateral function calculates the amount of collateral to sell using a formula that rounds down to zero when only part of the collateral needs to be sold. As a result, the protocol sells zero collateral and cannot perform the algorithmic peg between USSD and DAI.

USSD - Autonomous Secure Dollar

Medium
Access control

Lack of access control for `mintRebalancer()` and `burnRebalancer()`

Two token functions that should only be callable by the rebalancer contract had no access control, so anyone could mint or burn tokens held by the contract itself. An attacker could mint a near-maximum amount, blocking further minting and distorting the supply figures the rebalancer relies on.

USSD - Autonomous Secure Dollar

High
Business logic

Inconsistency handling of DAI as collateral in the BuyUSSDSellCollateral function

The rebalancing function in the USSD contract fails to handle DAI as collateral when its value is less than the amount needed but above a threshold, because it attempts to sell DAI without a sell path, causing the transaction to revert. This prevents peg-down recovery rebalancing from completing.

USSD - Autonomous Secure Dollar

Medium
Audit finding

Oracle price should be denominated in DAI instead of USD

The protocol's oracles return prices in USD, but the system aims to maintain a peg to DAI. When DAI is over-pegged, an attacker can mint USSD at the USD price, sell it for DAI, and trigger rebalancing to extract profit, draining collateral.

USSD - Autonomous Secure Dollar

High
DoS

If collateral factor is high enough, flutter ends up being out of bounds

The SellUSSDBuyCollateral function in the USSDRebalancer contract calculates a flutter index that can equal the length of the flutterRatios array when the collateral factor exceeds all ratios. This causes an out-of-bounds access when indexing the collateral ratios array, making the function revert and blocking rebalancing.

USSD - Autonomous Secure Dollar

Medium
Audit finding

Price calculation susceptible to flashloan exploits

The contract uses the instantaneous price from Uniswap's slot0 instead of a time-weighted average price (TWAP) to value USSD. An attacker can take a flash loan to manipulate the pool price and trigger a rebalance, potentially draining collateral through arbitrage.

USSD - Autonomous Secure Dollar

High
Business logic

The getOwnValuation() function contains errors in the price calculation

The getOwnValuation() function in USSDRebalancer calculates the pool price incorrectly when USSD is one of the tokens, due to wrong decimal scaling in the sqrtPriceX96 formula. This produces inaccurate asset valuations that could affect trading and liquidity decisions.

USSD - Autonomous Secure Dollar

High
Audit finding

Calls to Oracles don't check for stale prices

The oracle price feed calls in several contracts do not check whether the returned price is stale. An attacker could exploit a stale price to cause incorrect calculations in key functions of the USSD and USSDRebalancer contracts.

USSD - Autonomous Secure Dollar

Medium
Business logic

Lack of Redeem Feature

The smart contract implementation lacks a redeem function that the whitepaper says should allow users to redeem USSD for DAI. This missing feature could prevent the protocol from reducing supply and recovering the stablecoin's price in negative scenarios.

USSD - Autonomous Secure Dollar

Medium