T26 · Cross-chain
Is an asset still the same asset after crossing chains?
- Capabilities practiced
- BuilderProtocol Literacy
- Hands on
- Trace both transactions of a cross-chain transfer and identify who bears each trust assumption in between.
- AI Lab
- Have AI compare trust models for three cross-chain architectures. Test its classification against a real bridge exploit.
A Real-World Problem
A user has 1,000 USDC on chain A. To use a protocol on chain B, they transfer it through a bridge.
Two minutes later their wallet on B displays USDC 1,000. The icon, name, and decimals all look right. They deposit it as collateral in a lending protocol and borrow funds for another purpose.
Three weeks later, one night, the bridge's lockup contract on A is drained.
Nothing on B changes. The contract address is the same, their balance still says 1,000, and the token still says USDC. The only change is that there is now nothing behind those 1,000 tokens.
The price falls to pennies. Their collateral is instantly underwater, but liquidators refuse it: they would receive worthless claims. The lending protocol keeps the bad debt and spreads it across depositors.
The user did nothing obviously wrong. They used a popular bridge, saw a familiar ticker, and both wallet and market app called it USDC.
So ask precisely: what were those 1,000 things in their wallet?
Thought Experiment
Imagine two countries without a direct communication line.
You store a crate of goods in country A and receive a warehouse receipt. In country B, you want to sell that receipt.
Why should a buyer in B trust it? They cannot see A's warehouse or verify its inventory themselves.
People have historically used three kinds of answer.
First, hire a notary recognized in both countries. They saw the warehouse in A and attest that the receipt is real. Simple, fast, and cheap. The risk is just as clear: the notary decides. If bribed, coerced, or willing to print a false receipt, B has no way to notice.
Second, have B station its own observer outside A's warehouse. They record every deposit and withdrawal and maintain their own ledger. B need not trust a person, only the rules its observer follows.
The price is high. The observer must stay permanently and record every change, even if 99% is irrelevant to B. Complex accounting in A may be too expensive to reproduce.
Third, do not transfer the receipt at all. Someone in B already owns an identical crate. You give them your claim in A and they give you their goods in B. They bear the risk that A's crate really exists, because they judge the risk affordable and charge you for it.
Here is the crucial point.
The methods do not differ in how goods move: the goods never move. They differ only in why B believes a message saying “a crate in A belongs to you.”
The receipt is a message, not the goods. People in B exchange real value for it because they choose to interpret that message as an asset.
A message can be false. Once it is false, the asset inferred from it never existed.
The opening user's 1,000 USDC are the result of such an interpretation. When the lockup is drained, the basis of the message and thus its interpretation disappear.
Your Decision
Choose a bridge for your application, or design one. Start with how messages are verified.
What Happens
Compare the four designs:
| Who you trust | Typical failure | Delay | Cost | Ease of adding a chain | |
|---|---|---|---|---|---|
| External validators | Fewer than M of N are bad | Stolen keys, verification bug | Low | Low | Easy |
| Light client | Source-chain consensus | Implementation bug or consensus upgrade | Medium | High | Hard |
| Challenge window | One honest challenger who can submit | Censored or blocked challenge | High | Medium | Medium |
| Liquidity network | Market makers and pool depth | Empty pool or counterparty default | Low | Medium | Medium |
Only the second column really matters. It leads to the first conclusion:
There is no cross-chain mechanism with no trust assumption, only different choices about whom to trust.
When marketing says “trustless,” translate it into “if this party fails or cheats, I lose my funds.” If you cannot identify that party, you have not understood the design.
A second conclusion explains why bridges see so many incidents.
Locked value grows with use, but the security budget need not grow with it. A bridge can move from ten million to a billion in locked assets while retaining the same N signers and nearly the same attack cost.
Each bridge can drift toward this state:
The cost of compromising it eventually falls below the reward.
That is next chapter's economic-attack formula in particularly stark form. Bridge funds are concentrated: a lending exploit may affect one pool, while a bridge exploit can reach everything locked there.
The third conclusion is this chapter's title:
Cross-chain systems move messages. An asset is one interpretation of a message.
The opening tokens were claims minted by a contract on B in response to a message from A. Their value depends on the message remaining true and its backing secure.
Build a Model
Three layers: transport, verification, interpretation
Any bridge separates into three layers. Only the middle one sets the trust assumption.
- An event on the source chain
- Transport: who carries it
- Verification: who proves it
- Interpretation: what the destination does
| Layer | Job | Effect of changing it |
|---|---|---|
| Transport | Move a message from A to B through a relay, network, or user-submitted proof | Affects liveness: no relay means delay, not forgery |
| Verification | Decide whether the message truly came from the source chain | Holds the security guarantee |
| Interpretation | Mint, unlock, or call a function after accepting a message | Determines how large the consequences of failure can be |
This separates substance from marketing. “Twenty independent relays” may sound safe, but relays transport data. More relays improve delivery, not truthfulness. Ask who verifies.
Three ways to represent an asset
“Moving money over” can mean three different onchain operations, producing different user holdings:
| Method | Source chain | Destination chain | What the user receives |
|---|---|---|---|
| Lock and mint | Assets locked in a contract | A wrapped asset is minted | A claim backed by lockup security |
| Burn and mint | Asset destroyed | Same issuer mints native asset | Native asset, trusting issuer |
| Liquidity swap | Asset enters a pool | Asset withdrawn from another pool | Native asset, trusting liquidity |
The first creates the opening scenario and a subtle problem:
One asset can have multiple incompatible versions on the destination. Five bridges produce five token contracts all labelled USDC. They are not interchangeable: a token minted by bridge A cannot redeem through bridge B.
Liquidity fragments and users may not recognize the version. Integrations must enforce:
Your allowlist contains contract addresses, not symbols. Code that identifies assets by ticker will eventually accept the wrong one.
Issuer-operated burn-and-mint narrows trust from a bridge to the issuer. If you already trust that issuer, it can improve on wrapped assets.
Message layer: idempotency and replay, another outbox
Cross-chain messages need two properties familiar from the T17 outbox:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract MessageReceiver {
// Executed messages for replay protection; key is a globally unique coordinate
mapping(bytes32 => bool) public executed;
event Executed(bytes32 indexed id);
function execute(
uint256 srcChainId,
uint256 nonce,
address sender,
bytes calldata payload,
bytes calldata proof
) external {
// 1. Include the destination chain; otherwise one message executes on multiple chains
bytes32 id = keccak256(
abi.encode(srcChainId, block.chainid, nonce, sender, payload)
);
// 2. Idempotency: reject a message already executed
require(!executed[id], "already executed");
// 3. Verification determines the bridge's security
require(verify(id, proof), "invalid proof");
// 4. Record first, then execute; reversing the order enables reentrancy (T28)
executed[id] = true;
_apply(sender, payload);
emit Executed(id);
}
function verify(bytes32, bytes calldata) internal view virtual returns (bool) {
return false; // Concrete verification layer implements this
}
function _apply(address, bytes calldata) internal virtual {}
}The four comments map to real incident classes.
The unique ID must include destination chain. Otherwise the same proof can execute once on every deployed destination, turning one deposit into many mints.
Idempotency must be persistent and onchain. Relays retry, users retry, and reorgs cause redelivery. As with T16's primary key, deduplicate by the message's coordinates, not by remembering that you sent it.
The verification line is the bridge's entire security boundary. The Real-World Case section shows how many failures occur there.
Record execution before calling outward. The reverse permits reentrancy, whose cost the next chapters demonstrate.
Finality: the most often missed cross-chain boundary
This is T17's problem with higher stakes:
Source: user locks → transaction included → ...confirmations... → sufficiently final
Destination: ↑
At what point should it mint?Mint on the destination immediately after a source block, then let a reorg remove the source deposit, and the destination token is already minted without backing.
That is unbacked issuance, with no way to recall it.
The T17 outbox rule applies: wait before doing an irreversible action until the source event is deep enough. An incorrect notification can be apologized for; unbacked minted assets remain claims.
Every bridge needs a waiting depth, with two practical traps:
First, configure depth per chain, not globally. Finality models vary. Copying a number from one chain to another invites an exploit.
Second, waiting conflicts with user experience. “Arrives in three seconds” is powerful marketing. It can come from reducing confirmation depth or from a liquidity provider advancing funds and bearing that risk. The latter prices risk openly; the former passes it quietly to users.
Attack-surface checklist
Bridges see frequent losses because they combine concentrated funds, complex verification, and two security models.
List historically common attack surfaces:
| Surface | Example |
|---|---|
| Verification bug | Failing to check that a signer belongs to the validator set, checking the wrong chain, accepting an empty proof |
| Stolen keys | Compromised validator host, cloud account, or CI; threshold shards stored together |
| Mint permission | Destination mint lacks caller checks; upgrade drops restrictions |
| Upgrade authority | Upgradeable contract controlled by an ordinary account with no timelock |
| Message replay | ID misses destination chain or nonce; state recorded after execution |
| Insufficient finality | Source reorg after destination mint |
| Overbroad interpretation | Messages can make arbitrary calls, so one forged message becomes arbitrary execution |
The last row is worth isolating. Many bridges carry general messages: not only “mint this amount,” but “call this function on this contract on the destination.”
That power makes forgery more destructive. On integration, add your own boundary: accept only messages from an approved source address and with an approved format, never arbitrary calls.
Do one calculation
The next chapter makes this a method. Start simply:
Compromise cost = obtaining M keys + gas + time
Compromise reward = all assets locked by the bridge
Safety condition: compromise cost > compromise rewardLocked value is public onchain for anyone to read. Key-compromise cost is hard to estimate, but ask concrete questions: how many validators, who operates them, whether one team controls them, how keys are kept, and whether an upgrade timelock exists.
If locked value rises by two orders of magnitude while every answer in the first line stays the same, the bridge may now be economically worth attacking even with unchanged code.
What It Is Called
A system that lets a state change on one chain produce an effect on another.
It does not literally “move assets”; assets stay where they are or are burned. It sends a message and convinces the destination chain to trust it.
The underlying cross-chain capability: logic on chain B runs in response to an event on chain A.
Moving assets is one use. The more general the channel, the greater the damage from one forged message: it could authorize an arbitrary call, not just a transfer.
Assets are locked in a source contract and equal wrapped assets minted on the destination. Reverse movement burns the wrapped asset and unlocks the original.
The wrapped token is a claim, not the original asset, and depends on lockup security. Different bridges produce incompatible versions of one underlying asset, fragmenting liquidity.
Source-chain consensus verification running on the destination, checking headers and Merkle proofs.
It trusts only source consensus but is difficult and gas-expensive, and source consensus upgrades can disrupt it. Zero-knowledge proofs are one way to compress verification costs.
A sentence of the form “if this specific party fails or cheats, I lose money.”
Every bridge has such a sentence; the question is whether it is written down. Translate any bridge design into it first. If you cannot, you have not understood the verification layer.
A token on a destination representing an asset on another chain.
Three practical rules: identify it by address rather than symbol; know its redemption route; and know what remains if source backing fails. If any answer is missing, do not accept it as collateral in a debt-creating protocol.
A globally unique message ID plus a destination-chain record of execution to ensure one cross-chain message executes once.
The ID needs source chain, destination chain, and nonce. Omit any dimension and another replay path appears.
Hands-on
Use testnets throughout. The exercise is to understand both transaction structures, not to move real money. Avoid a mainnet “quick try” until you can write the trust sentence requested below.
Deliver a one-page report whose final line is: “If ____ cheats or fails, I lose my funds.”
Choose two testnets and a bridge supporting both. Get a small faucet balance and transfer a tiny amount.
Record the start time. Start measuring here.
Inspect the source transaction.
In a block explorer, answer:
- Where did the funds go: a lockup contract or an externally owned account?
- What event was emitted? Does it include destination chain ID, recipient, and nonce?
- How much does that contract hold? Read its balance, not a website figure.
- Is it a proxy? Who can upgrade it, and is there a timelock?The last two are most important and most often skipped. You learned to read balances in T5 and examine proxies in T8. Apply both here.
Record receipt time and estimate actual waiting depth.
Subtract start from receipt and divide by the source chain's block time for an approximate number of confirmation blocks.
Compare that number with the source chain's finality characteristics. If clearly too small, you have found a major exposure.
Inspect the destination transaction.
- Who submitted it: a relay, validator, or you?
- Which function was called, and what does its proof argument look like?
- Who may mint? Read mint permissions in the token contract.
- What is the received token's address? Is it the same as the chain's official token with that name?The last question is many people's first encounter with wrapped assets.
Find the verification layer.
Follow the destination call trace until you reach the decision that the source message is genuine: signature check, Merkle proof, or registry lookup.
Ask what exactly it verifies and whose endorsement success represents.
If you cannot locate it, read bridge documentation and source. Failing to identify verification means you do not know whom you trust, which is itself a useful conclusion.
Write the sentence with a concrete subject.
Insufficient: "If the bridge is attacked, I lose money." That says nothing.
Specific: "If keys from five of these eight validators leak together,
my wrapped destination assets become unbacked claims."Then ask who the eight validators are and whether one team operates them. The answers may surprise you.
Transfer back and compare the reverse route.
The return direction may have different verification, waiting time, and fees. Some bridges use different mechanisms in each direction. One safe direction does not guarantee the other.
Write the two trust sentences side by side as the Lab's final comparison.
AI Lab
Ask in three steps. The third is the real test:
Step one:
Compare external-validator, light-client, and challenge-window bridges.
For each, finish “if ___ cheats or fails, users lose funds” with a concrete
role and threshold, not vague words like “bridge” or “system.” Add delay,
cost, and difficulty of adding another chain.
Step two:
Separate transport, verification, and interpretation layers. What happens
if each fails? Which failure loses funds and which only delays messages?
Step three:
Find a real bridge loss. Using the layers above, explain:
1. What transaction did the attacker send, and what did they do?
2. Which layer failed?
3. Would the attack work under either of the other two architectures?
4. Could public onchain data have revealed the risk in advance?Models often sound like textbooks in step one because this comparison is common. Watch for an unnamed subject such as “if the bridge is hacked”; it indicates repetition rather than analysis.
Step two is the framework. A model may treat relay counts and node distribution as proof of security, the same move marketing often makes, but those are transport properties.
Step three tests both model and reader. Bridge postmortems are detailed, yet models confuse stolen keys with verification bugs. Their remedies differ: key custody versus code. A wrong classification poisons every recommendation.
Question 4 is especially valuable: could risk be observed before the incident? Often some of it could: locked value, signer count, and upgrade timelock are public. Make a table of those as a starting evaluation.
Add an attack surface the model missed yourself. The seven-row list above often exposes gaps in replay protection or finality—precisely the details a bridge integrator might miss.
Verify these points yourself after using AI
- Did it mistake a large relay count for security? Relays transport messages and do not stop forgery
- Can each trust assumption be rewritten with a concrete subject as “if this party cheats, funds are lost”?
- Did it discuss finality and waiting depth? A comparison without them is incomplete
- Did you verify the cited incident against transaction records or postmortems: date, amount, and method?
- Does it classify the failure as verification logic, key management, mint permission, or upgrade authority correctly?
- Did it claim any architecture is completely trustless? No architecture meets that claim
- Add one attack surface it omitted and explain which architecture resists it
Real-World Case
A bridge verified signatures but omitted a critical step: checking that their signers belonged to the authorized validator set.
An attacker signed a forged deposit proof with freshly generated private keys. Cryptographic signature verification succeeded, and the destination minted a large quantity.
The code had no syntax errors, compiled, and passed ordinary tests because valid-path signatures came from legitimate validators. Only an adversarial input exposed the missing check.
It illustrates the next chapter's rule: many vulnerabilities occur at authorization boundaries, not syntax.
A small validator set used a modest signature threshold. After compromising the operator's infrastructure, the attacker obtained enough keys and used the intended withdrawal flow to sign a transfer.
Onchain it looked normal: valid signatures and contract behavior consistent with the design.
Two lessons: key custody caps bridge security, regardless of code quality, and onchain monitoring has little signal for an attack consisting entirely of authorized-looking calls.
A lending protocol accepts a bridge's wrapped asset as collateral under risk settings similar to native assets.
The bridge fails, backing disappears, and the wrapped token's market price collapses. Liquidators refuse claims nobody wants, leaving bad debt for depositors.
For integrators, wrapped-asset risk includes both the asset and its bridge. Collateral factor, feed source, and exposure cap should reflect that. T21 described oracle dependencies; a wrapped asset's redemption route is another single point of failure.
Some core bridge contracts can be upgraded by an externally owned account or low-threshold multisig without a timelock.
Then even perfect code and honest validators are not enough: one key can change the bridge's logic in a transaction.
This is easy to check publicly. It belongs on page one of any bridge review. Chapter 24 made the same point: upgrade power without a timelock places assets in the key's hands.
Change One Variable
Compromise reward grows by a hundred times, while compromise cost barely moves. The bridge can drift from uneconomic to profitable to attack without any code change or alert.
This is the bridge category's structural problem: security budget does not necessarily grow with protected funds.
Mitigations artificially raise attack cost or limit payoff: higher thresholds and more validators, withdrawal rate limits, per-transfer caps, and timelocks for large withdrawals. All sacrifice some user experience, while markets reward speed.
Waiting depth has an explicit basis rather than a heuristic, and the risk of minting against a later-reorganized deposit largely disappears.
But verification-layer risks remain: forged proofs, stolen keys, and uncontrolled minting are independent of finality.
Keep the distinction clear: finality asks whether an event truly remained in history; verification asks why the destination believes it happened. They are separate questions.
Wrapped claims disappear. Users receive native assets on each chain and liquidity fragmentation declines.
Trust narrows from bridge validators to the issuer. If you already hold that issuer's asset, you reuse an existing trust assumption rather than add one, a meaningful improvement.
It only works for assets with an issuer and makes that issuer a stronger single point: it may freeze, refuse, or stop service. The improvement is real even though risk changes form.
The capability expands to cross-chain governance, liquidation, and interchain application calls.
So does risk: a forged message no longer means “mint extra tokens” but “act as the bridge contract anywhere.” Many protocols grant that contract permissions.
Constrain interpretation on your side: accept only approved source chains and source addresses, allow a fixed set of functions, and validate argument ranges. This matches T32's Validator and Policy pattern: place a boundary under your control when upstream is not trusted.
Takeaway Questions
What problem does it solve? Cross-chain systems let a state change on A affect B. They do not literally move assets. An asset remains locked on the source or is burned; that is why “is my token travelling?” is the wrong question.
Who provides liquidity? In a liquidity-network bridge, the answer sets availability and slippage. In lock-and-mint, ask instead: who supplies the destination market's depth for this wrapped token? If the bridge fails, whether holders can exit depends on that market, not only the bridge design.
Who bears risk? The answer is never just “the bridge.” Name the validators, issuer, market makers, or source-chain consensus. If you can make the subject concrete, you have understood the chapter.
Chapter Check
It depends on the mechanism.
Lock and mint: no. You hold a claim whose value depends on source collateral remaining secure. If it is drained, the claim can become worthless with no change to address, ticker, or wallet balance.
Burn and mint or liquidity swap: yes, the destination asset is native. Risk moves to the issuer or liquidity provider.
Ask “how do I turn this thing back into the original?” If the answer is “redeem through that bridge,” it is a claim.
Relays belong to transport. They move messages. A transport failure delays a message, not makes a false message true.
Forgery resistance comes from verification. A bridge with a hundred relays and three validators depends on those three validators for security.
Separate transport, verification, and interpretation first. Then inspect the middle layer closely.
The same message can arrive more than once through relay retries, user retries, or reorgs. Without protection, one deposit executes repeatedly.
Its unique ID should contain at least source chain ID, destination chain ID, nonce, sender, and payload.
Destination chain is easily missed and dangerous: without it, one proof can execute on every chain deploying the receiver.
Store executed status persistently onchain and write it before invoking the destination action to prevent reentrancy.
Wait until source-chain finality is sufficient. Mint too early, then let a reorg remove the source deposit, and destination tokens lack backing with no simple recall.
Configure depth per chain, never as one global number. Finality models differ greatly; copying settings between chains creates an exploitable mistake.
This is T17's outbox rule: wait before irreversible actions until the source event is deep enough. Cross-chain minting makes the cost especially high.
A “seconds to arrive” experience can be funded by a party advancing assets and owning the interim risk, or by shortening the wait and passing risk to everyone else.
There is no single answer. Check:
- Can you complete “if ____ cheats or fails, I lose funds” with concrete roles and counts?
- What verifies messages? Did you find that step onchain yourself or only read a document?
- How much is locked today, and how has the ratio of locked value to validators changed in six months?
- Who can upgrade, and is there a timelock?
- Does your contract identify the asset by address or symbol?
- How much bad debt would your protocol incur if the asset failed? Have you calculated it?
- Does it have its own exposure cap or share native-asset parameters?
Points 3 and 7 demonstrate the core lesson: the first measures drifting risk; the second limits your loss when failure occurs.
Key idea
Cross-chain systems transmit messages; assets are just one interpretation of those messages.