The StableOracleDAI contract calculates the DAI price by averaging a Uniswap pool price quoted as WETH/DAI with a Chainlink feed price quoted as DAI/ETH, which are inverted. This produces an incorrect, higher price, causing users to receive far more USSD tokens than they should when minting.
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.
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.
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.
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.
The rebalance function in the USSD contract can revert due to an underflow when subtracting the amount of base asset received from a swap from the remaining amount to buy, because the swap output may exceed the expected amount. An attacker could potentially trigger this condition, causing the rebalance process to fail.
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.
The protocol allowed minting of USSD stablecoin using collateral at the full oracle price without any fee. An attacker could exploit the difference between the oracle price and the market price to mint USSD and sell it for a profit, potentially draining value from the protocol.
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.
The SellUSSDBuyCollateral function uses a logical OR instead of AND when checking whether a collateral token is DAI, so the condition is always true. This can cause the function to attempt a swap with an empty path for DAI, leading to a revert and potential instability of USSD.
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.
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.
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.
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.
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.
The mintForToken() function lacks a slippage parameter, allowing a frontrunner to manipulate the pool's reserves so that the transferred token appears more valuable, causing users to receive less USSD than expected.
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.
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.
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.
The StableOracle contracts use Chainlink's FeedRegistry without checking the returned price against the aggregator's minPrice and maxPrice. If an asset's price crashes below minPrice, the oracle keeps returning minPrice, so the protocol may mint too many stablecoins or accept overvalued collateral.
The StableOracleWBTC contract prices WBTC using a BTC/USD Chainlink oracle, so if WBTC depegs from BTC the protocol would still value it as BTC. This could lead to borrowing against a devalued asset and accumulating bad debt.
UA
USSD - Autonomous Secure Dollar
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.