VeChainThor
A flaw in VeChainThor's self-destruct logic failed to settle accrued VTHO when the transferred amount was zero, allowing an attacker to repeatedly trigger self-destruct with flash-loaned VET to artificially mint large amounts of VTHO. This could lead to direct loss of funds.
immunefi.com
Published on immunefi.com
A critical vulnerability was discovered and reported by whitehat @nnez (one of the top 50 whitehats on Immunefi) on December 12, 2024. This flaw enables an attacker to artificially mint a large amount of VeThor Token(VTHO) by exploiting a flaw in the self-destruct logic in combination with a flash loan sourced from…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the self-destruct handler only updates the accrued VTHO balance when the transferred VET amount is non-zero, skipping settlement when the amount is zero.
Impact
An attacker could artificially mint a large amount of VTHO, leading to direct loss of funds.
What the attacker needed
Access to VeChain DEXes for flash loans; Ability to deploy and interact with contracts
The fix
The vulnerability was fixed by VeChain in a critical update.
How it was found
- Borrow a large amount of VET using flash loans from VeChain’s DEXes.
- Create a contract that triggers a self-destruct operation to transfer balances.
- Because the self-destruct logic does not settle accrued VTHO when the sent amount is zero, repeatedly invoking it allows the attacker to mint additional VTHO.
- By orchestrating multiple self-destruct events (using flash loans), the attacker can compound the amount of artificially minted VTHO.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
VeChainThor is a blockchain where holding VET generates VTHO over time, like interest. When a contract self-destructs, the code is supposed to first calculate and save any VTHO earned so far. But if the contract sends zero VET, that calculation is skipped, so the earned VTHO is not recorded. An attacker can exploit this by repeatedly self-destructing contracts with flash-loaned VET, causing the system to mint extra VTHO each time.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.