swap_gblin_to_usdc_jit
Redeems GBLIN positions into exactly the USDC needed for an x402 invoice or other USDC obligation, returning ready-to-broadcast calldata for the approval, zap sale and WETH-to-USDC swap.
Instructions
Returns ready-to-broadcast calldata that redeems exactly the USDC requested from a GBLIN position, just in time for an x402 invoice or any other USDC obligation. Three sequential transactions: (1) approve the shares to the GBLIN Zap, (2) GBLINZap.sellGBLINForEth, which redeems in kind and sells every leg for ETH, all or nothing, (3) a Uniswap WETH->USDC swap that spends only the guaranteed ETH minimum and still returns at least the requested USDC. EOAs sign three times; ERC-4337 and EIP-7702 wallets can batch them into one operation. Every step carries a non-zero minimum; ETH above the minimum stays in the wallet. Free. A redemption carries no protocol fee; the costs are the Zap's swaps and gas.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usdc_needed | Yes | USDC amount, decimal string. | |
| wallet_address | Yes | Agent's 0x address (for cooldown check). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | Transactions to send in order. | |
| action | Yes | Always sequential_txs: send the steps one after the other. | |
| params | No | ||
| expected | Yes | Shares spent, ETH and USDC expected, and the minimums applied. | |
| gas_hint | Yes | Gas limit to set on the Zap step. | |
| compatibility | No | ||
| gas_hint_note | No |