Xave Finance Hack
What happened
On October 8, 2022, an attacker took over contracts owned by Xave Finance, formerly HaloDAO, and minted 100,000,000,000,000 RNBW (100 trillion) to their own address, inflating the token's supply and crashing its price.
Xave's Gnosis Safe multisig had a SafeSnap DaoModule enabled. The module forwards any proposal approved through a Reality.eth question, and the Safe executes it. The module still had default settings: questionCooldown and minimumBond were both 0. Anyone could post a proposal, answer it themselves at no bond, and execute it with no delay for the multisig to react.
The attacker's proposal minted the RNBW and moved ownership of the RNBW token, the LPOP token and the PrimaryBridge contract to the attacker. Beosin reported that the minted RNBW was converted into xRNBW and held at the attacker's address. One incident review puts the realized loss at about $635, because RNBW liquidity was thin. Xave's team later took mitigation steps on its V2 contracts.
Attacker: 0x0f44f3489d17e42ab13a6beb76e57813081fc1e2
Attack contract: 0xe167cdaac8718b90c03cf2cb75dc976e24ee86d3
Exploit transaction: 0xc18ec2eb7d41638d9982281e766945d0428aaeda6211b4ccb6626ea7cff31f4a
How it happened
- The attacker created a Reality.eth question for a proposal of four transactions: mint 100 trillion RNBW to the attacker, and call
transferOwnershipto the attacker on the RNBW token, the LPOP token andPrimaryBridge. - The attacker answered the question in favor. With
minimumBondat 0 there was no meaningful bond to stake or lose, and nobody challenged it. - The attacker registered the proposal on the
DaoModulewithaddProposalWithNonce, 9 blocks before the exploit. - Once the answer was final, the attack contract called
executeProposalWithIndexin transaction0xc18ec2eb.... WithquestionCooldownat 0, the module forwarded all four calls to the Xave Safe, which executed them because it trusted the module. - The attacker received the 100 trillion RNBW and ownership of the three contracts.
Protocol details
Security review history
- PeckShield View report
Evidence
- report @BeosinAlert incident report twitter.com
- transaction Etherscan transaction 0xc18ec2eb...f31f4a etherscan.io
- address etherscan.io address 0x0f44…c1e2 etherscan.io
- address etherscan.io address 0xe167…86d3 etherscan.io
- code DeFiHackLabs XaveFinance_exp.sol github.com
- analysis DeFiLlama defillama.com
- analysis DaoModule misconfig exploit on HaloDao contracts (Andrei Simion) gist.github.com
- analysis Web3 Security Weekly Recap of M10W2 (Beosin) beosin.com
- analysis 2022 - Hacktober in DeFi rya-sge.github.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.