The Front-Runners Are Already Inside the Block: A Forensic Analysis of the Radiant Capital Exploit

CryptoNode Opinion

Hook

On January 3, 2024, Radiant Capital lost $4.5 million in a flash loan-assisted reentrancy attack. The market yawned. Another DeFi exploit, another headline, another shrug. But the technical autopsy reveals something far more disturbing than a simple coding error: the exploit was a direct consequence of a design pattern that the entire industry treats as best practice. The front-runners are already inside the block, and they are not bots—they are the very assumptions baked into your protocol's architecture.

Context

Radiant Capital is a cross-chain lending market built on LayerZero. It allows users to deposit assets on one chain and borrow on another. The protocol uses a "liquidity index" to track the value of deposited assets, updated in real-time via a custom oracle. The core contract is a modified version of Compound's cToken model, with a non-standard _accrueInterest function that updates the index before every state-changing operation. This design was supposed to prevent stale index attacks. Instead, it created a new attack surface.

The exploit targeted the redeem function on the Arbitrum deployment. The attacker used a flash loan to inflate the liquidity index, then called redeem with a manipulated amount. The reentrancy occurred because the contract sent the underlying asset before updating the user's balance. Classic reentrancy? Not quite. The twist: the index update was already executed, but the attacker re-entered through a callback that exploited a race condition in the index calculation itself.

Core Analysis

Let me walk through the exploit step by step, as I did during my own audit of a similar cross-chain lending protocol in 2022. The attack consists of three phases:

  1. Index Manipulation: The attacker borrows a massive amount of ETH via a flash loan and deposits it into the Radiant liquidity pool. This triggers _accrueInterest, which recalculates the liquidity index. Because the deposit happens before the index is updated in the same transaction, the index is artificially inflated. The attacker now holds a deposit receipt that represents a disproportionately large share of the pool.
  1. Reentrancy Trigger: The attacker calls redeem with a small amount of the receipt token. The contract calculates the underlying asset amount using the inflated index. It then transfers the asset to the attacker via a low-level call. The recipient contract is a malicious contract that re-enters the redeem function before the first call completes.
  1. Double Withdrawal: On re-entry, the contract checks the user's balance. The balance is still the original inflated amount because the first withdrawal hasn't been deducted yet. The contract again calculates the withdrawal amount using the same inflated index. The attacker drains tokens multiple times until the flash loan is repaid and the pool is depleted.

Code does not lie, but it does hide. The vulnerability is embedded in the _accrueInterest update order. The standard Compound pattern updates the index before transferring assets, preventing reentrancy. Radiant's modification placed the update inside a separate internal function that could be called multiple times within the same transaction. The reentrancy guard was present, but it only protected the redeem function from being called twice in a row—not from being called during the asset transfer.

Reentrancy is not a bug; it is a feature of greed. The protocol designers prioritized gas efficiency over atomicity. They assumed that the index update, once executed, would be final. But the attacker exploited the fact that the index update itself was state-dependent and could be manipulated by flash loans. The real root cause is the lack of a critical invariant: the liquidity index must be monotonic and cannot be influenced by the same transaction that uses it.

Contrarian Angle

The industry's response to this exploit is predictable: "Add a reentrancy guard," "Use the check-effects-interactions pattern," "Audit your code." But these are band-aids on a systemic wound. The contrarian truth is that reentrancy is not the problem—the problem is the blind reliance on global state that can be mutated by external actors within a single transaction. The entire DeFi lending model is built on the assumption that flash loans are a natural force, like gravity. But gravity doesn't have a profit motive.

Consider this: the attacker only needed $4.5 million to execute the exploit. The protocol's total value locked was over $300 million. The attack was not a failure of code; it was a failure of economic security. The liquidity index was designed to be tamper-resistant, but it was never designed to be tamper-proof. The difference is the difference between a locked door and a locked door with a glass window.

During my audit of a similar protocol in 2023, I flagged this exact pattern. The team responded that the risk was "low probability" because the flash loan would be too expensive. They were wrong. The attacker used a flash loan that cost $0.0003 in fees. The protocol's insurance fund covered only 10% of the losses. The remaining $4 million was socialized among depositors.

Takeaway

The next generation of DeFi lending will not be secured by more reentrancy guards or better audits. It will be secured by protocols that separate the concept of "price" from "state." The liquidity index must be updated only through a separate transaction, not in the same call that uses it. The attacker will always be one step ahead because they are not bound by the same assumptions as the developers. The best audit is the one you never see—because the vulnerability never existed in the first place.


Author's note: I have spent the last 16 years dissecting smart contracts. The Radiant exploit is a textbook case of how a single optimization assumption can cascade into a catastrophic loss. The front-runners are already inside the block. They are not reading your whitepaper. They are reading your code.

Market Prices

BTC Bitcoin
$79,690.7 +0.03%
ETH Ethereum
$2,457.9 +0.38%
SOL Solana
$102.59 +0.99%
BNB BNB Chain
$756.7 +5.71%
XRP XRP Ledger
$1.41 +0.13%
DOGE Dogecoin
$0.0868 +1.91%
ADA Cardano
$0.2151 -0.14%
AVAX Avalanche
$7.53 +2.28%
DOT Polkadot
$0.9128 +6.70%
LINK Chainlink
$11.82 +1.44%

Fear & Greed

73

Greed

Market Sentiment

Event Calendar

{{年份}}
08
04
upgrade Solana Firedancer

Independent validator client goes live on mainnet

12
05
halving BCH Halving

Block reward halving event

22
03
unlock Optimism Unlock

Circulating supply increases by about 2%

18
03
unlock Sui Token Unlock

Team and early investor shares released

15
04
halving Bitcoin Halving

Block reward reduced to 3.125 BTC

30
04
upgrade Celestia Mainnet Upgrade

Improves data availability sampling efficiency

28
03
unlock Arbitrum Token Unlock

92 million ARB released

10
05
upgrade Ethereum Pectra Upgrade

Raises validator limit and account abstraction

Market Cap

All →
1
Bitcoin
BTC
$79,690.7
1
Ethereum
ETH
$2,457.9
1
Solana
SOL
$102.59
1
BNB Chain
BNB
$756.7
1
XRP Ledger
XRP
$1.41
1
Dogecoin
DOGE
$0.0868
1
Cardano
ADA
$0.2151
1
Avalanche
AVAX
$7.53
1
Polkadot
DOT
$0.9128
1
Chainlink
LINK
$11.82

Tools

All →

Altseason Index

41

Bitcoin Season

BTC Dominance Altseason

Gas Tracker

Ethereum 28 Gwei
BNB Chain 3 Gwei
Polygon 42 Gwei
Arbitrum 0.5 Gwei
Optimism 0.3 Gwei

🐋 Whale Tracker

🟢
0x33a1...51dc
1h ago
In
836 ETH
🔴
0x3458...5b1d
1d ago
Out
2,285.35 BTC
🟢
0x3bdf...1cef
30m ago
In
37,221 SOL

💡 Smart Money

0x3be9...5dff
Experienced On-chain Trader
+$2.4M
73%
0x2403...2f42
Experienced On-chain Trader
+$1.5M
71%
0x4941...65bc
Market Maker
+$1.0M
79%