The Sandbox's 329-Trillion SAND Mint: How an approveAndCall Exploit Hijacked LayerZero Delegate Permissions and Drained the Bridge Reserve
An attacker exploited The Sandbox's approveAndCall function to hijack LayerZero delegate permissions on Base, then manufactured 329.24 trillion unbacked SAND tokens across 703 minting events. The face-value headline of $49 billion was misleading — real losses were bounded by the Ethereum OFT Adapter's reserve of ~14.75 million SAND, putting the actual drain at approximately $675,000. The Sandbox's multisig severed the bridge by zeroing LayerZero trusted peers for Base and BNB Chain. Ethereum and Polygon were unaffected.
This article is published for educational and informational purposes only. It does not constitute legal, financial, or investment advice. Nothing in this article should be relied upon as the sole basis for any decision relating to the security, investment value, or legal standing of any protocol or digital asset.
This is a preliminary analysis based on publicly available reporting and open-source code review. An official post-mortem has not yet been published by the affected protocol at time of writing. Any code samples included are illustrative reconstructions for educational purposes only and do not represent confirmed exploit code. This article will be updated when authoritative technical disclosure is available.
Information published on any code vulnerabilities must not be used to attack, test, or probe any protocol or system without explicit authorisation from its owner. Use of this content is subject to our Terms of Service and Privacy Policy.
What happened
At 23:42:05 UTC on August 21, 2026, an attacker began exploiting a vulnerability in The Sandbox's cross-chain SAND token infrastructure on Base and BNB Smart Chain. Over the next five hours, across 703 separate minting events distributed to 173 wallets through more than 400 transactions, the attacker manufactured approximately 329.24 trillion unbacked SAND tokens on Base — a nominal face value of roughly $49 billion at the prevailing SAND price of $0.045. The last minting event was recorded at 04:45:21 UTC on August 22.
The headline figure is misleading. Unbacked tokens created on Base could only be converted into real value by redeeming them against the Ethereum-side OFT Adapter — the contract holding the legitimate SAND reserve that backs cross-chain transfers. That reserve held approximately 14,769,723 SAND. The attacker drained it: the adapter balance fell from 14,769,723 SAND to 0.0056 SAND across 15 separate redemption events, with one externally owned account receiving 14,095,483 SAND across six transactions inside a 24-second window. The total real loss — legitimate SAND drained from backed reserves plus approximately 79.74 ETH converted — was approximately $665,000–$675,000, not $49 billion.
At 05:09:19 UTC, 24 minutes after minting activity had organically ceased, The Sandbox's multisig executed a response: it zeroed out the trusted peers for LayerZero endpoint IDs 30101 and 30102, severing cross-chain messaging between the Ethereum and Base deployments. Bridging on Base and BNB Smart Chain was permanently suspended. The Ethereum mainnet supply remained exactly 3,000,000,000 SAND; Ethereum and Polygon deployments were confirmed unaffected. Exchanges including Upbit and Bithumb suspended SAND trading activity during the incident. The Sandbox stated the direct impact was less than 0.01% of the legitimate SAND supply.
Root cause
The Sandbox deployed its cross-chain SAND token using LayerZero's Omnichain Fungible Token (OFT) framework — a widely adopted standard that allows a single token to exist and transfer across multiple chains without wrapping. The OFT pattern works by burning tokens on the source chain and minting an equivalent amount on the destination, or by locking tokens in an adapter on Ethereum and minting representatives on other chains. The framework relies on LayerZero's messaging infrastructure to relay verified cross-chain burn and mint instructions.
The exploit had two stages: first, hijacking delegate authority over the OFT contract on Base; second, using that authority to mint SAND without corresponding burns on Ethereum. Both stages were enabled by a single function call.
Stage 1: Hijacking LayerZero delegate permissions via approveAndCall
The SAND token contract on Base included an approveAndCall function — an ERC-20 extension that combines a token approval with an immediate call to the approved contract in a single transaction. The pattern is designed for usability: rather than requiring a user to first approve a contract and then call it in two separate transactions, approveAndCall does both atomically.
The vulnerability was in how the SAND implementation of approveAndCall handled the destination contract call. The function allowed the caller to pass an arbitrary data payload to the approved contract. The attacker crafted a payload that, when delivered to the LayerZero endpoint contract via the SAND token's approval context, was interpreted as a legitimate instruction to set the attacker's helper contract as a delegate over the SAND OFT on Base. LayerZero's OFT delegate system is a feature that allows a designated address to send cross-chain messages on behalf of the OFT contract. With delegate authority granted, the attacker could originate cross-chain mint instructions as though they were the OFT contract itself.
// approveAndCall: approve spender and call it with arbitrary data
function approveAndCall(
address spender,
uint256 amount,
bytes calldata data // ← caller-controlled payload
) external returns (bool) {
_approve(msg.sender, spender, amount);
// The spender (LayerZero endpoint) is called with attacker-supplied data.
// The endpoint interprets the payload as an instruction to set a delegate.
// No validation is applied to restrict what operations data may trigger.
(bool success,) = spender.call(data);
require(success, "call failed");
return true;
}
// The crafted data payload encodes a call to:
// layerZeroEndpoint.setDelegate(attackerHelperContract)
// After this executes, attackerHelperContract is the trusted delegate
// for the SAND OFT on Base — able to originate cross-chain messages
// as though it were the SAND contract itself.Stage 2: Minting unbacked SAND via delegated cross-chain messages
With delegate authority over the SAND OFT on Base, the attacker could send cross-chain messages through LayerZero's infrastructure that instructed the Ethereum OFT Adapter to release SAND from its reserves. The Adapter, receiving a message that appeared to originate from a legitimate SAND OFT peer, processed the release without querying whether a corresponding burn had actually occurred on Base. Simultaneously, the attacker's helper contract minted SAND on Base without performing the required burn — the two-sided accounting that backs the cross-chain peg was broken.
// Legitimate OFT transfer: Base → Ethereum
// Source (Base): burn SAND from sender
sandOFT.burn(sender, amount);
// LayerZero sends verified message to Ethereum adapter
layerZero.send(ethereumAdapterId, encodeRelease(recipient, amount));
// Destination (Ethereum adapter): release SAND to recipient
sandAdapter.release(recipient, amount); // amount == burned amount — peg intact
// --- Exploit path with hijacked delegate ---
// Attacker's helper contract (now a delegate) sends a fabricated message:
// No burn is performed on Base.
attackerHelper.sendMessage(
layerZero,
ethereumAdapterId,
encodeRelease(attackerEOA, 14_095_483e18) // request release of ~14M SAND
);
// Ethereum adapter receives a message that appears valid (correct peer ID,
// correct format) — it cannot verify that no burn occurred on Base.
sandAdapter.release(attackerEOA, 14_095_483e18); // real SAND released, unbacked
// Simultaneously, attacker mints SAND on Base without burning:
sandOFT.mint(attackerWallets[], massiveAmounts[]);
// 329.24 trillion SAND created on Base across 703 events — none backed.Why the loss was capped at $675,000
The total extractable value was bounded by the Ethereum OFT Adapter's reserve balance at the time of the attack: approximately 14.77 million SAND. Once the adapter reached zero, no further real SAND could be released regardless of how many more unbacked tokens the attacker minted on Base. The 329 trillion SAND on Base had no claim on any remaining backed reserve, making it unredeemable for real value. The size of the headline number and the size of the actual loss diverged because the attack broke the peg accounting but could not manufacture the underlying reserve it was trying to drain.
The multisig response — zeroing the trusted peer configuration for LayerZero endpoint IDs 30101 and 30102 — severed the messaging link between Ethereum and Base entirely, preventing any further cross-chain redemption attempts even if the adapter had held additional reserves.
approveAndCall passing caller-controlled data to the LayerZero endpoint without restricting which operations that data could trigger. A single function call was sufficient to gain delegate authority over the entire OFT contract — authority that was then used to break the burn/mint accounting that backs the cross-chain peg.What could have been done
- Restrict the operations that approveAndCall may trigger. The
approveAndCallfunction passed an unrestricted payload to the approved contract. Any implementation of this pattern that calls an external contract with caller-supplied data must validate or restrict the target function selectors the payload may invoke. Specifically, calls that can modify trust configurations — delegate settings, peer registrations, admin roles — must be explicitly blocked from being reachable through this path. A function selector allowlist on thedataparameter would have made this exploit impossible. - Restrict delegate-setting to the OFT contract owner. LayerZero's delegate system allows an OFT to nominate a helper contract to send messages on its behalf. This is a privileged operation — a delegate can originate any cross-chain message the OFT could send. Delegate assignment must be callable only by the contract owner or through a time-locked governance action, never as a side effect reachable through a user-facing function like token approval. The delegate configuration is an administrative privilege and must be protected with the same controls as minting authority or bridge admin keys.
- Apply burn-before-send ordering on the source chain. In the OFT pattern, the source-chain burn must be atomically committed before the cross-chain message is sent. If the burn is not atomic with the send, or if the send can be triggered independently of the burn, the two-sided accounting can be broken. OFT implementations should enforce that the burn and the send occur in the same transaction, with the burn result checked before the message is dispatched, making it structurally impossible to originate a release message without a corresponding burn.
- Cap OFT Adapter reserves relative to expected bridge volume. The Ethereum OFT Adapter held approximately 14.77 million SAND — the full amount that users had bridged from Ethereum to other chains. If the adapter had been subject to a reserve cap and per-period release limit, the maximum extractable amount per exploit window would have been bounded further, and the automated 24-second drain of 14 million SAND across six transactions would have triggered a circuit breaker.
- Monitor LayerZero delegate configuration changes in real time. The delegate change was the pivotal event: everything that followed depended on it. An on-chain monitoring system watching for
setDelegatecalls on production OFT contracts, with an immediate alert to a security response team, would have flagged the attack at its first step — before a single token was minted. Delegate configuration is not an event that occurs in normal operation; any change to it during live production should be treated as a critical alert. - Audit all external-call paths in token contracts for privilege escalation.
approveAndCalland similar combined approval-and-call patterns create an execution path where the token contract calls an external target with caller-supplied data, using the token contract as the message sender. This context — a trusted contract calling an external target with attacker-controlled input — is a well-known privilege escalation surface. Any security audit of a token contract that includes such patterns must explicitly enumerate the operations reachable through the call path and verify that none of them can be triggered by an unprivileged user.
Lessons for the industry
The Sandbox exploit is a clean illustration of the difference between nominal and real losses in cross-chain token exploits — and why both figures matter for different reasons. The $49 billion headline was arithmetically derived but economically meaningless: no market existed to absorb 329 trillion SAND, and the tokens had no claim on reserves beyond what the adapter actually held. Reporting that number without immediate qualification misrepresents the incident. But the $675,000 real loss also requires context: the actual loss was not $675,000 because the attacker was unskilled or the protocol was well-protected. It was $675,000 because that is all the Ethereum OFT Adapter held. Had the adapter held $50 million, the loss would have been $50 million. The limiting factor was reserves, not defences.
The approveAndCall vulnerability is a variant of a pattern that security researchers have documented across many token contracts: any function that makes an external call with caller-controlled data, from a contract address that is trusted by the call target, is a potential privilege escalation path. The SAND implementation allowed this pattern to reach LayerZero's delegate configuration — an administrative function that should have been reachable only by the contract owner. The path from user-facing token approval to full OFT delegate authority required one transaction. That is not a complex exploit; it is a missing access control check on a configuration function, reachable through an indirect but entirely standard code path.
The OFT framework that enabled this exploit is among the most widely deployed cross-chain token standards in production today. Hundreds of projects use it. The delegate system is a legitimate feature, not an inherent flaw — but like any permission system, its security depends entirely on whether the operations that can modify it are adequately protected. Projects deploying OFT contracts should specifically review all paths through which setDelegate or equivalent configuration calls can be reached, including indirect paths through combined approval-and-call functions, flash loan callbacks, and other patterns where external contracts are called with the OFT contract as the msg.sender context.
The multisig response was effective — zeroing the trusted peer configuration stopped further cross-chain redemption — but it arrived 24 minutes after minting had already organically ceased. Had the attack continued beyond the adapter's depletion, those 24 minutes would have been irrelevant. The speed of the response mattered here because of how quickly automated monitoring identified the event; but it was the reserve cap, not the response time, that bounded the loss. A protocol that relies on human response speed to limit losses from an active exploit is operating with an unnecessarily thin margin. Automated circuit breakers — triggered by anomalous minting volume, delegate configuration changes, or adapter balance drops exceeding a threshold — can act in seconds, not minutes, and should be the primary first line of containment.
Finally, the fact that Ethereum and Polygon deployments were completely unaffected reflects a meaningful architectural boundary: the exploit was contained to Base and BNB Chain because the trust configurations for those chains were the ones compromised. This is a correct observation, but it should not be read as evidence that the architecture was robust. The boundary held because the attacker targeted Base and BNB Chain specifically. The same vulnerability — a reachable setDelegate call through approveAndCall — existed on every OFT deployment that shared the same token contract implementation. Ethereum and Polygon were not safe because they were protected differently. They were safe because they were not targeted.
- 01Crypto.news — The Sandbox's 'phantom SAND' mint — approveAndCall and delegate takeover
- 02Crypto Times — SAND hacked — 329 trillion tokens minted on Base in five-hour rampage
- 03EdgeX — Why the nominal $49B figure overstated the loss
- 04Bitcoin.com News — SAND bridge hack mints 14.9 billion unbacked tokens
- 05CryptoRank — SAND exploit — 14.75M SAND and 79.74 ETH reserve drain
- 06CryptoRank — The Sandbox isolates Base and BNB Chain after unbacked token mint
- 07Pluang — The Sandbox pauses Base and BNB bridges — exchange suspensions
- 08Sebastien Borget (The Sandbox) on X — Official security update — Base and BNB Chain cross-chain transfers blocked