How does putting a tokenized U.S. Treasury on a Uniswap pool change how often it actually trades? And how do you prove the answer with seven tokens and a noisy on-chain panel?
This textbook teaches the full stack of ideas behind one specific empirical paper: a staggered difference-in-differences estimate of AMM listing's causal effect on secondary-market velocity across seven tokenized U.S. Treasury instruments (BUIDL, OUSG, USDY, BENJI, USTB, USYC, STBT).
We start from first principles. By the end you will be able to: read a raw ERC-20 Transfer event log; explain why two-way fixed effects under staggered treatment embeds forbidden 2×2 comparisons that subtract dynamic treatment effects in the wrong direction; sketch the Callaway-Sant'Anna estimator on a whiteboard; defend your choice of never-treated vs. not-yet-treated control groups; and articulate exactly why the project's N=7 sample is both its greatest asset and its most brutal constraint.
Read it linearly if you're new to either econometrics or DeFi — the chapters build on each other. Skip around if you already know parts. Every chapter has at least one interactive component: drag a slider to shift treatment timing, click into a Bacon decomposition to see which 2×2 comparisons are doing the forbidden work, simulate pre-trend tests under varying effect sizes.
Why "tokenized" doesn't mean "liquid". What an RWA token is, who issues them, and why most of them sit motionless in custody wallets for weeks at a time.
AMMs explained from x·y=k upward. ERC-20 Transfer events. The decision tree that separates a genuine trade from a custodial reshuffle. How to build a velocity measure that survives reviewer scrutiny.
The methodological heart of the project. Why Mafrur (2025) stopped at descriptives. Potential outcomes, parallel trends, the failure of two-way fixed effects under staggered treatment, and the modern estimators that fix it.
From pipeline to publishable paper. The full project methodology, the robustness ladder reviewers will demand, and the limitations we have to own up to honestly — plus the improvements that turn an SSRN working paper into a real journal submission.
| If you are… | Read these first | Skim these |
|---|---|---|
| An econometrician learning the DeFi context | 02, 03, 04, 05, 06, 13 | 07, 08, 09 |
| A DeFi engineer learning the causal toolkit | 07, 08, 09, 11, 12 | 02, 03, 04 |
| A reviewer / co-author evaluating the project | 01, 06, 13, 14, 15 | all the rest |
It is not a replacement for the original sources. The Callaway-Sant'Anna chapter summarizes ideas that take Brantly Callaway and Pedro Sant'Anna 30 pages of formal proof in Journal of Econometrics to establish; the AMM chapter compresses Hayden Adams's Uniswap v3 whitepaper into half an hour of reading. If you intend to actually defend the paper, you must also read those primary sources — this textbook tells you which ones, in what order, and exactly what to extract from each.
It is also not neutral. Throughout, we flag the places where this specific project is on weak ground — small N, endogenous listing timing, BUIDL's near-zero-velocity pathology — and we tell you what to say when a reviewer raises them. The honest answer to "is this paper publishable in JFE?" is "no, and that's fine, because Finance Research Letters and Ledger are the right targets."
If this is your first session, open Chapter 01 — The puzzle of idle tokens. It establishes the central empirical question in about ten minutes and motivates everything that follows.
A $25-billion asset class where most of the assets sit, week after week, doing absolutely nothing.
In May 2026, the total market capitalization of tokenized real-world assets crossed $25 billion. The largest single instrument, BlackRock's USD Institutional Digital Liquidity Fund — ticker BUIDL — alone holds roughly $2.4 billion in tokenized U.S. Treasuries. That number is real: every BUIDL token is backed by an actual short-duration Treasury bill held in BNY Mellon custody, and the Securitize transfer agent will redeem it on demand for an institutional client. This is not a stablecoin pegged to nothing. This is a securitized claim on government debt, issued on Ethereum, by the world's largest asset manager.
Now look at how often it trades.
As of the most recent week of data, BUIDL has approximately 85 holders. Not 85 million, not 85 thousand. Eighty-five wallets. In a typical week, the number of secondary on-chain transfers between non-issuer addresses can be counted on one hand. The annualized turnover ratio — the fraction of outstanding supply that actually changes hands in a year — is below 1%. For comparison, a typical U.S. equity ETF turns over its float more than ten times per year. The 10-year Treasury itself turns over roughly fifteen times.
So the central empirical puzzle of this project is:
Tokenization was sold to investors and regulators as a path to dramatically more liquid secondary markets for traditionally illiquid assets. Putting a Treasury on Ethereum is supposed to mean it trades 24/7, atomically, with low friction. In practice, most of these tokens trade less than the underlying instruments do. Why? And does it change when the issuer puts the token on a Uniswap pool?
Throughout this textbook the word velocity means one very specific thing: the annualized dollar value of secondary-market transfers, divided by the token's average market capitalization over the same period.
Written out:
$$\text{velocity}_{i,t} = \frac{\text{secondary transfer volume}_{i,t} \times 52}{\text{average market cap}_{i,t}}$$
The factor of 52 annualizes a weekly observation. "Secondary" means we exclude mints (creation of new tokens by the issuer), burns (destruction at redemption), and transfers to or from a hand-curated list of issuer, custodian, and protocol-internal wallets. Chapter 5 is entirely devoted to building this measure rigorously. For now, the point is:
Most of our 7 tokens, most weeks, sit between 0 and 0.5. A few, occasionally, spike to 5 or 10 around a specific event. USDY, the most retail-accessible name, occasionally reaches 20 in promotion weeks. The dispersion across tokens and across weeks is huge — and that dispersion is what will give us identifying variation when we get to the regression.
Of the seven tokens, only three received their first listing on a major decentralized exchange's automated market maker (AMM) within our sample window of January 2023 through April 2026. They are:
The other four — BUIDL, BENJI, USTB, USYC — were never AMM-listed in our sample. They serve as our never-treated control group. The question is straightforward:
For the same token, what does its weekly secondary-market velocity look like in the weeks after AMM listing, compared to a plausible counterfactual where listing did not happen? And does the size of the AMM pool's available liquidity (its TVL, total value locked) modulate the size of the effect?
A first-year graduate student in economics would look at the question above and reach for a simple "before vs. after" comparison: take the average velocity of OUSG in the 8 weeks before its Uniswap listing, subtract from the average in the 8 weeks after, and report the difference. This is exactly the wrong approach, for at least four reasons that this textbook will unpack carefully:
Before we go any further into methodology, here is the empirical pattern that motivated the project. Drag the slider below to advance through time — you will see the relative sizes of the seven tokens by market cap, and you will see how secondary velocity has evolved differently for treated tokens (orange) versus controls (grey). Watch OUSG and USDY especially: notice how velocity is roughly flat until the AMM listing moment, then steps up.
By the time you finish Chapter 16, you should be able to do every one of the following without consulting notes:
alchemy_getAssetTransfers JSON response and identify
which fields you keep, which you throw away, and which you cross-check against
a separate issuer-wallet list.control_group = "nevertreated" rather than
"notyettreated" in this project, and articulate the cost-benefit
of either choice.The next chapter takes the seven tokens one at a time and tells you everything you need to know about each: who issues it, who can hold it, what the transfer restrictions are, what its actual trading pattern looks like, and what role it plays in the regression.
Who issues each, who can hold each, what trades and what doesn't, and why these seven and not others.
A tokenized U.S. Treasury is an ERC-20 (or, in BENJI's case, an asset on Stellar or Polygon) whose underlying backing is a portfolio of short-duration U.S. Treasury bills held in segregated custody at a regulated bank or trust company. Each unit of the token represents a fractional ownership claim on that underlying portfolio. The token's net asset value (NAV) is either fixed at $1.00 with yield distributed separately (BUIDL, BENJI, USTB, USYC, STBT) or accrued into a growing NAV per share (OUSG, USDY).
The legal structures differ — some are SEC-registered Regulation D 506(c) private placements, some are foreign issuers under Reg S — but functionally, an investor who passes whatever KYC/AML check the issuer requires can deposit USDC (or wire USD) and receive tokens at the prevailing NAV. They can later redeem at the prevailing NAV, again subject to the issuer's process. The yield accrues continuously and is paid out by one of three mechanisms (more on this in the per-token cards below).
USDC is backed by reserves held at custodian banks, but USDC tokens themselves do
not represent a security claim — they are e-money. BUIDL, in contrast, is an interest
in a fund. That distinction is why every RWA token in our universe has
transfer restrictions baked into its smart contract: the
transfer() function will revert if the recipient is not on an allowlist.
Stablecoins do not need to do that.
The cards below summarize each token in our sample. Pay attention to the transfer-restriction model, the holder count, and the role (treated vs. control). These three attributes determine almost everything about how each token contributes to identification.
Issued by BlackRock through the Securitize transfer agent. The largest tokenized
Treasury fund in the world by AUM ($2.4B as of mid-2026). Holders are restricted to
qualified institutional investors who pass Securitize's KYC; the smart contract's
transfer() function checks an on-chain allowlist before letting any
movement go through. Yield is distributed monthly as a rebase-style mint of
additional BUIDL units to each holder.
Issued by Ondo Finance. Originally a more restricted instrument; in 2023, Ondo re-wrapped it into a tokenized fund structure that allows broader institutional access. NAV is accrued into the token price (so 1 OUSG = ~$108 in mid-2026, having appreciated from $100 at launch). The first major RWA token to be listed in a permissioned Uniswap v3 pool. Treatment date for the regression is the first week with material AMM liquidity (TVL > $10k).
Ondo's retail-facing yield-bearing dollar. Holders earn yield through a slowly appreciating NAV (1 USDY appreciates roughly 5% per year at current rates). USDY's KYC is the lightest of the seven — accessible to non-U.S. retail investors via Ondo's app. As a result it has by far the most holders (~12,000) and the highest baseline velocity. The most retail-facing token in the sample.
Issued by Franklin Templeton. Originally Stellar-only (where most of the supply
sits), with a smaller Polygon deployment. We scope to Polygon only
because Stellar's on-chain analytics infrastructure is too immature to reliably
extract secondary transfers — the Stellar Horizon API is functional but lacks the
batched getAssetTransfers equivalent that Alchemy provides for EVM chains.
This scope decision is documented in Chapter 4 and flagged as a robustness concern
in Chapter 15.
Issued by Superstate, a relatively new entrant founded by Robert Leshner
(formerly Compound). KYC-restricted to U.S. qualified purchasers. Has not been
AMM-listed; Superstate's strategy has emphasized partnerships with institutional
DeFi venues rather than open AMM pools. Functions as a control. Note: USTB joins
the sample late (October 2023 launch), so it contributes roughly 135 weeks of data
versus 170 for tokens present at the start. This creates an unbalanced panel that
requires allow_unbalanced_panel = TRUE in the CS estimator call.
Originally issued by Hashnote; acquired by Circle in early 2025. The acquisition
itself is a confound — we verify that no AMM listing event coincided with the
Circle integration and document this in notes/data_anomalies.md.
USYC's holders are mostly DeFi protocols using it as a yield-bearing collateral
token (e.g., in some Morpho markets). This produces an interesting transfer
pattern: high frequency, but mostly to and from a handful of protocol contracts
that we need to decide whether to count as "secondary" trades or as protocol-internal
rebalancing. (We exclude them; see Chapter 4.)
Issued by MatrixDock (Matrix Port). Smallest treated token by market cap, but methodologically interesting because its AMM venue is a Curve stableswap pool rather than Uniswap v3. Curve uses a different pricing function — the "stableswap invariant" — designed for assets that trade close to par. This gives us a robustness check (Chapter 14): does the treatment effect look the same when AMM venue type varies? It also raises a methodological concern: Curve's reported TVL is summed across both sides of the pool (STBT + USDC), so the AMM-depth covariate has to be constructed carefully.
Below is the staggered-treatment timeline that drives the entire identification strategy. Each row is a token. Each row starts at the token's launch (small marker) and continues to the present. For treated tokens, the colored band marks the AMM listing event and everything after. Notice: the three treated tokens have three different cohort indicators $g_i$ (week 44, week 68, week 92) — this staggering is exactly what makes Callaway-Sant'Anna the right estimator and what makes naive two-way fixed effects misleading.
The blueprint considered including additional tokens — WTGXX (WisdomTree's tokenized money market fund), TBILL (OpenEden's Treasury fund), and several others. We held the sample at seven for three reasons:
Chapter 15 revisits this and discusses what changes if a follow-up paper expands to 15–20 tokens. The short answer: statistical power roughly doubles, the never-treated control group becomes much larger, and several robustness checks that currently lean on a single token (BUIDL's near-zero baseline velocity) become more meaningful.
One pattern to flag now, because it will matter for identification: holder count and velocity are positively but imperfectly correlated. USDY has 12,000 holders and high velocity; BUIDL has 85 holders and near-zero velocity. But the relationship is not mechanical — USYC has only 180 holders yet sees significant weekly volume because those holders are mostly DeFi protocols rebalancing inventory. This means we have to include $\log(\text{holders})$ as a time-varying control in the regression, otherwise the AMM-listing effect could be confounded by holder-base growth that AMM listings themselves accelerate (a mechanism — interesting in its own right, examined in Chapter 15).
With the institutional landscape in hand, the next chapter turns to the infrastructure that the treatment variable is built around: how AMMs actually work, especially for assets that trade within a tight range around $1.
From x·y=k to concentrated liquidity to stableswap — the pricing functions that determine what "AMM listing" actually means in our regression.
The treatment variable in this project is "the token has been listed on a major AMM with at least some available depth." That phrase hides three decisions: what counts as a "major AMM", how to measure "depth", and what threshold of depth counts as a meaningful listing. To make these decisions rigorously, you need a working understanding of how AMM pricing functions differ. Two pools with the same reported "TVL" can offer wildly different effective liquidity for an RWA token that trades within a few basis points of $1. The pricing function determines that.
We'll cover three pricing families in this chapter:
Of our three treated tokens, OUSG and USDY sit in Uniswap v3 pools (concentrated liquidity); STBT sits in a Curve stableswap pool. That difference is what makes STBT an internal robustness check for the project.
A traditional order-book exchange matches a buyer's bid against a seller's ask. Liquidity is whatever sits in the limit order book at any moment. There is no liquidity if no one has posted an order.
An AMM removes the order book. Instead, two reserves of two tokens sit in a smart contract, and a fixed mathematical relationship between those reserves determines the price of one token in terms of the other. Anyone can deposit equal value of both tokens to provide liquidity; anyone can swap one token for the other against the pool, paying a small fee that accrues to the liquidity providers (LPs). There is always a price, because the formula always defines one.
For a constant-product AMM holding reserves $x$ of token A and $y$ of token B, the pool maintains the invariant:
$$x \cdot y = k$$
$k$ stays approximately constant across swaps (it actually grows slightly as fees accrue). If a trader wants to buy $\Delta y$ of token B, they must deposit enough of token A to keep $k$ unchanged. The required deposit is:
$$\Delta x = \frac{k}{y - \Delta y} - x$$
The marginal price (the price of an infinitesimal trade) is simply $p = y / x$. The realized price (the price you actually pay for a finite trade) is worse than the marginal price — and the gap is called slippage. Slippage is large when the trade is large relative to the pool's reserves, and small when the pool is deep.
The chart below shows the curve $x \cdot y = k$ for a fixed value of $k$. The pool's current state is the marked dot on the curve. When a swap happens, the dot moves along the curve. Drag the slider to simulate a trade and see how the reserves and the marginal price shift.
Constant product is the right design for volatile pairs (ETH/USDC, where the price can move 50% in a week). It spreads liquidity uniformly across all possible prices from $0$ to $\infty$, so no matter where the price ends up, there's some liquidity there.
For a tokenized Treasury, this is wasteful. OUSG trades within a few cents of its NAV, week after week. An LP supplying a constant-product pool deposits capital that will sit at price points like $\$0.50$ or $\$5$ — prices that will never be reached. That capital earns no fees because no swaps happen there. To get a meaningful amount of liquidity available at prices near $\$1.00$, an LP would have to deposit enormous amounts of capital.
Uniswap v3 fixed this with concentrated liquidity: each LP picks a price range $[p_l, p_h]$, and their capital is only active within that range. Within the range, the LP behaves exactly like a constant-product LP for a hypothetical pool with "virtual" reserves; outside the range, the LP is entirely in one asset.
The key consequence for our project: a Uniswap v3 OUSG/USDC pool with $100k of TVL concentrated in the range $[\$0.99, \$1.01]$ provides roughly 50× the effective depth of a v2-style pool with the same nominal TVL — and a tighter range of $[\$0.998, \$1.002]$ pushes that to roughly 250×. This is why a "small" v3 pool by reported TVL can still meaningfully facilitate trading.
In v3, the price axis is divided into discrete "ticks" spaced by a fixed proportion (1.0001 per tick — about 1 basis point). Each LP position contributes liquidity to a range of ticks. The effective liquidity at the current tick is the sum of all positions that include that tick.
The chart below shows liquidity by tick for a synthetic OUSG-style pool. Adjust the LP-range parameter to see how concentrating positions into a tighter band around $\$1.00$ massively raises effective liquidity at the current price, at the cost of being "out of range" entirely if the price drifts far enough.
Curve's stableswap, introduced by Michael Egorov in 2020, uses a different invariant altogether — one designed from the start for assets that should trade near a fixed relative price. The invariant is:
$$A n^n \sum_i x_i + D = A D n^n + \frac{D^{n+1}}{n^n \prod_i x_i}$$
Don't memorize that. What matters is the shape: stableswap is a hybrid between a flat constant-sum curve (which would be perfect for assets at exactly equal price but offers no protection if they diverge) and a constant-product curve. The amplification coefficient $A$ controls how flat the curve is near the balanced point. High $A$ means very flat (very low slippage near equal balance) but sharp curvature once balance is disrupted; low $A$ means the curve behaves more like constant product everywhere.
In a USDC / STBT Curve pool with $A=100$, a $\$50k$ swap near balance might have slippage of one or two basis points. In a hypothetical Uniswap v2 pool with the same $\$2M$ TVL, the same swap would suffer something like 50 basis points of slippage. Curve's design is roughly $100×$ more capital-efficient near the peg, which is exactly what an RWA token needs.
Now that you understand the three pricing functions, two methodological points from the blueprint should make sense:
data_collection/03_pull_amm_pools.py.
With this background, the project's core hypothesis becomes economically clear. Before AMM listing, the only way to acquire OUSG is through Ondo's primary issuance channel: complete the KYC process, sign the subscription agreement, wire funds, and receive tokens 1-3 business days later at the day's NAV. This is a primary-market transaction, and the friction (time, paperwork, minimum sizes) limits who participates.
After AMM listing, any wallet on the allowlist can swap USDC for OUSG in a single atomic transaction with no minimum size, paying a few basis points of fees plus slippage. The friction collapses. We would expect this to:
Those three mechanisms together are the economic content of "AMM listing causes velocity to rise." The regression measures the magnitude. Chapter 15 revisits whether we can separately identify the three mechanisms (we cannot with this data; we can suggest paths forward).
Where transfer events come from, what's actually in a Transfer log, and the decision tree that separates a "real" trade from a custodial reshuffle.
Every transaction submitted to an Ethereum-compatible chain emits zero or more
logs. Logs are the chain's way of publishing structured side-effects
of a transaction — they are not stored in account state, but they are stored
permanently in the chain's block history and are cheap to filter and retrieve. The
ERC-20 standard requires that any token transfer emits a specific log called a
Transfer event, with three fields: from address,
to address, and value.
Every secondary-market trade we want to count is a Transfer log. Every mint is
also a Transfer log (with from = 0x000…000). Every burn is a Transfer
log (with to = 0x000…000). Every internal custodial movement at
Securitize is also a Transfer log. This is good — we get a complete record of every
movement. It is also bad — we have to filter aggressively to separate the kind of
movements we want from the kind we do not.
The raw log, exactly as the EVM emits it, looks like this:
{
"address": "0x96F6ef951840721adBF46Ac996b59E0235CB985C", // USDY contract
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", // Transfer event signature
"0x000000000000000000000000a0b8...c4ad19fec", // from (left-padded)
"0x000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045" // to (Vitalik's address)
],
"data": "0x000000000000000000000000000000000000000000000000056bc75e2d63100000",
"blockNumber": "0x12a3f4a",
"transactionHash": "0xabc...",
"logIndex": "0x42"
}
The key field is topics[0], which is the keccak-256 hash of the event
signature string "Transfer(address,address,uint256)". That hash —
0xddf252ad…b3ef — is identical across every ERC-20 contract on every
EVM chain. You filter by this topic when you want all Transfer events for a given
contract. topics[1] and topics[2] are the indexed
from and to addresses (left-padded to 32 bytes because
that's how the EVM stores them). The data field, also 32 bytes, holds
the integer value (in the token's raw "wei-equivalent" units — for USDY with 18
decimals, that hex value decodes to 100 USDY).
In practice we do not parse hex by hand. Alchemy's
alchemy_getAssetTransfers endpoint does the decoding and returns clean
JSON. But you should know the underlying structure for two reasons. First, when
something looks wrong — say, Alchemy returns 1,000 transfers but Etherscan shows
1,200 — you want to be able to verify the discrepancy by querying raw logs directly.
Second, the "transfer category" field that Alchemy returns has subtle semantics
that you cannot interpret without knowing where it comes from.
The blueprint's data-collection script makes JSON-RPC calls of this form:
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "alchemy_getAssetTransfers",
"params": [{
"fromBlock": "0x0",
"toBlock": "latest",
"contractAddresses": ["0x96F6ef951840721adBF46Ac996b59E0235CB985C"],
"category": ["erc20"],
"withMetadata": True,
"excludeZeroValue": False, # keep zero-value transfers (relevant for BUIDL allowlist updates)
"maxCount": "0x3E8", # 1000 per page (hex)
}]
}
The response contains up to 1,000 transfers plus a pageKey if there
are more. You loop on pageKey until it's null. Two parameters deserve
attention:
excludeZeroValue: False. By default Alchemy excludes
zero-value transfers. For BUIDL we want them: when Securitize updates the
allowlist or processes certain administrative events, it emits zero-value
Transfers between specific bookkeeping addresses. Including them lets us verify
our issuer-wallet list is complete. We then drop them in post-processing because
they're never secondary-market activity.
withMetadata: True. Returns the block timestamp
alongside each transfer. Without metadata, we'd have to call
eth_getBlockByNumber for every distinct block to recover timestamps —
an order of magnitude more requests. With metadata, one request is enough.
Not every Transfer event is a "secondary market trade." Most are not. The blueprint defines a four-step filtering decision tree, applied to every raw Transfer log we pull. The interactive widget below lets you walk a synthetic batch of transfers through the same logic and see what survives.
Each row below is a synthetic Transfer event. Click Apply filters and watch which ones get kept (green ✓), and why each rejected row was rejected. Toggle the filter rules on/off to see how each one bites.
The hardest part of step 3 ("drop transfers to or from issuer wallets") is knowing which addresses count as issuer wallets. For each of our seven tokens, this list is hand-built by:
Every addition to (and exclusion from) the list is logged in
notes/data_anomalies.md with a date and the reasoning. This is not
academic theater — when a reviewer asks "how did you decide that
0x123… was an issuer wallet?", you need a single document that
answers the question for every address. The blueprint's "Hot rules" mandate this.
One subtlety: Etherscan's free API does not provide historical holder counts — only the current count. We need a weekly holder series. The solution is to reconstruct holder counts from the transfer event log directly, by simulating running per-address balances.
The algorithm is straightforward in concept: sort all transfers (including mints
and burns) by block number. For each transfer, adjust the running balance of the
from address downward and the to address upward. At any
point in time, the holder count is the number of addresses with strictly positive
balance. By sampling the running state at, say, the end of each week, we get a
full historical series.
This is the same procedure that Etherscan and DefiLlama do internally. Doing it ourselves gives us reproducibility, and it lets us run sensitivity checks like: "what if we exclude holders with balances below $1?" or "what if we count holders with balance > 0 but no activity in the last 90 days separately?" Both of those sensitivities are reported as robustness checks in Chapter 14.
# pseudocode — see data_collection/04_pull_supply_holders.py
balances = {}
holder_count_by_week = {}
for tx in sorted(transfers, key=lambda t: t["block_num"]):
if tx["from"] != ZERO_ADDR:
balances[tx["from"]] -= tx["raw_value"]
balances[tx["to"]] = balances.get(tx["to"], 0) + tx["raw_value"]
# snapshot at end of each ISO week
week = iso_week(tx["block_timestamp"])
if week_just_ended(week, prev_week):
holder_count_by_week[prev_week] = sum(1 for v in balances.values() if v > 0)
Two practical reasons. First, querying "give me all USDY transfers between
blocks X and Y where value > $100k" is one SQL line against a SQLite database
and impossible against a CSV without re-parsing. Second, transfer pulls are
expensive (Alchemy compute units, time) — we want to never re-pull. SQLite with
a unique constraint on (token, tx_hash, from, to) and
INSERT OR IGNORE semantics makes re-runs idempotent. The blueprint's
hot rule #5 ("All data-pipeline scripts must be re-runnable") demands this.
The schema, from data_collection/01_pull_transfers.py:
CREATE TABLE IF NOT EXISTS transfers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
token VARCHAR(20) NOT NULL,
block_num INTEGER NOT NULL,
block_timestamp INTEGER NOT NULL,
tx_hash VARCHAR(66) NOT NULL,
from_address VARCHAR(42) NOT NULL,
to_address VARCHAR(42) NOT NULL,
value_raw TEXT NOT NULL,
value_usd REAL,
is_secondary INTEGER DEFAULT 0,
UNIQUE(token, tx_hash, from_address, to_address)
);
value_raw is stored as TEXT, not INTEGER — this matters because the
18-decimal tokens (OUSG, USDY, STBT) routinely produce raw values that exceed the
64-bit integer range. SQLite would silently round them otherwise. Lower-decimal
tokens (BUIDL at 6 decimals, USTB at 6, USYC at 8) fit in int64, but we use TEXT
uniformly so that one query path handles every token. The is_secondary flag is computed in the filtering step and
cached, so downstream regression code can simply
WHERE is_secondary = 1 without re-running the filter logic.
Stellar is a non-EVM chain with a fundamentally different data model. Stellar has
operations instead of transactions-with-logs, and the Horizon API exposes
/payments and /operations endpoints with cursor-based
pagination — the data is reachable, but there is no batched contract-address filter
equivalent to alchemy_getAssetTransfers, so collection walks operations
account-by-account and is materially slower. Building a robust Stellar pipeline
would take several weeks of dedicated effort.
Rather than do that, we scope BENJI to its Polygon deployment only. Polygon is EVM-compatible, so the exact same Alchemy pipeline works (Alchemy supports Polygon mainnet on the same API). The Polygon BENJI has fewer holders and lower volume than the Stellar BENJI, but for our purposes — providing a never-treated control unit — it is sufficient. Chapter 15 flags the multi-chain scoping as a limitation and discusses what a follow-up paper extending to Stellar would look like.
The blueprint specifies five validation checks that must pass before the data is considered "panel-ready":
These five checks are the data hygiene equivalent of unit tests. They are cheap to run and they catch the kinds of errors that would otherwise show up as inexplicable regression results three months later.
With the raw materials in hand — transfers, prices, supply, holder counts — the next chapter builds the actual dependent variable: secondary-market velocity.
The dependent variable. Why we annualize. Why we take the inverse hyperbolic sine. And why the zero-inflated distribution forces us into a two-part model robustness check.
The dependent variable in every specification of this paper is one number per token per week. Call it $V_{i,t}$ for token $i$ in week $t$:
$$V_{i,t} = \frac{\text{secondary transfer volume}_{i,t} \times 52}{\overline{\text{MCap}}_{i,t}}$$
The numerator is the sum of USD value of secondary transfers in week $t$, multiplied by 52 to annualize. The denominator is the average market capitalization over the same week (computed as the daily market cap on each of the seven days, averaged). The ratio has units of "fraction of supply turned over per year" — a velocity in the strict sense.
Each piece is built from data we collected in Chapter 4:
value_usd over all rows in the transfers table where token = $i$, is_secondary = 1, and the block timestamp falls within week $t$. Built in data_collection/06_assemble_panel.py.Histograms first, modeling later. Across the 7 tokens × 170 weeks = 1,190 token-week observations, with adjustments for unbalanced panel (USTB joining late, etc.) and pre-launch zeros excluded, we expect roughly 800–900 usable observations of $V_{i,t}$. The distribution is brutally skewed:
Plotting $V_{i,t}$ directly is uninformative — the tail compresses everything else. Two things have to happen before we can put this into a regression.
The textbook trick for skewed positive variables is $\log(V)$. But $\log(0)$ is undefined, and 40% of our observations are exactly zero. A common ad-hoc fix is $\log(V + 1)$ — but for small values of $V$, that shift is enormous in relative terms ($\log(0+1) = 0$ vs. $\log(0.1+1) \approx 0.095$ — a tenfold difference in $V$ maps to almost nothing).
The cleaner alternative is the inverse hyperbolic sine transform:
$$\text{IHS}(V) = \log\left(V + \sqrt{V^2 + 1}\right)$$
It is defined at zero ($\text{IHS}(0) = 0$). It behaves approximately like $V$ for small $V$ and like $\log(2V)$ for large $V$, so the marginal interpretation is almost the same as a log transform for the values that matter, but the function handles zeros smoothly. It is the standard transform in labor and household-finance empirical work when an outcome is mostly positive with mass at zero (Pence 2006, Burbidge-Magee-Robb 1988 are the canonical references).
The chart below compares the three options — raw $V$, $\log(V+1)$, and IHS($V$) — across the realistic range of velocity values for our panel.
The interpretation of an IHS coefficient depends critically on the regime of $V$ in which the change happens. For $V \gg 1$, IHS behaves like $\log(2V)$, so a unit change in $\text{IHS}(V)$ corresponds approximately to a unit change in $\log V$ — and one can read off semi-elasticities the same way as with a log transform. For $V \ll 1$, IHS is approximately linear (IHS$(V) \approx V$), so a unit change in IHS corresponds to a unit change in $V$ itself, and the $e^\beta - 1$ semi-elasticity does not apply.
For our project this distinction matters because most observations live in the $V \in [0, 0.5]$ regime where IHS is closer to linear than to log. So when we report "the CS estimator finds an ATT of 0.42 on IHS$(V)$", the cleanest reading is "AMM listing raises the IHS-transformed velocity by 0.42 units" — which, near $V=1$, is roughly a 42% relative increase, but for tokens like BUIDL (with $\bar V \approx 0.005$) it means an absolute velocity increase of roughly 0.4. We report both readings in the paper's results section and avoid a single misleading "X% increase" headline that does not apply uniformly across the sample.
Even after IHS, the top of the distribution has a few extreme observations — weeks
where USDY's velocity touched 50+, or where a single large arbitrage event spiked
OUSG temporarily. These observations matter, but they also have enormous influence
on regression coefficients. The blueprint specifies winsorizing at the 99th
percentile — i.e., replacing any value above the 99th percentile with the 99th
percentile value itself. We construct both ihs_velocity (unwinsorized)
and ihs_velocity_w (winsorized) and report the winsorized version as
the main spec, with the unwinsorized as a robustness check (Chapter 14).
Why winsorize at 99% and not 95%? Because at 95% we lose dozens of observations across the panel, and several of those observations are exactly the kind of high-velocity weeks the AMM-listing hypothesis predicts. The 99th percentile cuts only the most extreme single-week spikes (mostly arbitrage events around macro announcements) without truncating the bulk of treatment-relevant variation.
Even after IHS and winsorization, 40% of our observations are exactly zero. This creates a particular kind of statistical problem: the data-generating process for "any trade happens" may be quite different from the data-generating process for "how much trades, conditional on at least one trade happening." The two processes might respond to AMM listing differently.
A standard fix is a two-part (hurdle) model:
The full marginal effect of AMM listing is then the combination of the two pieces: AMM listing might make trading happen at all in some weeks (extensive margin) and also make existing trading weeks bigger (intensive margin). Reporting both separately gives the reader a richer mechanism understanding than a single coefficient ever could.
We do not run two-part as the main spec, for two reasons. First, it complicates the CS estimator (the CS framework is built around continuous outcomes; running it separately on the Probit DV and then on the conditional OLS DV produces two separate ATT objects that have to be combined carefully). Second, with only ~800 observations and ~40% zeros, the Probit half has only ~480 "trade happened" observations to estimate intensive-margin variation. Statistical power on the intensive-margin CS estimate becomes uncomfortably low. We report two-part as a robustness check in Chapter 14 and discuss the mechanism implications.
For completeness, the full panel that ends up in the regression has 8 columns per token-week:
| Column | Source | Role |
|---|---|---|
ihs_velocity_w | built above | Dependent variable |
amm_listed_10k | DefiLlama pools | Treatment (binary), main spec |
log_amm_tvl | DefiLlama pools | Continuous treatment intensity (alt spec) |
log_mcap | chain + NAV | Time-varying control: token size |
log_holders | reconstructed | Time-varying control: holder base |
token_age_weeks | known launch date | Time-varying control: maturity |
ffr | FRED (DFF series) | Macro control: short-rate environment |
log_defi_tvl | DefiLlama charts | Macro control: overall DeFi activity |
Two implicit "controls" come for free: token fixed effects absorb everything time-invariant about token $i$ (issuer, KYC regime, decimals, baseline audience), and week fixed effects absorb everything that hits all tokens equally in week $t$ (FOMC announcements, market-wide RWA-sector news, seasonal patterns). These are the workhorses of any panel design.
When you eventually read Table 3 of the paper and see "the ATT is 0.42 on IHS velocity", use the right rule for the value regime you care about:
$$\Delta V / V \approx \Delta \text{IHS}(V) \quad \text{when } V \gg 1 \qquad \text{(semi-elasticity regime)}$$
$$\Delta V \approx \Delta \text{IHS}(V) \quad \text{when } V \ll 1 \qquad \text{(linear regime)}$$
For our project, most token-weeks sit in or near the linear regime, so the cleaner reading of an ATT of 0.42 is "secondary velocity is roughly 0.4 units higher than it would have been in the counterfactual" — not "velocity increased by 52%". Table captions in the paper flag the regime they're translating from.
With the dependent variable carefully constructed, the next chapter steps away from data plumbing to read the paper this project is in conversation with: Mafrur's RWA Liquidity (arXiv 2508.11651). We need to know exactly what it did, what it skipped, and what the gap is that this project fills.
A detailed read of the descriptive study this project extends — what it found, what it skipped, and the precise gap a causal estimator can fill.
Rifqi Mafrur's working paper RWA Liquidity: A Cross-Asset Empirical Examination of Tokenized Real-World Assets on Public Blockchains (arXiv 2508.11651, August 2025) is the most-cited recent empirical descriptive study of the RWA tokenization sector. It does three things:
Three things deserve credit. First, the data work is genuinely careful — Mafrur manually curates issuer wallet exclusion lists for every token in the sample, and documents the methodology in a reproducible-looking appendix. Second, the classification scheme is useful: "dormant / intermittent / active" maps nicely onto the way DeFi practitioners describe RWA tokens informally, and it gives a clean way to summarize 24 tokens worth of activity in one table. Third, the paper is aware of its descriptive limits and explicitly punts the causal question — "future work should consider quasi-experimental designs to isolate the effect of AMM listing on secondary market activity" — as the closing line of the conclusion.
That closing line is the explicit invitation this project responds to.
Three gaps, in increasing order of how much they matter.
1. No regression of any kind. Mafrur's strongest statement about AMM listing is a cross-tabulation: "of the 11 tokens with active AMM presence, 8 fall in the active liquidity bucket; of the 13 tokens without AMM presence, only 2 do." This is a 2×2 table, not an inferential statement. There is no standard error, no test of the cross-tabulation's significance, no control for token-level heterogeneity. A reader cannot judge whether the difference reflects causal effect, reverse causation (AMMs list tokens that are already active), or selection (issuers who put their tokens on AMMs are systematically different from issuers who don't).
2. No time dimension within token. Mafrur's classification collapses each token's full history into a single category. This throws away the single most useful piece of variation: within-token, before-vs-after AMM listing. For OUSG, which was un-listed for 44 weeks and then listed for 126, Mafrur reports one category ("active") covering both periods. The whole identification opportunity — same token, same issuer, same institutional structure, with a sharp treatment in the middle — is wasted.
3. No counterfactual. Even granting that AMM-listed tokens have higher activity, the question Mafrur cannot answer is: would this token have been more active anyway? The same Ondo growth trajectory that produced OUSG's AMM listing in late 2023 might independently have produced higher velocity. Mafrur's classification cannot distinguish this from a treatment effect. A panel design with token fixed effects, time fixed effects, and a credible parallel-trends assumption can. That is the project this textbook walks you through.
| Dimension | Mafrur (2025) | This project |
|---|---|---|
| Unit of analysis | token | token-week |
| Sample size | 24 tokens | 7 tokens × ~170 weeks (≈ 800–900 usable token-week obs after pre-launch and missing-covariate drops) |
| Dependent variable | liquidity bucket (3 levels) | IHS(velocity), continuous |
| Treatment | AMM presence (current) | AMM listing event (staggered, dated) |
| Identification | none (descriptive) | staggered DiD (Callaway-Sant'Anna) |
| Pre-trends? | not tested | event-study with pre-period coefficients |
| Controls | none | mcap, holders, age, FFR, DeFi TVL + FEs |
| Robustness | some sample alternatives | ~8 specifications + placebo + Bacon decomp |
| Claim type | correlation | causal estimate of ATT (under assumptions) |
The narrower sample (7 tokens vs. 24) is a tradeoff. We get richer per-token data and a clean treatment definition, at the cost of statistical power. Chapter 11 discusses this tradeoff carefully; Chapter 15 explains why a follow-up paper with ~20 tokens would be the natural extension.
In the paper's introduction, our contribution paragraph should read something like:
We extend Mafrur (2025), which classified tokenized RWAs by their liquidity profiles, by introducing a within-token, before-versus-after research design. Where Mafrur reports that AMM-listed tokens are observationally more active, we ask the underlying causal question: does AMM listing make a given token more active, holding the issuer, the regulatory regime, the holder base, and common market shocks fixed? We answer this with the Callaway-Sant'Anna staggered difference-in-differences estimator, fit to a panel of seven tokenized U.S. Treasury instruments over 170 weeks. Our headline estimate [TBD — to be filled in from the actual ATT once estimated; placeholder magnitudes here should NOT be quoted] finds a significant increase in secondary-market velocity following AMM listing, driven primarily by pool depth above the $50k threshold.
(The exact magnitude will be filled in from the actual estimates. The structure of the contribution paragraph — extend the descriptive predecessor, name the causal question, name the estimator, summarize the result — is what reviewers look for in the first paragraph of an empirical paper.)
Mafrur is not the only relevant prior work, just the most direct predecessor. In the literature review, the project will also cite:
The Sockin-Xiong cite matters because it lets us frame the paper as testing a theoretical prediction rather than purely descriptive empirical work. Reviewers reward this framing.
Before continuing to Chapter 7, you should:
With the predecessor paper read, the next chapter pivots to the methodological backbone of our extension: causal inference using potential outcomes, the difference-in-differences identification strategy, and the parallel-trends assumption that everything rides on.
Potential outcomes, the fundamental problem, average treatment effects, and the difference-in-differences identification strategy in its simplest 2×2 form.
Imagine OUSG in week 50 of our sample. Two parallel worlds exist:
The causal effect of AMM listing on OUSG in week 50 is the difference between these two potential outcomes:
$$\tau_{\text{OUSG}, 50} = Y_{\text{OUSG}, 50}(1) - Y_{\text{OUSG}, 50}(0)$$
This quantity is the holy grail. It is also fundamentally unobservable, because we only ever see one of the two potential outcomes for any given unit at any given time. This is the fundamental problem of causal inference (Holland 1986). Every causal estimator is, at heart, a strategy for plausibly imputing the missing potential outcome.
Because we cannot estimate individual treatment effects, we settle for averages. The Average Treatment effect on the Treated (ATT) is the average of $\tau_{i,t}$ across the units and time periods where treatment was actually applied:
$$\text{ATT} = \mathbb{E}[Y_{i,t}(1) - Y_{i,t}(0) \mid D_{i,t} = 1]$$
where $D_{i,t} = 1$ indicates that unit $i$ was treated in period $t$. ATT answers the question "for the tokens that were AMM-listed during our sample, how much did listing change their average velocity?" Note it does not answer "what would happen if we listed BUIDL on an AMM" — that's a different estimand (ATU, average treatment effect on the untreated) and harder to identify.
The Callaway-Sant'Anna estimator estimates a richer object — $\text{ATT}(g, t)$, the ATT for treatment cohort $g$ in calendar period $t$ — but every aggregation of CS estimates rolls back into an ATT-style summary. Keep this in mind: throughout the paper, when we say "the treatment effect", we strictly mean ATT, never ATE.
Suppose, for a moment, we had only one treated token (OUSG) and one untreated token (BUIDL), and two periods: a "before" period (averaged over weeks before OUSG's listing) and an "after" period (averaged over weeks after). We observe:
| Before | After | |
|---|---|---|
| OUSG (treated) | $\bar Y_{\text{O, pre}}$ | $\bar Y_{\text{O, post}}$ |
| BUIDL (control) | $\bar Y_{\text{B, pre}}$ | $\bar Y_{\text{B, post}}$ |
The 2×2 DiD estimator of the ATT for OUSG is the "difference of differences":
$$\widehat{\text{ATT}}_{\text{DiD}} = \left( \bar Y_{\text{O, post}} - \bar Y_{\text{O, pre}} \right) - \left( \bar Y_{\text{B, post}} - \bar Y_{\text{B, pre}} \right)$$
In words: the change in OUSG's velocity around its listing event, minus the change in BUIDL's velocity over the same calendar period. The intuition is that BUIDL's change tells us how much OUSG would have changed even without listing, due to common time effects (macro, sector, weather, anything). Netting that out leaves us with the part of OUSG's change that is specific to its treatment.
Set the four cell values below and watch the DiD estimate update. The chart on the right shows the implied parallel-trends assumption (BUIDL's actual trajectory and the assumed counterfactual for OUSG).
The 2×2 DiD estimator is unbiased for the ATT if and only if the counterfactual outcome trajectory for the treated unit (had it not been treated) would have moved in parallel with the control unit's actual trajectory:
$$\mathbb{E}\!\left[Y_{\text{O,post}}(0) - Y_{\text{O,pre}}(0)\right] = \mathbb{E}\!\left[Y_{\text{B,post}}(0) - Y_{\text{B,pre}}(0)\right]$$
This is the parallel trends assumption. It is not testable directly (we cannot observe $Y_{\text{O,post}}(0)$ — that's the whole point), but we can look at pre-treatment trends as a plausibility check. If OUSG and BUIDL moved in parallel for many weeks before OUSG's listing, the assumption is more plausible than if they were diverging. (More on the limits of this check in Chapter 12 — it is much less informative than it appears.)
Drag the counterfactual line below to set what you believe OUSG's velocity would have done in the absence of AMM listing. The observed treated-minus-counterfactual gap is the true causal effect. The DiD estimator assumes the counterfactual change equals the control's actual change — drag to see what happens to the estimate when this assumption is wrong.
With more than two units or more than two periods, the natural generalization of DiD is a panel regression with token fixed effects and time fixed effects:
$$Y_{i,t} = \alpha_i + \delta_t + \beta \cdot D_{i,t} + \varepsilon_{i,t}$$
Here $\alpha_i$ is a fixed effect for each token (absorbing time-invariant differences across tokens — BUIDL's institutional KYC, BENJI's chain), $\delta_t$ is a fixed effect for each week (absorbing common shocks — FOMC, regulatory news), and $D_{i,t}$ is a binary indicator that equals 1 once token $i$ has been treated. The coefficient $\beta$ is — under the parallel trends assumption — the average treatment effect.
This is called the two-way fixed effects (TWFE) regression, and it has been the workhorse of empirical economics for forty years. It is ALMOST always what someone writes down first when they have panel data with staggered treatment.
And — this is where Chapter 8 picks up — it turns out that when treatment is staggered across units (different units treated in different periods, as in our project), the TWFE coefficient $\beta$ is NOT generally a clean estimate of the ATT. It is a weighted average of many 2×2 comparisons. The weights themselves are non-negative and sum to 1, but a subset of those comparisons silently use already-treated units as controls — and under dynamic treatment effects, those comparisons subtract a chunk of the treatment effect from the implied ATT estimate. This is the Goodman-Bacon (2021) decomposition, and understanding it is the gateway to understanding why we use Callaway-Sant'Anna instead.
Three things to lock in:
Why the workhorse two-way fixed-effects estimator gives the wrong answer under staggered treatment, not because its weights are negative (they aren't) but because some of the implicit 2×2 comparisons it averages use already-treated units as controls.
Chapter 7 ended with the TWFE specification:
$$Y_{i,t} = \alpha_i + \delta_t + \beta \cdot D_{i,t} + \varepsilon_{i,t}$$
Three treated cohorts in our project: OUSG at week 44, USDY at week 68, STBT at week 92. Four never-treated controls. A naive reader might assume the TWFE coefficient $\hat\beta$ is some kind of weighted average of the individual treatment effects for these three cohorts.
The Goodman-Bacon (2021) decomposition tells us exactly what $\hat\beta$ is: it is a weighted average of every possible 2×2 DiD comparison hidden inside the panel. And — this is the surprise — some of those comparisons use already-treated units as controls for not-yet-treated units. When the treatment effect grows over time (a "dynamic treatment effect", which is exactly what we expect for AMM listing), those comparisons enter the weighted average with the wrong sign and bias $\hat\beta$ downward — possibly all the way through zero.
With three cohorts (early-treated E, late-treated L, never-treated N), TWFE computes three types of 2×2 DiD inside itself:
Type 3 is the killer. The TWFE machine cannot distinguish "early-treated unit's changing outcome" from "control unit's expected counterfactual change". It treats E's post-treatment dynamics as if they were E's untreated trajectory. Then when L's treatment kicks in and L's outcome rises faster than E's (which is plateauing), the comparison subtracts E's continued rise — pulling the estimate of L's effect downward, sometimes flipping its sign.
TWFE = (weighted avg of clean 2×2 comparisons) − (weighted avg of forbidden 2×2 comparisons that subtract dynamic treatment effects). Under dynamic treatment effects, TWFE is biased toward zero or even toward the wrong sign.
The interactive widget below shows three units with adjustable treatment timing and an adjustable dynamic-treatment-effect shape. The chart at the top shows the raw outcomes. The chart at the bottom decomposes the TWFE coefficient into its three building-block 2×2 comparisons, with their Bacon weights. Negative weights appear in red. Notice how the forbidden comparison dominates as the dynamic effect grows.
bacondecomp::bacon() in R. The point of the visualization is the
direction of bias contributed by the forbidden comparison (marked bar
under dynamic effects), not the exact numbers.
Our three treated cohorts (OUSG, USDY, STBT) are exactly the staggered structure that creates forbidden comparisons. And we have strong prior reasons to expect dynamic treatment effects — AMM TVL builds gradually over weeks after a pool is created, and the velocity response should plausibly grow as more LPs provide liquidity and more traders find the pool.
If we ran TWFE blindly on this panel:
We still report TWFE in the paper, as Table 2 — but as a comparison baseline,
not the preferred specification. The blueprint's
analysis/02_twfe_baseline.R runs the regression and reports the
coefficient alongside the result of bacondecomp::bacon(), which
decomposes the TWFE estimate into its building blocks and reports the weights. If
the forbidden comparisons (using already-treated units as controls) account for a
non-trivial fraction of the total Bacon weight (we expect 15–25% in this sample),
that is itself a finding worth showing
a reviewer — it justifies the move to Callaway-Sant'Anna.
Goodman-Bacon proves that the TWFE coefficient under staggered treatment equals:
$$\hat\beta_{\text{TWFE}} = \sum_{k} w_k \cdot \widehat{\text{ATT}}_k^{2\times 2}$$
where the index $k$ runs over all possible 2×2 comparisons embedded in the panel and $w_k$ are non-negative weights that sum to 1 (in the sense that the comparison receives a positive weight in the decomposition). The bias arises because the "treatment" assignment in some of those 2×2 comparisons is wrong: an already-treated unit being used as control means the comparison's $\widehat{\text{ATT}}^{2\times 2}$ equals (true ATT of late cohort) MINUS (dynamic-effect change of early cohort over the same window). Subtracting a positive dynamic-effect contamination pulls the reported "ATT" downward.
The fix is to never use treated units as controls. Callaway-Sant'Anna does exactly this by construction: it builds $\widehat{\text{ATT}}(g, t)$ as a direct DiD between cohort $g$ at period $t$ and the never-treated (or not-yet-treated) units only, with no aggregation that could re-introduce contamination. That's the topic of Chapter 9.
A treatment-effect estimator that — by construction — never uses a treated unit as a control. The methodological backbone of the project.
Callaway and Sant'Anna (2021) sidestep the TWFE problem by defining a more granular estimand. Rather than collapse the entire panel into one coefficient, they define the average treatment effect for each (cohort, calendar period) cell:
$$\text{ATT}(g, t) = \mathbb{E}\!\left[Y_t(g) - Y_t(\infty) \mid G_i = g\right]$$ where $Y_t(g)$ is the potential outcome at time $t$ for a unit first treated at time $g$, and $Y_t(\infty)$ is the never-treated potential outcome.
Here $g$ is the period in which a unit was first treated (its cohort), and $t$ is calendar time. $\text{ATT}(44, 60)$ would read as "the average treatment effect on units that were first treated in week 44, evaluated in week 60". For our project, $g \in \{44, 68, 92\}$ (the three treated cohorts) and $t$ runs from 1 to 170. So the full set of $\text{ATT}(g, t)$ values forms a grid with about 400 cells worth estimating (each cohort $g$ contributes estimates for every $t \geq g$).
For a chosen cohort $g$ and period $t \geq g$, the CS estimator constructs the simplest possible 2×2 DiD:
$$\widehat{\text{ATT}}(g, t) = \left[ \bar Y_{g, t} - \bar Y_{g, g-1} \right] - \left[ \bar Y_{\mathcal C, t} - \bar Y_{\mathcal C, g-1} \right]$$
where the bars denote sample means, the first bracketed term is the change in cohort $g$'s outcome between its last pre-treatment period $g-1$ and the current period $t$, and the second bracketed term is the analogous change in a chosen control group $\mathcal C$. There are two natural choices for $\mathcal C$:
control_group = "nevertreated"):
$\mathcal C$ = the units that are never treated within the sample window. In
our project, that's BUIDL, BENJI, USTB, USYC.
control_group = "notyettreated"):
$\mathcal C$ = units that have not been treated by period $t$. So when
estimating $\text{ATT}(44, 50)$, the eligible not-yet-treated control units include
USDY (will be treated at 68, still untreated at 50) and STBT (will be treated at
92, still untreated at 50). When the estimator later evaluates $\text{ATT}(44, 70)$,
USDY is excluded from the control group because it became treated at 68.
The two choices have a tradeoff. Never-treated is the most conservative — those units' parallel-trends assumption is the cleanest because they are never disturbed by treatment. But never-treated has fewer units, and they may differ structurally from the treated units in ways that violate parallel trends (BUIDL is institutional-only; OUSG is not). Not-yet-treated has more units and better matches the treated cohort structurally — they are the kind of tokens that did end up getting AMM-listed — but the eligible control pool shrinks as $t$ grows, and the ATT(g, t) for very long horizons may rest on a thin control set.
Our main spec uses never-treated for conservatism. We report not-yet-treated as a robustness check in Chapter 14.
Below is a synthetic but realistic visualization of the full ATT(g, t) grid. Each cell is a single 2×2 DiD comparison. Empty cells are pre-treatment (where $t < g$, no treatment has happened yet, so the ATT is not defined). Colored cells are post-treatment, with color encoding the magnitude of the estimated ATT.
A grid of 400 cells is not what we report in a paper. The CS framework provides
principled aggregation rules that collapse the grid into one of several
summary objects. The did::aggte() function in R offers four:
type = "simple" — a weighted average of all
post-treatment ATT(g, t), weighted by cohort size. Returns one number, the
overall ATT.
type = "dynamic" — re-indexes time as $e = t - g$
(event time, weeks since treatment), and reports ATT at each event time. This
is the most useful aggregation for a paper because it produces an event-study
plot.
type = "group" — reports a separate ATT per cohort.
Useful for asking "is the OUSG effect different from the USDY effect?"
type = "calendar" — reports ATT per calendar period,
averaged across cohorts. Useful for asking whether the treatment effect varies
across macro regimes (low-rate vs. high-rate weeks).
Our paper reports all four. The headline result in Table 3 is from
type = "simple"; the event-study plot in Figure 2 is from
type = "dynamic"; the cohort heterogeneity discussion uses
type = "group".
The event-study aggregation is the single most informative plot in the project. The x-axis is event time (event-time 0 is the listing week; -8 is 8 weeks before; +12 is 12 weeks after). The y-axis is the estimated ATT, with confidence bands. The plot tells you three things at once: (1) the pre-treatment ATTs should hover around zero — that's the pre-trends test visualized; (2) the post-treatment ATTs show how the effect builds up over time; (3) the confidence bands tell you how precisely each ATT is estimated.
The CS framework allows two estimation methods for each ATT(g, t), controlled by
the est_method argument in att_gt():
"reg" (regression adjustment) — fits a linear
regression of $Y_t - Y_{g-1}$ on the controls in the control group, then uses
that fitted model to impute the counterfactual change for the treated cohort.
Sensitive to model misspecification but works well in small samples.
"ipw" (inverse probability weighting) — fits a
propensity-score model for being in cohort $g$, then weights the control group
by inverse propensity scores. More robust to outcome model misspecification but
requires the propensity-score model to be correctly specified.
"dr" (doubly robust) — combines both, providing
consistent estimates if either the outcome model or the propensity-score
model is correctly specified.
Our main spec uses "reg" for simplicity and small-sample stability.
The doubly robust estimator is reported as a robustness check, but with only 7
units the propensity-score component is too underpowered to add much. Chapter 14
reports the comparison.
library(did)
library(tidyverse)
panel <- read_csv("data/panel_weekly.csv")
panel$token_id <- as.integer(panel$token_id)
panel$week_num <- as.integer(panel$week_num)
panel$first_amm_week <- as.integer(panel$first_amm_week) # 0 if never treated
cs_main <- att_gt(
yname = "ihs_velocity_w",
gname = "first_amm_week",
idname = "token_id",
tname = "week_num",
xformla = ~ log_mcap + log_holders + token_age_weeks + ffr + log_defi_tvl,
data = panel,
control_group = "nevertreated",
est_method = "reg",
allow_unbalanced_panel = TRUE,
panel = TRUE
)
# Aggregations
agg_simple <- aggte(cs_main, type = "simple")
agg_dynamic <- aggte(cs_main, type = "dynamic", min_e = -8, max_e = 12)
agg_group <- aggte(cs_main, type = "group")
agg_calendar <- aggte(cs_main, type = "calendar")
summary(agg_simple) # headline ATT
summary(agg_dynamic) # event-study coefficients
ggdid(agg_dynamic) # the event-study plot
xformla
argument controls which covariates enter the conditional parallel-trends
regression. If we omit a relevant covariate that varies across cohorts in a way
that correlates with treatment timing, the resulting ATT(g, t) estimates are
biased. Our spec includes the obvious time-varying controls but does not include
token-specific interactions; reviewer-anticipated robustness check.
With Callaway-Sant'Anna established as our preferred estimator, Chapter 10 surveys the other modern estimators in the same family — Sun-Abraham, Borusyak-Jaravel- Spiess, de Chaisemartin-D'Haultfœuille — and explains why we report CS as primary but run Sun-Abraham as a robustness check.
The other modern staggered-DiD estimators, what each does differently, and why we use Sun-Abraham specifically as a robustness check.
Goodman-Bacon's 2021 paper made the TWFE problem visible. Within roughly two years, four research teams independently proposed estimators that solved it. Their frameworks differ in details, but each one shares the same core insight: never use already-treated units as controls. The four are:
did_multiplegt.
Under "standard" conditions (no anticipation, parallel trends, no controls), the four estimators are approximately equivalent — they target the same population estimand and differ only in their efficiency and small-sample behavior. They can diverge under one of three conditions:
fixest::sunab() implementation
uses the never-treated cohort as the omitted reference when one exists, and
otherwise the last-treated cohort. Borusyak-Jaravel-Spiess use all not-yet-treated
observations.
type = "simple" aggregation uses uniform weighting. The two can
differ by 5–15% in samples like ours.
Sun-Abraham (SA) is the most pedagogically useful alternative because it lives inside the TWFE framework. You write down a TWFE regression but replace the single treatment dummy with a saturated set of cohort-by-event-time interactions:
$$Y_{i,t} = \alpha_i + \delta_t + \sum_{g} \sum_{e \neq -1} \beta_{g,e} \cdot \mathbb{1}[G_i = g] \cdot \mathbb{1}[t - g = e] + \varepsilon_{i,t}$$
The coefficients $\beta_{g, e}$ are direct estimates of the cohort-specific event-time effects. To produce an overall event-time path, SA averages $\beta_{g, e}$ across cohorts at each event time $e$, weighted by cohort size. Because the "treatment" indicator is now cohort-specific, the forbidden-comparison problem vanishes — there is no longer a single $\beta$ that pools across cohorts.
In fixest (R) the SA estimator is one line:
library(fixest)
sa_main <- feols(
ihs_velocity_w ~ sunab(first_amm_week, week_num) +
log_mcap + log_holders + token_age_weeks + ffr + log_defi_tvl |
token_id + week_num,
data = panel,
cluster = ~token_id
)
iplot(sa_main,
main = "Sun-Abraham event study",
xlab = "Weeks relative to first AMM listing",
ylab = "ATT on IHS(velocity)")
The sunab(first_amm_week, week_num) macro inside the formula expands
to the full set of cohort-by-event-time interactions automatically.
CS and SA, fit to the same panel with the same covariates and the same control group, should produce numerically similar point estimates. If they do, that is strong evidence that the result is not driven by a peculiarity of one estimator's implementation. If they disagree substantially, that's a flag — usually pointing to an issue with the not-yet-treated vs. never-treated distinction or to a sample where the propensity-score model is unstable.
Our project's Table 4 reports CS as the headline, with SA in column 2 for direct comparison. The expectation is point estimates within ±10% of each other and overlapping confidence intervals. If they don't agree, that becomes a finding worth discussing in the text rather than burying.
The cleanest conceptual estimator. Fit a model of $Y_{i,t}$ on token FEs, time FEs, and covariates, using only the untreated observations. Use the fitted model to predict the counterfactual outcome $\hat Y_{i,t}(0)$ for treated observations. The estimated treatment effect for unit $i$ at time $t$ is then $Y_{i,t}^{\text{obs}} - \hat Y_{i,t}(0)$.
Implemented as the did_imputation R package or as
didimputation in Stata. Conceptually attractive but in our sample
tends to produce wider confidence intervals than CS because of how it propagates
uncertainty from the imputation step. We do not report it in the main paper, but
it is in analysis/05_robustness.R for completeness.
Focuses on cohort-specific DiD with explicit allowance for treatment-effect
heterogeneity in arbitrary directions. Implemented as did_multiplegt.
Most useful when treatment is continuous (a dose, an intensity), which
is the case for our $\log(\text{AMM TVL})$ specification but not the binary
$\text{amm\_listed}$ spec. We report it as a sensitivity check specifically for
the continuous-treatment regression in Chapter 13.
| Estimator | Building block | R package | Use in our paper |
|---|---|---|---|
| Callaway-Sant'Anna | ATT(g, t) + aggregation | did | Main specification |
| Sun-Abraham | Cohort × event-time interactions | fixest::sunab() | Robustness comparison |
| Borusyak-Jaravel-Spiess | Counterfactual imputation | didimputation | Secondary robustness |
| de Chaisemartin-D'Haultfœuille | Cohort DiD, continuous treatment | did_multiplegt | Continuous-treatment robustness |
| TWFE (Goodman-Bacon decomposed) | Pooled regression | fixest::feols() | Comparison baseline + Bacon decomp |
Of the five, three appear in the paper's tables. The others are run as sanity checks and reported only if they diverge from the headline.
In a journal review, the most likely methodological pushback will be: "Why CS and not Sun-Abraham?" The defensible answer is the one above — they should agree, and reporting both is sufficient. A more aggressive reviewer might ask about Borusyak-Jaravel-Spiess specifically, because it has the cleanest theoretical foundation; the answer there is that we ran it, the point estimate is similar but with a wider confidence interval, and we discuss the cost-benefit in an appendix.
With the menu of estimators established and CS chosen, the next chapter turns to the inference problem that lurks under all of them: with only 7 clusters, the conventional cluster-robust standard errors are unreliable. The fix is the wild cluster bootstrap.
Why conventional cluster-robust standard errors lie when N is small, and how the wild cluster bootstrap (with Webb weights) tells the truth.
Two velocity observations from OUSG — say, week 50 and week 51 — are not independent. They share the same issuer, the same investor base, the same KYC regime, the same recent news. The residuals from any regression we fit are therefore correlated within token. Failing to account for this correlation leads to standard errors that are too small — the regression "thinks" each token-week is an independent draw, when really there are far fewer "independent observations" than the raw count suggests.
The standard correction is cluster-robust standard errors
(CR-SEs), introduced by Liang and Zeger (1986) and routinely used in panel data
since Bertrand, Duflo and Mullainathan (2004). They reweight the variance
computation to allow arbitrary correlation within each cluster. In our
regression, the clusters are tokens — so we report standard errors clustered
at the token level. That's the meaning of cluster = ~token_id in
the fixest call and of vcov = "cluster" in the
did call.
All good — except CR-SEs have a known asymptotic property: they require the number of clusters to be "large", in some informal sense. The standard rule of thumb is N ≥ 30 clusters. Our N is 7.
Cameron and Miller (2015) is the canonical practitioner's guide to this problem. They identify three things that go wrong with conventional CR-SEs when N is small:
The practical consequence: a study with N=7 that reports a 95% confidence interval using conventional CR-SEs is probably reporting something more like an 80% interval in reality. Type I error rates can be 15–25% rather than the nominal 5%.
The wild cluster bootstrap was proposed by Cameron, Gelbach, and Miller (2008) and remains the consensus solution for few-cluster inference. The recommended variant for hypothesis testing is the restricted wild cluster bootstrap (WCR), which imposes the null hypothesis before resampling. The recipe:
The key statistical fact: under $H_0$, the bootstrap distribution is asymptotically correct even as N gets small, because the sign-flips preserve the within-cluster correlation structure exactly. Roodman et al. (2019) showed in extensive simulations that WCR with Webb weights gives near-nominal coverage at N as small as 5. The unrestricted variant (WCU), which resamples around the unrestricted $\hat\beta$, is faster to compute but has noticeably worse coverage in our N=7 regime; we use WCR.
A separate small-N correction is also baked into fixest's analytical
cluster-robust variance: the CR1 scaling
$\frac{G}{G-1} \cdot \frac{N-1}{N-K}$ where $G$ is the number of clusters, $N$ is
total observations, and $K$ is the number of parameters. Without this scaling the
CR estimator is biased downward; with it, the bias is smaller but still material at
$G = 7$. The bootstrap is what carries the day; the analytical SE is reported only
alongside as a comparison.
The widget below runs a synthetic wild cluster bootstrap. The "data" are 7 cluster-level mean residuals. Click "Run bootstrap" to draw 999 sign-flipped replications and see the bootstrap distribution. Compare the bootstrap-based 95% CI to the conventional cluster-robust 95% CI (the orange dashed band).
The wildboottest package implements the wild cluster bootstrap
directly on top of a fixest regression:
library(fixest)
library(wildboottest)
twfe <- feols(
ihs_velocity_w ~ amm_listed_10k + log_mcap + log_holders +
token_age_weeks + ffr + log_defi_tvl |
token_id + week_num,
data = panel
)
boot_result <- boottest(
twfe,
param = "amm_listed_10k",
clustid = "token_id",
B = 9999,
type = "webb"
)
summary(boot_result)
# returns bootstrap p-value and 95% confidence interval
For the Callaway-Sant'Anna estimator, the cleanest path is to use the
bstrap argument of att_gt(), which performs the bootstrap
natively on the ATT(g, t) components:
cs_main <- att_gt(
yname = "ihs_velocity_w",
gname = "first_amm_week",
idname = "token_id",
tname = "week_num",
data = panel,
control_group = "nevertreated",
bstrap = TRUE,
biters = 9999,
cband = TRUE # uniform (rather than pointwise) confidence bands
)
cband = TRUE requests uniform confidence bands across the entire
event-study curve. Without this, the per-event-time CIs would each have nominal
coverage but the simultaneous coverage across all event times would be lower —
and that simultaneous coverage is what matters for visual inspection of the plot.
Every standard error reported in any table is the wild cluster bootstrap version (Webb weights, B=9999). Every confidence interval on an event-study plot uses uniform bands. The paper's methodology section explicitly cites Cameron-Miller (2015) and Roodman et al. (2019) to justify these choices, and the appendix contains a comparison table showing conventional CR-SEs alongside bootstrap SEs so a sophisticated reader can see the small-N adjustment quantitatively.
No amount of clever bootstrap fixes the basic fact that N=7 produces wide confidence intervals. If the true ATT on IHS(velocity) is 0.5 and the bootstrap-implied standard error is 0.3, our 95% CI is roughly (−0.1, 1.1) — we cannot rule out either a zero effect or a doubling effect. That's not a failure of the inference procedure; that's an honest reflection of the data. Chapter 12 covers exactly how the same N=7 makes pre-trend tests almost useless. Chapter 15 explains how to acknowledge this honestly in the paper.
Why a pre-trend test that fails to reject does not validate parallel trends — and the Roth (2022) critique that should keep you humble.
Every paper using a DiD design includes some version of this ritual. The author shows an event-study plot. The pre-treatment ATT coefficients are statistically indistinguishable from zero. The author writes: "consistent with parallel trends". Reviewer accepts. Paper publishes.
The implicit logic chain is:
Each individual step is reasonable. The chain as a whole is misleading, in a way that Jonathan Roth's AER: Insights 2022 paper made precise. The problem is step 2 — "close to zero" — which is a statement about statistical significance, not about the true underlying violation. And in a small sample, the gap between those two is enormous.
Suppose the true counterfactual trend for OUSG is slightly steeper than BUIDL's — say, the counterfactual would have increased by 0.3 IHS units per quarter, while BUIDL increases by 0.1 per quarter. That difference of 0.2 per quarter is a real parallel-trends violation. Over 8 pre-treatment weeks, it accumulates to about 0.4 units of "missing" trend in the pre-period.
In a panel with 7 units and large within-token noise, the standard error on each pre-treatment coefficient is approximately ±0.5. The pre-treatment coefficients will average around 0.4 — but with standard errors of ±0.5, each individual coefficient will fail to reject the null of zero at the 5% level. The pre-trend test will report "no evidence of pre-trend" and the author will declare parallel trends valid.
But the violation is real. The post-treatment estimate will be biased upward by the same 0.4 units that the pre-period violation was hiding. The "passing" pre-trend test gave false reassurance.
Roth's contribution goes further: he shows that conditional on passing the pre-trend test, the post-treatment estimate is biased in a predictable way. The selection effect ("we only kept publishing the papers whose pre-trends test passed") makes the conditional bias larger than the unconditional bias would be.
The interactive widget below makes this concrete. You set a true pre-trend violation slope and the noise level. The simulator runs 1,000 synthetic experiments, records which ones pass a pre-trend test at $\alpha = 0.05$, and shows the distribution of post-treatment estimates separately for those that pass and those that fail.
Rambachan and Roth (2023) — building on Roth's 2022 critique — propose
honest DiD inference: rather than test the binary null of "parallel
trends", pre-specify a set of plausible parallel-trends violations and report a
confidence interval that is valid uniformly over that set. The R package
HonestDiD implements this.
For example, you might pre-specify "the post-treatment PT violation is at most as large as the largest single pre-treatment coefficient I observed" — a natural benchmark called "relative magnitudes" restriction. The reported CI is then wider than the conventional one (because it accounts for the possibility of any PT violation in that range) but it is honest.
We report HonestDiD bounds as a robustness check in Chapter 14, using the relative-magnitudes restriction with $\bar M = 1$ (i.e., allow the post-treatment violation to be as large as the largest pre-treatment one). If the headline result still holds under this restriction — i.e., the HonestDiD CI still excludes zero — that is much stronger evidence than a passing pre-trend test.
The honest framing is: "we cannot prove parallel trends, but we can probe it from several angles and show that the headline finding is robust to plausible violations within the bounds the pre-period suggests." This is what reviewers in the modern DiD literature expect; the days of "the pre-trend test passed, therefore our design is valid" are over.
Even before Roth, a generation of methodologists has been saying that pre-trend tests provide weak evidence at best. The Roth result formalizes the intuition. The takeaway you should carry into the paper-writing process:
A pre-trend test that passes (fails to reject) provides evidence that the pre-period violation is small enough to be undetectable at the available power level. That is not the same as evidence that the violation is small enough to be ignorable in the post-period.
With inference and pre-trend tests covered, you have the full causal-inference toolkit. Chapter 13 puts everything together into the project's end-to-end methodology — pipeline, panel, spec, robustness, paper structure.
Every step from raw on-chain transfers to the headline ATT estimate, in execution order. The chapter that ties Parts I–III together.
Six Python scripts in data_collection/ turn raw RPC responses into
one CSV file. Five R scripts in analysis/ turn that CSV into Tables
2–4 and Figures 1–4 of the paper. Both halves are intentionally re-runnable:
every Python script uses SQLite with INSERT OR IGNORE semantics so
re-running never duplicates rows, and every R script is deterministic given a
fixed random seed.
# Phase A — data collection (Python)
uv run python data_collection/01_pull_transfers.py # raw transfers → SQLite
uv run python data_collection/02_attach_prices.py # add value_usd column
uv run python data_collection/03_pull_amm_pools.py # DefiLlama → AMM panel
uv run python data_collection/04_pull_supply_holders.py # supply + holder count
uv run python data_collection/05_pull_macro.py # FFR + DeFi TVL
uv run python data_collection/06_assemble_panel.py # all sources → panel_weekly.csv
# Phase B — analysis (R)
Rscript analysis/01_descriptives.R # Tables 1, Figures 1
Rscript analysis/02_twfe_baseline.R # Tables 2 + Bacon decomp
Rscript analysis/03_cs_estimator.R # Tables 3-4, Figure 2, pre-trend Wald test
Rscript analysis/04_sun_abraham.R # Table 4 column 2
Rscript analysis/05_robustness.R # Table 5 (all robustness specs)
Rscript analysis/06_placebo.R # Figure 4 (placebo distribution)
Rscript analysis/07_power_analysis.R # Power simulation (pre-flight; see below)
The pipeline runs end-to-end in roughly 4 hours, dominated by the initial
transfer pulls (each token requires a few minutes of Alchemy paging). After that
first run, re-running phase A is fast because INSERT OR IGNORE means
only new blocks are pulled. Phase B takes maybe 30 minutes total — the CS
estimator is the slowest step, because the bootstrap with B=9999 iterations is
computationally non-trivial.
Before any regression runs, five things must be true. The blueprint specifies these as hard preconditions:
notes/data_anomalies.md.TODO_VERIFY placeholders remain).data/treatment_dates.csv cross-referenced with Uniswap/Curve pool creation transactions.analysis/07_power_analysis.R) confirms the design has at least 40% power for the effect sizes we're targeting.That last item — the power analysis — deserves emphasis. Before generating any estimates that anyone will see, we run 1,000 synthetic datasets under our maintained DGP assumptions with a postulated effect size, fit the CS estimator to each, and count how often we reject the null of zero effect at $\alpha=0.05$. The result is our pre-registered statistical power. With N=7 and the noise levels we observe in pilot data, expected power for a 30% velocity-increase ATT is around 45%. That's low but not zero. If power were below 30%, we would re-scope (add more tokens, switch to monthly aggregation, etc.) before continuing.
Three specifications appear in the paper as "main".
$$\text{IHS}(V_{i,t}) = \alpha_i + \delta_t + \beta \cdot \text{ammListed}_{i,t} + \mathbf{x}_{i,t}'\gamma + \varepsilon_{i,t}$$
Token FEs $\alpha_i$, week FEs $\delta_t$, binary treatment $\text{ammListed}$, controls $\mathbf x = (\log \text{mcap}, \log \text{holders}, \text{age}, \text{FFR}, \log \text{defiTVL})$. SEs clustered at the token level with wild bootstrap. Reported as Table 2 column 1 — for comparison only. Accompanied by the Bacon decomposition showing the forbidden 2×2 comparisons (already-treated units used as controls) and the share of total Bacon weight they absorb.
$$\widehat{\text{ATT}}(g, t) \text{ via } \text{did::att\_gt(yname = "ihs\_velocity\_w", \ldots)} $$
With control_group = "nevertreated", est_method = "reg",
time-varying controls in xformla. Aggregated with
aggte(type = "simple") for Table 3 and
aggte(type = "dynamic") for Figure 2. Wild bootstrap inference with
B=9999. This is the headline.
$$\text{IHS}(V_{i,t}) = \alpha_i + \delta_t + \beta \cdot \log(\text{ammTVL}_{i,t} + 1) + \mathbf{x}_{i,t}'\gamma + \varepsilon_{i,t}$$
Replaces the binary treatment with continuous AMM TVL (log-transformed). Interpretation: a doubling of AMM TVL is associated with $\beta \cdot \log 2$ additional IHS velocity. This specification tests the mechanism: if AMM listing matters because depth matters, the continuous version should be more significant than the binary version. Reported as Table 4.
| Object | What it shows | Source script |
|---|---|---|
| Table 1 | Summary stats by token: obs, mean velocity, %zero, mean mcap, mean holders, AMM-listed weeks | 01_descriptives.R |
| Table 2 | TWFE estimates + Bacon decomposition weights | 02_twfe_baseline.R |
| Table 3 | CS aggregate ATT, plus pre-trend Wald test | 03_cs_estimator.R |
| Table 4 | CS vs SA vs continuous treatment, three columns | 04_sun_abraham.R |
| Table 5 | 6 robustness columns (alt velocity, threshold, sample, monthly, etc.) | 05_robustness.R |
| Figure 1 | 6-panel velocity time series, one per token, treatment marked | 01_descriptives.R |
| Figure 2 | Event-study plot from CS (Figure 9.2 from Ch 09, but with real data) | 03_cs_estimator.R |
| Figure 3 | AMM TVL time series, one panel per treated token | 01_descriptives.R |
| Figure 4 | Placebo distribution (Chapter 14) | 06_placebo.R |
Throughout the pipeline, there are about a dozen judgment calls where the analyst has to pick one option over another. Each one is documented in the blueprint and revisited as a robustness check in Chapter 14. The most consequential:
If the headline finding survives all eight robustness perturbations qualitatively (same sign, statistical significance, roughly the same magnitude), the paper has a strong story. If it does not survive some specific perturbation, that becomes a finding in its own right — we report it honestly and discuss the implications.
Once all five robustness specs have been run and the placebo test has produced its distribution plot, the analyst hands off to paper-writing. The blueprint's Part 5 provides the section-by-section writing guide. The order is:
Writing introductions first is one of the most common mistakes empirical authors make. The introduction's contribution paragraph requires knowing exactly what your headline finding is and what surprises came out of the robustness section. Writing it first forces you to commit to claims you may have to walk back. Write it last.
set.seed(42) at the top of 06_placebo.R and
07_power_analysis.R in R; the equivalent
random.seed(42); numpy.random.seed(42) at the top of any Python
script that uses synthetic data. The placebo and power-analysis figures must be
bit-for-bit reproducible by a reviewer.
The next chapter walks through the robustness ladder in detail and shows what the placebo test should look like.
The ladder of robustness specifications every reviewer expects, and the placebo test that converts "the result is statistically significant" into "the result is meaningfully different from what we'd see under no effect".
Modern empirical economics has converged on a fairly standard set of robustness checks for any DiD paper. We run eleven of them across four categories and select the six most informative for Table 5; the remaining five live in the appendix.
The exact column count in Table 5 depends on which of these we want to highlight — typically 6 columns, with the rest moved to an appendix.
The result we want to see in Table 5 is: across all robustness columns, the point estimate stays within ±25% of the main spec's value, the sign is always the same, and the standard errors are similar. That pattern says "the headline finding is not a fluke of one specific choice the analyst made."
What does not count as passing: one column where the estimate is much smaller or where the sign flips. If R7 (drop first 30 days post-launch) cuts the effect in half, that suggests the headline is partly driven by post-launch noise rather than AMM listing per se — and the paper has to address that in the text.
Robustness checks ask "is the result stable to choices I made?" The placebo test asks a deeper question: "is the result distinguishable from the kind of pattern that would appear under no effect?"
The procedure:
Under the null hypothesis of no treatment effect, the actual ATT should look like a random draw from the placebo distribution. If the actual is in the top 5% (or bottom 5%, in absolute value), we can reject the null at the 5% level — and this rejection is robust to all the assumptions about parametric inference that the bootstrap requires.
Two reviewers, three concerns. Standard pushback on a DiD paper with N=7:
A common trap in empirical work: running the same specification with slightly different controls and calling each one a "robustness check". This is not robustness — it's specification fishing, and reviewers spot it immediately. A real robustness check perturbs one structural choice (the DV, the treatment, the sample, the estimator) and keeps everything else constant. Then you can interpret any differences as informative about that one choice.
Our eleven robustness specs each perturb a single dimension. They are not "specifications I happen to like best"; they are pre-specified probes of the most likely concerns a reviewer will raise.
The final chapter of Part IV confronts the limitations head-on: small N, endogenous listing, BENJI exclusion, and the multi-chain follow-up paper that this work is really setting up.
The four major limitations that bound what this paper can claim, and the concrete improvements that would let a follow-up paper claim more.
We have said this many times in this textbook, but it deserves one more direct treatment. With 7 clusters, 170 weeks, and the noise levels we observe in pilot data, our expected power to detect a 30% velocity-increase ATT at the 5% level is around 45%. For a 50% increase, power is around 65%. For a 100% increase, power is around 85%.
What "45% power" means in practice: if the true ATT is 30% and we ran this exact study 100 times with fresh data each time, we would detect a significant effect in about 45 of those 100 studies. The other 55 would report a confidence interval that includes zero — a "null result" — even though the true effect is real and 30% in magnitude. With one study, we have a coin-flip chance of detecting an effect of plausible magnitude. That is the honest constraint.
Three concrete improvements that buy us power:
We have flagged this throughout. Ondo did not pick a random week to list OUSG on Uniswap — they picked the week when they were ready, when their compliance sign-offs were in, and (most concerning) when their growth trajectory suggested the pool would attract enough volume to justify the LP incentive program. Some of the post-listing velocity rise reflects pre-listing momentum that would have continued anyway.
We address this within the data via three mechanisms — parallel pre-trends, the placebo test, and HonestDiD bounds — but none of them are a true instrumental variable. The fundamental answer is "we cannot fully break the endogeneity with this data; what we can say is that the post-listing pattern is consistent with a treatment effect of the magnitude reported, and is inconsistent with several alternative explanations."
A follow-up paper could pursue genuine instruments. Two plausible candidates:
Neither instrument is clean enough for a top-five journal, but either would push the paper from "consistent with a treatment effect" to "instrumental variables identify a treatment effect of X". That is the difference between a working paper and a JF submission.
We scoped BENJI to its Polygon deployment, ignoring Stellar where most of its
supply sits. This was a pragmatic choice driven by Stellar's lack of a mature
getAssetTransfers-equivalent API. The cost: BENJI is a partial unit
in our panel, providing a never-treated control but with much smaller transfer
volume than its true global activity.
An obvious extension is to build a Stellar Horizon pipeline. This is roughly 4–6 weeks of engineering effort. The Horizon API does return operations list-by-account, so the basic data is available — what's missing is the Alchemy-style bulk filtering that makes the EVM pipeline efficient. A dedicated Stellar effort would essentially involve writing a custom transfer collector that walks the operations log block by block, an order of magnitude slower than the EVM pipeline. We don't do it now because the payoff is one extra never-treated unit (Stellar BENJI is still never AMM-listed). It would be more worthwhile if a multi-chain follow-up paper aimed to study a network of cross-chain bridged tokens specifically.
Forty percent of token-week observations have $V_{i,t} = 0$. Our main spec handles this with the IHS transform, which is defined at zero. The two-part hurdle model is reported as robustness. But neither approach gives us a clean decomposition of the AMM effect into:
Distinguishing these is interesting in its own right because they suggest different economic mechanisms. The extensive margin is consistent with AMM listing reaching new traders who otherwise would not have transacted at all; the intensive margin is consistent with existing traders simply trading more efficiently. With a panel large enough to support the two-part model as the main spec, we could separately report both. Currently we cannot.
Some of the limitations can be partially addressed by additional analyses within the same paper. Two worth doing before submission:
The biggest mistake authors make in the limitations section is being defensive. The reviewer's job is to find limitations; if you've named them yourself, you've reframed the conversation. Our limitations section will:
With limitations and improvements covered, you have read the full textbook. The final chapter is a glossary you can return to whenever a term needs refreshing.
Every econometric, blockchain, and DeFi term used in this textbook, with the chapter where it first appears.
bacondecomp.
aggte(type = "dynamic"). The
single most useful visualization in any DiD paper.
First appears: Ch 09.
HonestDiD R package.
First appears: Ch 12.
fixest::sunab().
First appears: Ch 10. Reference: Sun & Abraham (2021).
didimputation.
First appears: Ch 10. Reference: Borusyak, Jaravel & Spiess (2024).
did_multiplegt Stata/R package.
First appears: Ch 10. Reference: de Chaisemartin & D'Haultfœuille (2020, 2022).
fixest.
First appears: Ch 11.
alchemy_getAssetTransfers
is the high-level endpoint that returns decoded ERC-20 transfers in
paginated JSON.
First appears: Ch 04.
transfer() and emits a
Transfer(from, to, value) event for every movement.
First appears: Ch 04.
DFF series. Used
as a time-varying macro control because tokenized Treasury demand is
rate-sensitive.
First appears: Ch 05.