TaxIntellilytics Stories

Tax Lab · Illicit financial flows

Stamp to Arrival

A published matching engine, a revenue range and a private stamp check: how two revenue authorities could verify that excise-relieved exports arrived, without a single taxpayer's records crossing the border.

Derived

A practical extension of Can the Stamp Cross the Border? It builds Tier 2 and demonstrates Tier 1 of the paper's proposed verification protocol. Every figure is computed in your browser or at build time from the paper's own inputs.

Uganda's neighbours recorded 44 per cent of the stamped-goods exports Uganda says it sent them between 2015 and 2025. Today nobody can say which part of the rest is a recording gap and which part is goods that never arrived. Run on the same data, the matching engine below sorts 403 product-partner-years and raises 121 notices. At Uganda's own effective excise rates, the exports with no matching arrival carry US$52.8 million to US$129.2 million of excise over 2020 to 2025.

Tier 2: matching exports to arrivals

Each tile is one destination, product and year. The engine compares what Uganda declared for export with what the destination recorded as arriving, on weight where both sides give one and otherwise on value net of the CIF-FOB margin. A gap outside the tolerance and above the materiality threshold raises a notice. Where the partner filed nothing, the tile says so: a data gap, not a mismatch.

Change the rules, narrow the destinations, products or years, and every count recomputes. Select any tile, or move with the arrow keys and press Enter, to see the engine's reasoning step by step, the ratio on both weight and value, unit values on each side, and the same flow in every year. Below the matrix, the flows are ranked the way an auditor would work through them. The rules you set are kept in the page address, so a link reproduces exactly what you see.

Rules
Destinations
Products

121 notices on 403 product-partner-years in view: 105 shortfalls, 6 with no arrival record, 10 excess arrivals; 100 matched; 81 below materiality; 101 data gaps, not mismatches. Shortfall and no-arrival notices cover US$555m of declared exports.

Where the declared exports went, by corridor

A sheet of stamps for each neighbour. Each stamp is US$10 million of exports Uganda declared in the years and products selected, coloured by what the destination recorded. Select a sheet to open the corridor below.

South SudanUS$1.09bn0% in noticesDR CongoUS$821m81% in noticesKenyaUS$398m14% in noticesRwandaUS$342m12% in noticesTanzaniaUS$59.61m39% in noticesBurundiUS$55.89m11% in notices
  • Shortfall
  • No arrival record
  • Excess arrival
  • Matched
  • Gap below materiality
  • No partner data
  • One stamp = US$10 million, rounded; exact values in the tooltip and the table.
Uganda → DR Congo: every product, every year

Each stamp is one product in one year; its size is the value Uganda declared. Its colour is what DR Congo recorded against it: red short, grey level, blue over. A postmark marks a notice. Select a stamp for the reasoning.

Declared exports, this corridor

Recorded arrivals ÷ declared exports

Outlined: the tolerance band, ±25%.

  • Postmark: a notice
  • No arrival record
  • No partner data
  • Faded: gap below materiality

Select a stamp to see the engine's reasoning, both comparison bases, unit values and the same flow in every year.

Where an auditor would start

Each destination and product as one flow across the years in view, ranked. A flow that falls short year after year is a better lead than a single large gap, which timing alone can produce. Click a flow to open its latest notice.

Flows ranked for audit
#FlowExcess arrivalsPattern
110 of 1110US$189m
210 of 1110US$120m
310 of 1110US$102m
410 of 1110US$46.06m
59 of 116US$26.68m
63 of 92US$16.48m
73 of 111US$12.77mUS$21.32m
88 of 118US$6.53m
910 of 119US$6.09m
104 of 94US$5.01m
113 of 63US$4.89m
124 of 113US$3.74m
131 of 61US$2.75m
143 of 92US$2.41mUS$822.4k
152 of 91US$2.05m
165 of 113US$1.41m
171 of 61US$1.32m
184 of 112US$1.24m
193 of 91US$1.24mUS$1.16m
203 of 91US$856.2k
212 of 92US$532.0k
222 of 92US$461.2k
231 of 91US$455.1k
241 of 11US$375.8k
251 of 51US$331.4k
261 of 51US$157.4k
271 of 21US$138.8k
281 of 71US$118.4k
292 of 100US$0US$266.0k
303 of 90US$0US$709.7k

The published rules are a tolerance of ±25 per cent, materiality of US$100 thousand, a CIF-FOB margin of 10 per cent and suppression below 10 producers. These records are public UN Comtrade statistics, so no cell here needs suppression; with administrative data the producer count would apply. The same rules run in Stata (scripts/stata/stamp_to_arrival_match.do), and a test fails if the two engines ever disagree on a single cell under the published rules.

What the unmatched exports carry

Derived

Extension, not in the paper. A modelled range, not an estimate of smuggling.

Goods declared for export are relieved of Ugandan excise. If they were in fact consumed at home, Uganda forgoes that excise. The shortfall is valued at Uganda's effective rate, excise declared over value declared on URA's returns from November 2024: spirits 49.3 per cent, wine 41.1 per cent, beer 26.7 per cent, soft drinks 11.6 per cent, bottled water 11.5 per cent, sugar 2.2 per cent. The rates for cigarettes and cement are suppressed in the released aggregates (fewer than ten firms in some months), so by default those goods add to the trade shortfall but carry no excise, and every bound understates. You can enter your own rate for them; the page then shows how much of the total rests on it.

The lower bound counts only flows both sides recorded, at a 5 per cent CIF-FOB margin. The central figure uses 10 per cent and adds exports with no import record in years the partner did report imports from Uganda. The upper bound uses 15 per cent and adds every unmatched export. Compare the years before and after the stamp, switch between excise and the trade shortfall, and select a corridor for its products. Where the goods entered the neighbour undeclared, the neighbour lost revenue too, at its own rates.

Measure
Products
Your own rate where URA's is suppressed (optional)

Left empty, these goods count in the trade shortfall but carry no excise. Any figure entered here is your assumption, not URA data, and the totals say how much rests on it.

Excise at stake, 2020 to 2025, all corridors: US$52.81m to US$129m, central US$54.01m.
DR CongoUS$45.43mRwandaUS$3.79mKenyaUS$2.72mBurundiUS$1.03mTanzaniaUS$579.1kSouth SudanUS$465.9k
  • Printed: up to the lower bound
  • Unprinted: on to the upper bound
  • Postmark: the central estimate, labelled at the strip's end
  • One stamp = US$5 million.

Select a corridor to see each product's shortfall, the rate applied to it and where that rate comes from.

Tier 1: checking a stamp without seeing the register

Hypothetical

Synthetic codes. This shows the mechanism, not Uganda's register.

A Kenyan officer holding a bottle with a Ugandan stamp needs one answer: is this code genuine, and is it for this product? A blinded lookup gives it. Uganda blinds its register once under a secret key; the officer blinds the code under a one-time key; Uganda answers without learning which code was asked; the officer learns validity, product class and issuer, and nothing else about the register.

Three frauds can be caught this way. A forged code is not on the register. A genuine stamp moved from cheaper goods comes back with the wrong product class. A cloned stamp, the same code printed on many items, gives the officer the same match key every time it is checked, even though Uganda sees a different random value on each query. Check single stamps, or scan a whole truck with a mix of frauds you choose. All the arithmetic runs in your browser on 2048-bit numbers.

Mechanism demonstration · synthetic codes · no real register

1. Uganda blinds its register (once)

Pick a register size. Uganda raises every code to its secret key and shares only the results, each with its product class. A larger register shows how the cost grows; a production system would use elliptic curves and be far faster.

Reading this carefully

A notice points an audit at a flow. It is not a finding against any person. Annual Comtrade data mix timing differences, re-exports, misclassification and missing reports into every gap; monthly administrative records exchanged between two revenue authorities would remove most of that noise. South Sudan and DR Congo report little to Comtrade, so many of their tiles are data gaps.

Sources

  • Kaijamahe, W.H. (2026) Can the Stamp Cross the Border? Excise Smuggling, Fiscal-Marking Data and Articles 3(2) and 11 of the Draft UN Tax Convention, ICTD workshop draft, November. Not for citation or circulation without the author's permission.
  • UN Comtrade Database, HS 2402, 2203, 2208, 2204, 2201, 2202, 1701 and 2523, 2015-2025, downloaded 13 October 2026.
  • URA Research Lab, released category-month aggregates of excise returns (cells with fewer than ten firms suppressed).
  • RFC 3526, More Modular Exponential (MODP) Diffie-Hellman groups, group 14, for the stamp check demonstration.
  • Engines and tests: lib/stampToArrival.ts, lib/stampBorder.ts and lib/stampCheckDemo.ts, with their test files.

← Can the Stamp Cross the Border?Back to Tax Lab