amparo
Not available

amparo isn’t available in your region.

You can still read this page. Creating an account is closed where you are. If you already have one, log in to close positions and withdraw your funds.

◆ records, and their edge cases

The loss that leaves no trace.

On accounting for on-chain betting · about 8 min · educational, not tax advice

Point a generic crypto accounting tool at a year of on-chain betting and it will give you a number. The number will be too high, and it will be too high for three specific reasons, each of which is invisible unless you already know to look for it. This is what those three are, and what it takes to get them right.

First: the losing bet that never happens

Buy an outcome share for €0.42 and hold it to resolution. If it wins, you redeem it for €1 and there is a clean record of that. If it loses, nothing happens at all. The token isn't sold, isn't burned, isn't transferred. It sits in your wallet forever, worth precisely nothing, having generated no event whatsoever.

A ledger reading the chain therefore sees a purchase with no matching disposal. Your €0.42 of cost basis stays on the books as though you still held something, and the gains you did realize elsewhere go un-offset by the loss you actually took. The error is always in the same direction: your recorded result is better than your real one.

There are only two ways out. Some venues do publish a redemption record for a losing claim — but it can arrive as a zero-size, zero-value entry with no token identifier on it, so it has to be matched back to the position through the market's own identifier rather than the token's. Whatever that misses has to be marked by hand: a position that resolved against you, flagged as lost, so the cost basis becomes the realized loss it always was. It is worth doing, because it only ever reduces the number you're taxed on.

Second: your own money, moving, looks exactly like a sale

Withdraw USDC from an exchange to your own wallet. Bridge it from one chain to another. Neither is a disposal — it is your money, before and after. But both produce records that a naive ledger reads as "asset left" followed by "asset arrived", which is the exact shape of a sale followed by a purchase.

Get this wrong and the damage compounds. The withdrawal consumes the cost basis of the lot you bought on the exchange; the arrival creates a new lot with no basis at all; and then every later spend of that same money looks basis-less, so the gain is overstated by the full amount rather than by a rounding error. One misread transfer can poison a whole year.

The fix is a rule with a sharp edge: transfers between your own accounts are excluded both from valuation and from the lot queue — but their fees are not. A bridge that charges you a relayer fee, or a venue that takes a flat dollar to send your money out, has cost you real money whether or not the move was a disposal, and it belongs in the total.

Third: a hedged pair is meaningless leg by leg

This is the one worth drawing. In matched betting, two bets are placed deliberately against each other so that the combined result is locked before anything settles. One leg is on a prediction market and perfectly visible. The other is at a bookmaker, and no API anywhere will ever show it to your accounting software.

So a ledger applying first-in-first-out to the visible leg alone is not slightly wrong — it is describing a different bet. It sees a lopsided one-sided position that either won big or lost big, when the actual economic event was a small, deliberate, locked result.

The same hedged bet counted two ways Counted leg by leg, the visible cover was bought for 54.60 euros and redeemed for 105.00, so first-in-first-out books a gain of 50.40 euros — while the 50.00 lost at the bookmaker appears in no API. Counted as a pair, both legs are removed from the lot queue and the locked result is booked once, at 0.40 euros. The gap is 50.00 euros of gain that never existed. ONE HEDGED BET, COUNTED TWO WAYS LEG BY LEG — WHAT FIFO SEES ALONE cover bought €54.60, redeemed €105.00 the €50.00 lost at the bookmaker is in no API PHANTOM +€50.40 AS A PAIR — WHAT ACTUALLY HAPPENED both legs dropped, locked result booked joined by outcome token and market id REAL +€0.40 THE GAP: €50.00 OF GAIN THAT NEVER EXISTED
Fig. 1 — a worked pair. €50 backed at 2.10 with the opposite side covered for €54.60 locks about €0.40 either way. Here the bookmaker leg lost, so the cover redeemed at €105.00 — and read on its own that is a €50.40 win. Reconciling means identifying both legs, removing them from the lot queue entirely, and booking the locked result once. The join needs the market identifier as well as the token, because a winning redemption often arrives without a token id — and matching on the token alone would drop the purchase while keeping the redemption, which is the worst of all possible answers.

What first-in-first-out actually does

Underneath the special cases is an ordinary queue, and it is worth being able to picture it. Every purchase creates a lot: a quantity and a unit cost. A disposal walks the queue from the front, taking lots whole until it doesn't need a whole one, then taking part of the next and leaving the remainder at the head. The gain is the proceeds minus the cost of exactly the lots consumed.

A first-in-first-out disposal consuming lots from the front of the queue Selling 120 shares at 0.70 euros consumes the oldest lot of 50 at 0.42 entirely and 70 of the next lot of 90 at 0.55, leaving 20 shares of it at the head of the queue. The third lot of 60 at 0.61 is untouched. Proceeds of 84.00 euros minus a cost of 59.50 gives a realized gain of 24.50 euros. FIFO — A DISPOSAL EATS THE OLDEST FIRST Sell 120 shares at €0.70 THE QUEUE, OLDEST AT THE TOP 50 @ €0.42 · all taken 90 @ €0.55 · 70 taken 60 @ €0.61 · not yet proceeds 120 × €0.70 = €84.00 cost 50 × 0.42 + 70 × 0.55 = €59.50 REALIZED €24.50 lot 2 keeps 20 at €0.55, still at the head
Fig. 2 — the queue, and the leftover that matters. Two details do most of the work in practice. Lots are keyed per outcome token, not per "shares", or every market you ever touched would pool into one queue with a meaningless average cost. And within a single timestamp the disposal is processed before the acquisition, so a purchase made in the same moment can never supply its own basis.

Currency, and the limits of an FX rate

Records have to be denominated in something. Converting a dollar-pegged position to euros needs a published daily reference rate and a rule for weekends — the previous business day — and that part is genuinely easy.

Converting anything else does not need an FX rate, it needs a price source, which is a different and much larger commitment. So the honest behaviour is to value what can be valued, exclude what can't from the calculation, and say so out loud rather than quietly treating an unpriced leg as zero. The same applies to a fee paid in a token with no price attached: not deducted, and flagged, because a silent zero is a lie with a decimal point on it.

There is one more judgement call worth stealing, about a disposal with no recorded purchase behind it. Assigning it a zero cost basis books the entire proceeds as gain — defensible for an unknown asset, absurd for a stablecoin that was obviously worth a dollar when it arrived. So dollar-pegged assets get a dollar-for-dollar basis and everything else gets zero, with different warnings attached to each. Both are wrong; the point is that they are wrong in a stated direction, which is the only kind of wrong an estimate is allowed to be.

The number at the bottom

Once the special cases are handled, the total is a sum of four things that must never be collapsed into one, because they behave differently and are often reported differently:

  • Spot gains from the lot queue — buying and selling assets and outcome shares.
  • Derivatives — perpetuals and funding payments, which are realized profit and loss rather than lots to be matched, and so are reported as themselves.
  • The matched-betting locked result — booked once per completed bet, as above.
  • Fees, in the accounting currency — every one that could be priced, including those on moves that weren't disposals.

Keeping the four visible separately is what makes the figure checkable. A single blended number is impossible to argue with, and "impossible to argue with" is not a virtue in a document you may one day have to explain.

Where it still can't help you

Any honest version of this comes with a list, and the list is not short.

  • It is an estimate. The arithmetic follows one European jurisdiction's rules — euro-denominated, oldest-lot-first, crypto-to-crypto counted as a disposal — and it is not tax advice. Something an adviser checks, and a starting point rather than a filing.
  • Years don't carry over. Each report is computed from that year's transactions, so a position bought in one year and sold in the next has no recorded purchase behind it and lands in the missing-basis pile. That is exactly the case where the number needs a human.
  • Some venues only expose a snapshot. A live portfolio with no dated ledger cannot be itemized into a tax year at all, so it is reported as a warning telling you to record it yourself rather than folded silently into the total.
  • Long histories get truncated. Every source is paginated, and when a limit is hit the report says the year may be incomplete instead of pretending it is finished.
  • Nothing is remembered. The report is recomputed from the venues on every request, which is honest — but it means it is only ever as good as what those APIs still return.

Two small things on the way out. The export is one row per leg with the fee, its currency and its converted value on the same line, which is what makes a figure auditable rather than merely printed. And every text cell is escaped against spreadsheet formula injection — because market titles are written by strangers, and a market called =cmd|... should not execute when someone opens the CSV.

This is not tax advice. Tax treatment of betting, prediction markets and crypto differs by jurisdiction and by circumstance, and you remain solely responsible for what you declare. Anything on this page — and any figure produced by software, including amparo's — is a working estimate for a qualified adviser to verify. For adults (18+).

Every leg, on one statement.

amparo's records ship with every membership, including the free trial — there is no separate tax add-on to buy.

Start free 7 days free · from 2 USDC / 2 weeks · 18+