RAI Finance Hack

TOTAL LOST $414K
Low Other

Summarize with AI

Affected Chain 2021 Incident surface
Recovered $414K 100.0% returned
All-Time Rank #1063 By amount stolen
Protocol Type CDP Target category

Incident Overview

To connect the liquidity between ERC20 and BSC, RAI Finance has been using Chainswap to ensure the liquidity between both blockchains.

RAI Finance reserved 2.9M RAIs to an address 0x9D4D377c…5CcDe3, and this address automatically approves the spent access to the Chainswap’s bridge contract.

The Chainswap smart contract for RAI spend access has been exploited on Jul-03–2021 12:39:18 AM +UTC, from the contract address 0x0e128fb9…d51b84 which has access up to 2.9M RAIs in total at the account.

Incident Report

Protocol / Project RAI Finance
Date of Incident
Attack Technique Other
Classification Yield Aggregator
Primary Source View Post-Mortem

Protocol Information

Protocol Type CDP
Affected Token RAI
Official Website rai.finance/
Protocol Twitter/X @RaiFinance
Team Anonymous
Source Code Unverified

Market Context at Time of Hack

Token Categories
Ethereum Ecosystem Base Ecosystem

What the Attacker Needed to Succeed

Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.

Technical Knowledge Deep understanding of other and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in RAI Finance's contract logic - root cause: yield aggregator
Execution Speed Precise transaction ordering and timing to exploit the vulnerability within a single atomic block
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Likely — with a thorough Other audit checklist and test coverage

If you're auditing a protocol with similar architecture to RAI Finance, these are the critical security checks that could have prevented this incident (July 2021).

  • Verify all logic paths related to Other are guarded by proper access controls and input validation
  • Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs

Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.

Free Trial

Funds Recovery

100.0%

Recovered

$414K

Net Loss

0

Sources & References

Learn to Prevent the Next RAI Finance

The RAI Finance hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.

Recreate exploit patterns safely Free Trial