# Cds depositor profit is never taxed as the tax is only applied on the option fees

CDS depositor profit from price appreciation is never taxed because profit is computed only on option-fee difference, letting depositors avoid the 10% tax.

- Payout: Audit contest
- Severity: high
- Program: Autonomint
- Found by: 0x37
- Disclosed: 2024-11-26
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-11-autonomint-judging/issues/744
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-11-autonomint%3AH-14
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** CDS withdrawal profit calculation in CDSLib.sol
**Root cause:** Profit is calculated as the difference between deposited and returned amounts, which only differ by option fees, ignoring upside from price increase up to strike.
**Steps:**
1. Deposit into CDS as depositor.
2. Price increases ~5% since deposit.
3. Withdraw from CDS; profit computed in `CDSLib.sol:801` only reflects option-fee delta.
4. No 10% tax is applied to the price-appreciation profit.
**How found:** Code review of profit calculation in CDSLib.sol:801 versus upside accrual in borrowing.sol:665-667 and CDS.sol:351-352.
**Exploitation:** Depositor waits for price appreciation then withdraws, receiving upside untaxed, depriving protocol of 10% tax revenue.
**Insight:** When a protocol taxes 'profit', verify the profit variable actually includes all yield sources (price upside, fees, rewards), not just one component; compare the profit formula against every place value accrues.

