# Unable to withdraw Kerosene from vaultmanagerv2::withdraw as it expects a vault.oracle() method which is missing in Kerosene vaults

VaultManagerV2.withdraw calls vault.oracle() which Kerosene vaults lack, so deposited Kerosene can never be withdrawn and is permanently stuck.

- Payout: Audit contest
- Severity: high
- Program: DYAD
- Found by: Circolors
- Disclosed: 2024-06-17
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-04-dyad-findings/issues/830
- Library page: https://bugbountylibrary.com/r/c4%3A2024-04-dyad%3AH-05
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity vuln:business-logic vuln:dos

**Target:** VaultManagerV2.withdraw / Kerosine vaults (Solidity)
**Root cause:** withdraw() unconditionally calls vault.oracle() to price collateral, but BoundedKerosineVault/UnboundedKerosineVault do not implement oracle(), so the call reverts.
**Steps:**
1. Deploy/setup with licenseVaultManager, create alice note, send 10_000 Kerosene to alice
2. alice calls `vaultManager.addKerosene(tokenId, unboundedKerosineVault)`
3. alice approves and calls `vaultManager.deposit(tokenId, unboundedKerosineVault, 10_000 ether)`
4. advance blocks, then call `vaultManager.withdraw(tokenId, unboundedKerosineVault, 10_000 ether, alice)`
5. Observe revert at `UnboundedKerosineVault::oracle()` staticcall
**How found:** Code reading: noticed withdraw() is shared for exogenous and endogenous collateral and expects vault.oracle(), which Kerosene vaults don't expose; confirmed with a Foundry PoC.
**Exploitation:** Not an attack; functional bug. Any user who deposits Kerosene cannot withdraw it — the withdraw call reverts at the oracle() staticcall, locking funds permanently.
**Insight:** When one function serves multiple collateral types, check that every vault implementation satisfies the full interface the function assumes (e.g. oracle()); Kerosene vaults price differently and lack it.

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

**Foundry test withdrawing Kerosene reverts**

```
function testCannotWithdrawKero() public {
    // Set up alice
    licenseVaultManager();
    address alice = makeAddr("alice");
    uint aliceTokenId = sendNote(alice);
    sendKerosene(alice, 10_000 ether);

    // Alice deposits kerosene into the protocol
    vm.startPrank(alice);
    contracts.vaultManager.addKerosene(aliceTokenId, address(contracts.unboundedKerosineVault));
    Kerosine(MAINNET_KEROSENE).approve(address(contracts.vaultManager), 10_000 ether);
    contracts.vaultManager.deposit(aliceTokenId, address(contracts.unboundedKerosineVault), 10_000 ether);
    
    assertEq(ERC20(MAINNET_KEROSENE).balanceOf(alice), 0);

    vm.roll(block.number + 42);
    
    // Alice attempts to withdraw her kerosene but the tx reverts
    contracts.vaultManager.withdraw(aliceTokenId, address(contracts.unboundedKerosineVault), 10_000 ether, alice);
  }
```

