# Premia UnderwriterVault: attacker pool forces underwrite, drains collateral

Premia UnderwriterVault accepted an attacker-deployed pool for its market, forcing it to underwrite a short and letting the attacker drain ~3.62 WBTC via fee-growth manipulation.

- Payout: Real-world hack
- Severity: critical
- Program: Premia
- Analysis by: DeFiHackLabs
- Disclosed: 2026-11-01
- Write-up quality: 9/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2026-11/Premia_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20261101-premia
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:critical tech:evm tech:solidity vuln:access-control vuln:accounting-error vuln:business-logic vuln:flash-loan vuln:oracle-manipulation

**Target:** Premia v3 UnderwriterVault / PoolFactory on Arbitrum
**Root cause:** _getPoolAddress fixes base/quote/oracle to the vault market but takes strike and maturity from the caller, so an attacker-deployed pool for that market is accepted; deployPool and UnderwriterVault.trade are both permissionless, so a buy forces the vault to writeFrom the attacker pool posting full collateral for a tiny premium.
**Steps:**
1. Fork Arbitrum one block before setup tx; fresh EOA deploys a pool for the vault's market with attacker-chosen strike/maturity via permissionless `deployPool`.
2. Seed LC range orders at [0.098,0.099], [0.001,0.005], [0.001,0.002]; `transferPosition` a slice of [0.001,0.002] to two more operators so three share that tick.
3. Wait past Premia's 60s WITHDRAWAL_DELAY.
4. Take a real 0.9 WBTC Balancer flash loan as working capital.
5. Call permissionless `UnderwriterVault.trade(buy 3.75)`, forcing the vault to underwrite and post 3.7628 WBTC into the attacker pool for ~0.117 WBTC premium.
6. Deposit attacker LC orders at [0.001,0.002] and [0.002,0.003] (size 187.1 each).
7. Eight wash round-trips (sell 1e-4 then buy 1e-4) walk market price across the tick; three operators claim/deposit/withdraw dust orders at [0.001,0.002].
8. `pool.claim()` on attacker's [0.001,0.002] order pays ~4.4904 WBTC; repay flash loan.
**Exploitation:** Attacker deploys a pool for the victim vault's market with chosen strike/maturity, seeds LC range orders across three operators at one tick, then uses one permissionless vault.trade(buy) to force the vault to post 3.6441 WBTC (97% of vault A) as short collateral. Wash trades walk the market price across the tick, corrupting per-tick fee growth so claim() pays the attacker's range order 4.4904 WBTC. After own LP collateral, premium, and repaying a 0.9 WBTC Balancer flash loan, nets 3.62484445 WBTC.
**Escalation:** Campaign across three vaults totaling ~400.5K USD; PoC reproduces the WBTC vault leg.
**Insight:** When a vault resolves its pool by only part of the PoolKey (base/quote/oracle) and leaves strike/maturity caller-controlled, anyone can deploy a matching pool and force the vault to underwrite against it; combine with permissionless trade() and per-tick fee-growth accounting to convert forced collateral into claimable fees via wash-trade price walking.

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

**Forced-underwrite drain test with flash loan**

```
function testExploit() public {
        uint256 vaultBefore = WBTC.balanceOf(address(VAULT_WBTC));
        uint256 atkBefore = WBTC.balanceOf(address(atk));
        emit log_named_decimal_uint("Vault WBTC balance (pre)", vaultBefore, 8);

        atk.setupLeg();                 // setup tx
        skip(120);                      // > WITHDRAWAL_DELAY (60s) between the setup and drain txs
        atk.drainLeg();                 // drain tx (forced underwrite + extraction via flash loan)
```

**Attacker contract setup and drain legs**

```
contract Premia_exp is Test {
    IERC20 constant WBTC = IERC20(0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f);
    IVault constant VAULT_WBTC = IVault(0x45dF5EA836A15B561937Ae8373ab9eE984aea531);
    uint256 constant LONG = 1; // PoolStorage.LONG

    Attacker atk;

    function setUp() public {
        vm.createSelectFork("arbitrum", 520166284); // one block before the setup tx
        atk = new Attacker();
```

