Skip to main content
Block #9

Flash Loan Attacks: The Threat to DeFi and How XRP Ledger Resists

Ripple (XRP)

Flash Loan Attacks: The Threat to DeFi and How XRP Ledger Resists

Sanne Vermeulen
flash loan aanvallen de bedreiging voor defi en hoe xrp ledger weerstand biedt
3 min

Thorchain and Drift Protocol are not isolated incidents; they represent a growing trend of vulnerabilities within the DeFi landscape. The recent attack on Thorchain on 15 May resulted in a loss of approximately $10.8 million due to a cross-chain exploit, which leveraged vulnerabilities across networks including Bitcoin, Ethereum, and BSC. Similarly, Drift Protocol, a Solana-based decentralised perpetual exchange, and KelpDAO, a liquid restaking protocol on Ethereum, accounted for over $600 million in losses during April alone. The lessons from these attacks cannot be ignored; they underscore the necessity for investors and analysts to take a broad view of the risks and architecture of DeFi platforms.

Since 2021, cross-chain bridges have been responsible for over $2.8 billion in losses due to attacks, most of which utilised flash loans (uncollateralised loans that must be repaid within the same transaction). This innovative financial instrument is often used for legitimate purposes, such as arbitrage between different exchanges or maintaining solvency in credit markets.

However, in the hands of malicious actors, this functionality becomes a potential weapon: an attacker borrows funds, manipulates an oracle or drains a vulnerable liquidity pool, makes a profit, and repays the loan, all before the transaction is finalised. This means the attacker faces virtually no risk, with only gas fees as a cost. This creates a concerning moral hazard within the DeFi sector.

The XRP Ledger is a notable exception to this dynamic. A recent amendment proposal to the XRPL standards suggests that flash loan attacks are structurally impossible, as transactions on the XRP Ledger are atomic and do not permit composite calls to other contracts. This means a transaction on the XRP Ledger either succeeds entirely or fails entirely, without the possibility of calling another contract in the interim. This is a crucial architectural feature that distinguishes the XRPL from Ethereum, where transactions allow for multiple nested operations within a single transaction shell.

The decision not to allow flash loans, however, comes at a price. Although flash loans are primarily viewed as an attack vector, they have also become a fundamental component of Ethereum’s DeFi ecosystem. Protocols such as Aave and dYdX use flash loans for arbitrage and liquidation processes. XRPL sacrifices these capabilities to exclude an entire class of attacks, which raises questions about the future of DeFi on this network. For much of its history, this trade-off mattered little, simply because the XRPL's DeFi offering was small. But this is changing rapidly. The recent tokenisation of real-world assets on the XRP Ledger has exceeded a total value of $3 billion, including the rapid processing of a tokenised U.S. Treasury via a partnership between Ripple, JPMorgan, Mastercard, and Ondo Finance.

This means a transaction on the XRP Ledger either succeeds entirely or fails entirely, without the possibility of calling another contract in the interim.

If the amendment for automated market makers (AMM) is approved, XRPL could improve its competitive position in DeFi and close the capital efficiency gap relative to Ethereum. This creates the possibility for broader trading and yield strategies. The question that then arises is whether the structural resistance to exploits will be a genuine competitive advantage, or merely a feature that institutions ignore in favour of established liquidity elsewhere. This makes supervisory and investment strategies all the more relevant as we track the evolution of the DeFi landscape in Europe and beyond.

Live XRP priceChart, key figures and valuation modelsView
  • defi
  • ripple
  • xrp
Sanne Vermeulen

Written by

Sanne Vermeulen

Market editor · Amsterdam (NL)

Expertise

MarketsETFsBitcoin

Sanne monitors crypto markets, ETF flows, and institutional inflows in Europe. She previously wrote about capital markets and translates market data into understandable stories.

Stay in the loop

Follow Block #9.

Block #9 Pro

More depth, less noise

€ 15 / month

See Pro

Practice without real money or test your knowledge?

Read more

Other interesting articles

All articles
Block Notes

By 7 a.m. you already know

Monday, Wednesday and Friday the news that matters. Sunday morning the whole week in one overview. No hype, no noise.

  • Monday, Wednesday, Friday and Sunday morning at 07:00
  • 2 min
  • No spam

Free. Unsubscribe in one click.