# Oracle price should be denominated in DAI instead of USD

USSD oracles price collateral in USD while the peg target is DAI, letting an attacker mint cheap and drain collateral via repeated rebalance cycles when DAI over-pegs.

- Payout: Contest reward
- Severity: high
- Program: USSD
- Credited: T1MOH
- Disclosed: 2023-05-15
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-05-USSD-judging/issues/909
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-05-USSD%3AH-11
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:oracle-manipulation

**Target:** StableOracleWETH / rebalancer oracle pricing
**Root cause:** Oracles return prices denominated in USD, but the rebalancer uses USSD's DAI price (getOwnValuation) as the peg target, so the two units mismatch and the system drives itself off-peg when DAI trades above $1.
**Steps:**
1. Observe DAI over-pegged at 1.1 USD while USSD targets 1:1 with DAI.
2. Mint 1100 USSD using 1000 DAI (worth 1100 USD) at oracle price with no fee.
3. Sell 1100 USSD for 1100 DAI, pushing USSD/DAI to ~0.98.
4. Call `rebalance()` which sells collateral for DAI and buys back USSD to restore 1:1.
5. Repeat steps 1-4 to consume collateral and extract profit.
**How found:** Compared the whitepaper's DAI peg target and getOwnValuation() usage against the oracles' USD denomination, spotting the unit mismatch enabling a mint/sell/rebalance loop.
**Exploitation:** Attacker mints USSD against collateral at USD oracle price, dumps USSD into the DAI pool to depress its DAI price, then triggers rebalance() which spends protocol collateral buying back USSD to restore the DAI peg; repeating drains collateral to the attacker.
**Insight:** When a protocol pegs to asset X but prices collateral via USD oracles, check whether the peg-deviation logic and oracle units agree; a mismatch lets arbitrageurs force the protocol to buy back its own token at a loss.
