Skip to main content

Trade Flap tax tokens without getting burned

Most tokens on Flap are tax tokens: the creator takes a percentage of every buy and sell. That is not a scam flag on BNB Chain - it is the standard way a launch funds itself - but it changes the arithmetic of a trade, and a bot that ignores it loses money on tokens that "went up".

What the tax is

Two rates, set at launch and immutable: buyTaxBps and sellTaxBps (100 = 1%). They can differ; 3% in / 10% out is a common shape. The tax goes to the creator's beneficiary, automatically, in the quote asset.

Where it is charged depends on where the token is:

  • On the curve - as an extra fee on the trade, on top of Flap's own curve fee. Buy 1 BNB of a 3%-tax token and about 0.9575 BNB reaches the curve (1.25% Flap fee, 3% tax).
  • After graduation - on the tokens as they move through the PancakeSwap pool. Buy and 3% of the tokens are kept back; sell and 10% of the tokens you sell go to the tax before the pool prices the rest.

Either way, the API's quote already includes it. expectedOut is what you actually receive.

Read it before you trade

const t = await (await fetch(`https://api.shrine.trade/bnb/api/token/${TOKEN}`)).json();
console.log(t.isTaxToken, t.buyTaxBps, t.sellTaxBps, t.venue);

isTaxToken and the two rates tell you the shape. venue tells you whether it is still on the curve. The tax block shows where the revenue goes and how much has been paid out - a token whose creator has already collected a lot of BNB is a token with a lot of volume.

What a round trip really costs

Buy 0.1 BNB of a 3%/10% token on the curve, sell it back straight away at the same price:

Flap curve fee, in and out1.25% + 1.25%
Tax, in and out3% + 10%
shrine.trade, in and out0.5% + 0.5%
Round tripabout 17.5%

So the token has to gain 17.5% before you are level. The sniper tutorial skips sell taxes above a threshold for exactly this reason - MAX_SELL_TAX is the knob.

The sell quote is the truth

Never estimate a position's value from the buy price. Quote a full exit:

const q = await post("/api/local-trade", { action: "sell", token: TOKEN, amount: "100%", from: wallet.address });
console.log("worth", q.quote.expectedOutFormatted, q.receive); // after tax, Flap's fee and ours

expectedOut is BNB after everything. Compare that with what you paid and you have the real return.

Graduation changes nothing in your script

When the curve sells out, Flap moves the token and its BNB to a PancakeSwap pool. The same local-trade request keeps working; venue flips from flap_curve to pancakeswap, curveFeeBps drops to 0 and the tax carries on for the period the creator set (taxDays at launch, 365 by default).