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

Synthetic Equity Position Closer

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

This tool provides on-chain closure of synthetic equity positions, enabling you to exit leveraged positions, settle profit or loss, and withdraw remaining collateral. It reads your connected wallet address, synthetic asset contract address, position ID, position size, current price, collateral amount, liquidation price, current block timestamp, position status, and PnL. You can then sign and send transactions to close open positions, settle PnL, withdraw remaining collateral after closure, and record position metadata on-chain. All position parameters are displayed in a clear review panel before you sign, so you know exactly what you are closing. The tool also logs transaction hashes, confirmation status, and gas costs, providing a complete audit trail of all position activities.

HOW TO USE

Connect your wallet using the built-in wallet bridge, choose the network that matches your synthetic asset contract, and paste the synthetic asset contract address and position ID. Enter token decimals for display purposes. The review panel shows all inputs, the current position status, size, collateral, current price, liquidation price, and estimated PnL before you sign. Use the numbered action buttons: check position to view current position details including size, collateral, entry and current prices, liquidation price, and PnL; close position to close the position and settle PnL; or withdraw collateral to withdraw remaining collateral from a closed position. You can also check position status to view current position state. Each transaction is signed sequentially, and the tool displays transaction details and confirmation status.

THE REAL MECHANISM

This tool uses ethers.js v5.7.2 to build and send transactions through the wallet's signer. It does not rely on any hardcoded contract addresses – you paste the synthetic asset contract you are using, so you are in full control. When you close a position, the tool constructs a contract call to the closePosition function, which calculates the PnL based on the current price from the oracle, settles the profit or loss, and returns the remaining collateral to your wallet. When you withdraw collateral, the tool calls withdrawCollateral, which transfers any remaining collateral from a closed position back to you. The tool reads position state via getPosition, which returns owner, size, collateral, liquidation price, entry price, and active status, as well as currentPrice for market data and PnL calculation. All transactions are sequential to prevent nonce conflicts, and gas costs are calculated using effectiveGasPrice for accurate post-EIP-1559 reporting.

WHAT IT CANNOT SEE

This tool cannot verify off-chain price accuracy, predict market movements, detect oracle manipulation, or ensure that the synthetic asset contract handles position closures correctly. It cannot detect if the price feed used by the contract is accurate or if the oracle has been manipulated. The tool also cannot verify that the synthetic contract correctly handles edge cases like liquidation, slippage, or position adjustments. It cannot simulate the outcome of a transaction before you sign it, nor can it guarantee that the position will be closed correctly if the contract is not properly implemented.

PLEASE NOTE

This tool works only on EVM-compatible chains supported by your wallet and provider. Always double-check the contract addresses and position IDs before signing. Use testnet first. The tool is a transaction-signing interface and position management tool, not a price prediction or oracle verification system.

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.