Cash-and-Carry Position Closer
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Cash-and-Carry Position Closer is a non-custodial tool that unwinds existing basis positions between spot and futures markets. It reads futures contract state, spot market pricing, oracle data, funding rates, expiration timestamps, collateral requirements, and open position status to determine the optimal unwind parameters. With a single transaction, it calls closeCashAndCarry(), unwindCarryTrade(), or settlePosition() on the target futures contract, simultaneously closing both the spot position and the corresponding futures position to capture any remaining basis spread. The tool supports both physical delivery and cash-settled contracts, and automatically handles the collateral return and position size based on the user's open position or specified close amount.
HOW TO USE
1. Connect your wallet (EVM-compatible).
2. Paste the futures contract address and spot token address for your open position.
3. Enter your position ID (if required by the contract) and expiration timestamp.
4. Optionally specify a partial close size—leave blank to close the entire position.
5. Review the current basis spread, position status, and closing preview.
6. Click "close cash-and-carry position" and confirm the transaction in your wallet.
The tool checks whether your position is still open and fetches current basis spread from on-chain price feeds before execution. After the transaction confirms, your position is unwound and collateral returned—all on-chain, no centralized custody.
TECHNICAL MECHANISM: MULTI-FUNCTION FALLBACK WITH STATE VERIFICATION
Unlike simple transaction builders that assume a single function signature, this tool implements a multi-function fallback strategy. It first attempts closeCashAndCarry(), then falls back to unwindCarryTrade() or settlePosition() if the primary method fails—automatically adapting to different contract implementations without requiring the user to know the exact function name. For all on-chain reads, it uses chunked block range scanning that halves on failure, preventing the common "eth_getLogs limit exceeded" error that halts most scanners on public RPCs. It double-verifies position existence against current contract state rather than relying on historical events, because an event log proves a position was opened, not that it remains open. Gas estimation uses receipt.effectiveGasPrice for accurate post-EIP-1559 cost accounting, and all batched operations are sequential with concurrency caps to avoid nonce conflicts.
WHAT IT CANNOT SEE
This tool cannot verify that the price feed or oracle is accurate, reliable, or uncompromised. It cannot detect if the oracle has been manipulated, if the futures contract has been upgraded or modified, or if the trade path is optimal or front-run. It cannot guarantee execution at the optimal closing price due to slippage, market volatility, or extreme network congestion. It cannot recover funds if execution fails due to contract bugs, insufficient approvals, paused/frozen contracts, or if the position has already been closed. It cannot verify that the collateral token is legitimate. It cannot predict market movements, price gaps, or flash crashes, nor ensure that the basis spread will converge at expiration. It cannot protect against liquidation risk, collateral shortfalls, or guarantee that physical delivery will be processed correctly. It cannot detect if the underlying futures protocol has been compromised, or prevent you from canceling or modifying trade parameters. It cannot guarantee that the position is still open or that the closing price will reflect the current basis.
PLEASE NOTE
This tool operates only on EVM-compatible chains (Ethereum, Polygon, Arbitrum, Optimism, etc.). It is non-custodial—you retain full control of your funds at all times. Always verify contract addresses and position parameters before executing. The tool is provided as-is; use at your own risk. Past basis performance does not guarantee future results.