This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Cost Basis Lot Sale Executor

DeFi · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategoryDeFi
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Cost Basis Lot Sale Executor is a non-custodial tool that sells specific cost basis lots with known acquisition dates and cost basis, enabling precise tax management and gain/loss realization. It reads cost basis lot contract state, user address, token balances, lot parameters, lot ID, acquisition date, cost basis, lot size, remaining size, sale amount, price, realized gain/loss, position history, sale eligibility, fee structure, settlement state, and token approval status to structure the optimal lot sale operation. With a single transaction, it calls sellLot(), executeLotSale(), or submitLotSale() on the target contract, selling designated tax lots at specified prices. The tool supports precise tax lot selection for optimal tax outcomes, allowing users to choose which specific lots to sell based on their tax strategy.

HOW TO USE

1. Connect your wallet (EVM-compatible).

2. Paste the cost basis lot contract address and token address.

3. Enter the lot ID, sale amount, and sale price per token.

4. Provide the acquisition date (Unix timestamp) for the lot.

5. Review the lot size, remaining size, cost basis, and realized gain/loss.

6. Click "sell lot" and confirm the transaction in your wallet.

The tool automatically handles token approvals before execution. After the transaction confirms, the designated lot is sold on-chain—no centralized custody, no intermediaries. The gain or loss is calculated based on the cost basis and sale price.

TECHNICAL MECHANISM: MULTI-FUNCTION FALLBACK WITH LOT VERIFICATION

Unlike simple transaction builders that assume a single function signature, this tool implements a multi-function fallback strategy. It first attempts sellLot(), then falls back to executeLotSale() or submitLotSale() 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 sale eligibility by checking both the current lot size and remaining size from storage, rather than relying on historical events—because an event log proves a lot was created, not that it can currently be sold. 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. The tool also validates that the sale amount does not exceed the remaining lot size and that the lot is eligible for sale before execution.

WHAT IT CANNOT SEE

This tool cannot verify that the cost basis lot contract is legitimate or has not been compromised. It cannot detect if the lot positions have been manipulated. It cannot ensure that sale will execute at the optimal price due to slippage and market volatility. It cannot guarantee that sale will succeed if the contract is paused or frozen. It cannot verify that the contract has not been upgraded or modified. It cannot detect if the trade path is optimal or not front-run. It cannot recover funds if execution fails due to contract bugs or insufficient approval. It cannot verify that the sale amount is valid or not. It cannot predict market movements, price gaps, or flash crashes. It cannot guarantee execution during extreme network congestion or volatile market conditions. It cannot detect if any underlying token has been compromised. It cannot prevent the user from canceling or modifying sale parameters. It cannot ensure that the sale will be processed. It cannot protect against loss if sale is rejected. It cannot verify that the lot is eligible for sale. It cannot guarantee that the gain/loss will be correctly calculated. It cannot ensure that token approvals are correct. It cannot provide tax advice. It cannot verify that the cost basis is accurate.

PLEASE NOTE

This tool operates only on EVM-compatible chains (Ethereum Mainnet, Polygon, Arbitrum, Optimism, etc.). It is non-custodial—you retain full control of your funds at all times. Always verify contract addresses, lot IDs, and sale parameters before executing. This tool does not provide tax advice—consult a tax professional before executing lot sales. Cost basis accuracy depends on the data provided. The tool is provided as-is; use at your own risk.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.