Exits and protections
A bot has two kinds of exits: those that take or protect a profit, which never sell under break-even, and those that cut a loss, which sell at whatever price the market gives. This page explains both, and the checks bots run before trusting a price.
Break-even
A position's break-even is the price at which selling it gives back exactly what it cost:
- what the bot paid for its coins, every fee of its buys included,
- plus what selling them costs: the Tradyn fee, pool fees and price impact, the network fee, and the coin's transfer tax if it has one.
Each running bot re-measures its coin's trading costs every 5 minutes, and computes its break-even from what it really paid.
Exits that take a profit
- Take-profits and grid sales never sell under break-even, whatever the settings say. If you set a target under what a buy plus a sale cost, the bot simply holds until a sale pays its costs back.
- The break-even stop and the trailing take-profit trigger 0.5% above break-even, so a normal price step between two updates still sells at or above it. Only a sudden drop bigger than that can slip under, and then the bot still sells rather than ride a crash.
- An on-chain minimum. Each of these sales writes into the swap itself the minimum SOL it must bring back: what the coins cost, plus the fee, the network costs and any token account the route opens. If the price moves while the sale is on its way, the blockchain refuses it rather than fill it at a loss, and the bot tries again.
- When the price leaves too little room for that minimum, the sale waits and is decided again 10 seconds later. A sale that waits sends nothing, and never counts as a failure.
Exits that cut a loss
These are the only exits meant to sell at a loss:
- the stop-loss of a trade, or the grid's stop under its range,
- the time limit of a trade,
- the bot's max loss: when its P&L reaches that share of its budget, it stops and returns its SOL,
- your own Stop.
They sell at the next price available, with no floor. In a fast or thin market, the price can fall well beyond a stop before the sale lands, so a loss can be bigger than the stop you set.
Prices are checked before a bot acts
Bots read each coin's price straight from the liquidity pool where it trades the most, within milliseconds of every swap, and cross-check it with Jupiter's price:
- A pool is only used after its price matches Jupiter's, and is checked again every 10 seconds. A second pool is watched too when it trades at least a third as much: a price shown by only one of the two is ignored, and pools that disagree for more than a few seconds send the coin back to Jupiter's price for a couple of minutes.
- If a pool's live updates stop arriving while it keeps trading, the coin goes back to Jupiter's price within about 40 seconds, and the pool is tried again a few seconds later.
- Before cutting a loss on a pool price more than 3% away from Jupiter's last price, the bot asks Jupiter again and decides on its answer. A single manipulated pool can't make your bot sell. If Jupiter doesn't answer for 15 seconds, the bot acts on the pool's price, so a real crash still sells.
- Before buying on a pool price more than 3% away from Jupiter's, the bot waits for Jupiter to confirm it, with no time limit: a buy never goes out on an unconfirmed price.
- If the swap route would make the bot pay clearly more than the market price, the buy waits and is decided again 10 seconds later. The same goes for a profit-taking sale that the route would pay badly. Stop-losses never wait for this.
Coins still on their launch curve (pump.fun, for example) have only one market: their bots don't wait for Jupiter to confirm a price.
How trades are sent
- One trade at a time. A bot never has two trades on their way at once.
- Protected from sandwiches. Each swap is sent through Jito, with Jito's marker that keeps other traders from placing their own trade right in front of it.
- Through pools only. Swaps go through liquidity pools (Raydium, Orca, Meteora, pump.fun…), whose price only moves when someone trades. Venues that price from quotes their market makers refresh several times a second are left out: a trade through them that takes a second to land often fails. Pools cost at most a few hundredths of a percent more on large coins, nothing on memecoins. A coin no pool trades is still routed through whatever venue has it.
- Slippage cap. Each swap carries a maximum slippage. If the market moves further before it lands, the swap fails, and the bot tries again on the new price.
- Results come from the chain. What a trade bought or sold is read from the confirmed transaction's balance changes, never from a quote.
- Failures. A failed trade is retried after a short wait that grows with each failure. A trade that didn't land says why when it can (for example, the price moved beyond the slippage tolerance). After 6 failures in a row, the bot pauses and shows Needs attention.
What protections can't do
They can't stop a coin from falling, and they don't make a strategy profitable. A coin can lose most of its value faster than any stop can sell, or become impossible to sell. Read Coin risks and the Risk Disclosure.