KiiChain
Why it happened
Attack class: Logic errorA contract at a precomputed vesting-account address delegated more than its spendable balance, the balance underflowed, and a second flaw let it overwrite victim balances.
What would have stopped it
- Bound every balance deduction
- Restrict creation of vesting accounts
Not scored before the exploit
BlackHart had not scored KiiChain before this exploit.
An attacker took about 148.3 million KII from 18 accounts on KiiChain on the evening of August 22, a value DeFiLlama puts at about $9.7 million. The cause is a set of balance-accounting flaws in the shared Cosmos EVM module that KiiChain runs, not KiiChain's own code, and the same technique hit MANTRA and TAC the same week. About 67.6 million KII went to BNB Chain over a bridge, where 64.6 million KII sold for about $1.6 million, and KiiChain halted its chain. Cosmos Labs says about 80.7 million KII is still on the halted chain and recoverable once the network is restored.
Per Cosmos Labs, the first logged exploit transaction on KiiChain was this transaction, at block 9,355,102. The sequence ran 18 times, and the attacker moved part of the proceeds to BNB Chain by bridge and swapped it for stablecoins.
Attack flow
All 4 on-chain stepsThe attack in 3 steps. Step 1, Root control: 18 KiiChain accounts (source). Step 2, Drain: Attacker contracts (attacker), about $9.7M reached this step. Step 3, Bridge and sale: BNB Chain sales and exchange (exit), KII left on the halted chain (exit), about $5.28M reached this step.
Step 1: Root control
- Source18 KiiChain accounts148,326,583.15 KII~ $9.7M
Step 2: Drain
- AttackerAttacker contracts18 repeats of one sequenceno supply change
Step 3: Bridge and sale
- ExitBNB Chain sales and exchange64.6 million KII for 1.6M USDT3 million KII to an exchange
- ExitKII left on the halted chainabout 80.7 million KIIrecoverable on restoration
Why each step worked
- Unbounded balance deductiondelegating locked vesting tokens wrapped the EVM balance
- Missing overflow guard on EVM transfersthe wrapped balance could overwrite a victim's balance
- No halt on abnormal debitsmissing controlthe sequence repeated before the chain stopped
- No bridge outflow limitmissing control67.6 million KII left over the bridge
Full forensic detail
Step-by-step reconstruction, root cause, counterfactuals, remediation, and disclosure timeline.
Exploit anatomy
Root cause
KiiChain runs the shared Cosmos EVM module, which tracks balances twice: once inside the EVM and once in the Cosmos bank module. Per Cosmos Labs and KiiChain, the two views were not kept consistent when a vesting account delegated locked tokens through the staking precompile. The deduction was not bounded, so the EVM balance of the attacker's contract wrapped around to an enormous number, and a second weakness in the EVM transfer path let that number be used to overwrite a rich account's balance so that the attacker kept the victim's tokens and the victim was left with zero. Because the gain and the loss cancel, total supply never changed. The attacker needed no key, only a contract deployed at a precomputed address that had first been made a vesting account. The flaw is in shared upstream code, not code KiiChain wrote. Cosmos Labs rated it critical and said it affected Cosmos EVM below version 0.6.2 or 0.7.2. KiiChain says it blocked creation of vesting accounts as a temporary measure and disputed whether all the upstream defects had been fixed in published releases, so chain operators should apply the patches Cosmos Labs published and follow its current guidance.
Prevention analysis
A deduction that cannot fall below zero would have stopped the first step, and the wrapped balance would never have existed.
Vesting accounts are a niche feature. Limiting who can create them, which KiiChain did after the attack as a temporary measure, removes the set-up the attacker needed.
Eighteen repeats and a bridge transfer ran before the halt. A monitor that stops the chain on large debits from dormant accounts would have cut the loss early.
The fix was published about 50 hours before the attack on KiiChain. Chains that apply security releases immediately, and upstream teams that mark them as security releases, close the window.
Similar incidents
TAC's staking pool was emptied on August 22 through the same shared Cosmos EVM balance-accounting flaw, a drain of real tokens with no change in total supply.
Nesa confirmed exploitation of a Cosmos EVM vulnerability on August 24, with the moved NES bridged to Ethereum. Same module, same class.
A different bug in the same weak spot: vesting-account logic reachable from the EVM side of a Cosmos-based chain let an attacker move tokens out of accounts it did not control.
Remediation
Timeline
Get your protocol scored across 12 dimensions, or request ongoing coverage.