# `RedemptionVaultWIthBUIDL.sol#redeemInstant` will always DoS due to incorrect contract call.

RedemptionVaultWithBUIDL initializer casts the USDC address returned by buidlRedemption.liquidity() as ILiquiditySource, so redeemInstant's token() call always reverts, permanently DoSing instant redemptions.

- Payout: Audit contest
- Severity: medium
- Program: Midas Minter Redeemer
- Found by: 0xpiken
- Disclosed: 2024-08-15
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-midas-minter-redeemer-judging/issues/99
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-midas-minter-redeemer%3AM-1
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:dos vuln:misconfiguration

**Target:** RedemptionVaultWithBUIDL.sol redeemInstant / initialize
**Root cause:** initialize() sets buidlLiquiditySource = ILiquiditySource(buidlRedemption.liquidity()), but liquidity() returns the USDC token address, not a LiquiditySource contract. redeemInstant then calls buidlLiquiditySource.token(), which USDC does not implement, so the call always reverts.
**Steps:**
1. Read initialize(): `buidlLiquiditySource = ILiquiditySource(buidlRedemption.liquidity())`
2. Check on-chain buidlRedemption.liquidity() = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 (USDC)
3. Call redeemInstant(tokenOut, amountMTokenIn, minReceiveAmount) as a greenlisted user
4. Observe revert at `tokenOut = buidlLiquiditySource.token()` since USDC has no token() function
**How found:** Code reading of the initializer against the deployed BUIDL redemption contract on Etherscan: noticed liquidity() returns the USDC token address rather than a LiquiditySource, contradicting the ILiquiditySource cast and the later .token() call.
**Insight:** When a contract is initialized from external protocol addresses, verify each getter's actual return type on-chain (e.g. liquidity() returning a token vs a source contract) rather than trusting the interface cast; a wrong cast only surfaces at the first method call inside a user-facing function.

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

**redeemInstant sets tokenOut from buidlLiquiditySource.token()**

```
// BUG: This will always fail.
@>      tokenOut = buidlLiquiditySource.token();
```

**Initializer sets buidlLiquiditySource from buidlRedemption.liquidity()**

```
@>      buidlRedemption = IRedemption(_buidlRedemption);
        buidlSettlement = ISettlement(buidlRedemption.settlement());
@>      buidlLiquiditySource = ILiquiditySource(buidlRedemption.liquidity());
        buidl = IERC20(buidlRedemption.asset());
```

