Revest Finance Hack
What happened
On March 27, 2022, Revest Finance's Ethereum TokenVault was exploited for roughly $2 million in BLOCKS, ECO, LYXe and RENA. The attacker abused FNFT minting and an ERC-1155 callback to make the protocol reuse an FNFT ID before its counter was updated, then altered that FNFT's recorded deposit amount and redeemed the inflated supply. Revest froze the protocol and said other chains and non-TokenVault integrations were unaffected.
FNFTHandler updated the fnftsCreated counter after the external ERC-1155 mint callback. Reentrant execution reused an existing FNFT ID, and depositAdditionalToFNFT lacked an existence check before changing the TokenVault configuration. Moving state updates before the external call and rejecting zero/repeated FNFT mints were the documented fixes.
How it happened
- The attacker used a custom contract to mint an address-locked FNFT with zero deposited value and then initiated a second mint for a large FNFT supply.
- During the second mint, the ERC-1155
onERC1155Receivedcallback re-entereddepositAdditionalToFNFTbeforefnftsCreatedwas incremented. getNextId()therefore returned the already-used FNFT ID; because the code did not check for an existing configuration, the callback overwrote itsdepositAmountwith one token.- The attacker withdrew the entire FNFT supply from the TokenVault, draining the targeted asset. Revest paused RVST transfers and soft-locked contracts, preventing further RVST-ETH losses.
Protocol details
Security review history
- Solidity Finance View report
Evidence
Proof of concept
1 availableSources
- report Post-Mortem blocksecteam.medium.com
- report @BlockSecTeam incident report twitter.com
- report @peckshield incident report twitter.com
- report @CertiKAlert incident report twitter.com
- transaction Transaction etherscan.io
- analysis Revest Protocol Exploit & Recovery Plan revestfinance.medium.com
- analysis DeFiLlama defillama.com
- analysis Revest Finance Vulnerabilities: More than Re-entrancy blocksec.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.