Latest

DeFi

DeFi insurance was the target in the Tendril and CoreVault hack

A sell hook drained 555,670 USDT from a pool on BNB Chain and a flash loan forced a 33-fold redemption from the reserve meant to cover losses.

DeFi insurance was the target in the Tendril and CoreVault hack
DeFi insurance was the target in the Tendril and CoreVault hack

A small BNB Chain token lost almost all of the USDT in its pool in a single transaction on November 4, and two days earlier an insurance fund in the same ecosystem was left without 260.21 BNB because of a flash loan. The amounts are small next to the Binance theft, and that is precisely why they can be read in full: they show clearly who pays when a decentralized finance contract breaks.

The first case is TENDRIL, a token with a 30% tax on every sale. The second is CoreVault, a vault that calculated the price of its redemptions by reading a liquidity pool. Both attacks used the same idea, a contract trusting a number the attacker can move within the same transaction, and that is the thread linking the two incidents of the week.

Between them they took around $735,000, a figure that does not move the market and does explain why the insurance of many protocols is a more fragile promise than it appears. The two attacks occurred two days apart and were counted as separate cases, although they share the same cause and probably the same type of perpetrator.

The sell hook that left the pool at zero

TENDRIL charges a tax on selling, and that tax runs inside a function the token itself controls. According to BlockSec Phalcon's analysis, a sale triggered the 30% tax, the management contract sold those tokens, called the `controlburn()` function and then `sync()`, which synchronizes the pool's reserves with the actual balance.

That `sync()` left TENDRIL's reserve at 6,678 wei, practically zero. The seller's tokens reached the pool afterwards, and the swap that followed took almost the 4.42 million USDT in the opposite reserve, a move that the Tendril analysis on blockintAI reconstructs transaction by transaction.

The technical detail matters less than the consequence. Anyone who could sell could trigger the whole sequence, so the attacker needed no special permission or key: it was enough to execute the sale at the right moment. The transaction left a net result of 555,670.54 USDT out of the pool, with a 30.6 million flash loan repaid within the same operation.

The money did not move. At 7:19 on November 5, the profit wallet held 309,111.24 USDT and 0.008 BNB, with no outgoing transfers in the previous 21 hours. The attacker funded the operation with seven Tornado Cash withdrawals in BNB, 24.96 BNB spread between October 27 and November 4, confirming a week of preparation for an attack that lasted one block.

That patience contradicts the image of the opportunistic attack. The attacker did not improvise on the day of the incident, he built the position a week in advance and chose the moment when the reserve was most profitable to drain.

CoreVault, or the insurance fund as victim

The second case has a twist. The attacker did not take the protocol users' money, he took the money from the reserve created to cover them. CoreVault's InsurancePool lost 260.21 BNB, about $180,300, in an operation that CertiK described as an oracle attack funded with a flash loan.

The sequence was as follows. The attacker borrowed $143.6 million in WBNB from the Moolah lending market, of Lista DAO, and with that capital made very large swaps against a pool to drag its internal price far from the market price. CoreVault calculated the amount of its redemptions by reading the price of that pool, so the redemption came out at 33 times its normal size and the attacker kept 160.26 BNB, about $111,000 in profit before fees.

Everything happened within one block, which means no human pause mechanism could intervene in the process. The lesson is that an insurance fund is just another contract, with the same oracle dependencies and the same launch haste as the product it was meant to protect.

The pattern that already has four cases

Analysts who followed the TENDRIL attack noted that the same burn-and-sync technique was used against YSDAO in May, against AIDC in June and against SKYDAO in September. Four incidents with the same mechanism in seven months are not bad luck, they are a category of error that developers keep repeating.

The cause is always the same. A token with its own logic in the transfer can modify the pool's state while the operation is in progress, and contracts that read the price before the operation ends receive a manipulated value. No audit finds this unless it is tested with specific transactions.

There is a detail that worsens the problem and appears in all four cases. The attacker does not need to find a flaw in the protocol that reads the price, it is enough to choose a token whose behavior in the transfer is strange enough. That turns issuers of tokens with taxes and rebases into the preferred entry point, and explains why serious protocols publish a list of accepted tokens instead of accepting any.

The same logic appears in larger incidents. The zkLink Nova bridge fell to a forged proof and the Initia network halted after losing tokens, two examples that the problem is not the size of the protocol but the trust in a piece of data someone can fabricate.

That pattern has a name in the smart contract security literature: dependence on a source of truth controllable by the attacker. No tool detects it automatically, because it is not a syntax error but a design decision that only becomes visible when reading the full flow of an operation.

Coverage only exists if the contract holds

Any user thinking of providing liquidity to a little-known pair can make three checks before signing. The first is to read the token contract and look for functions that burn or sync reserves within a transfer. The second is to check whether the protocol pauses operations and who can activate the pause. The third is to look at the depth of the pool, because a pair with less than a million dollars in reserve can be moved with a medium-sized flash loan.

None of the three requires knowing how to program and all three are in the project's public documentation, which is another reason these incidents are frustrating. The information to avoid the loss was available before it happened and nobody turned it into a visible warning inside the interface the investor uses.

There is a fourth check worth adding to the list that almost nobody does. It consists of reading the protocol's incident history and seeing whether any of the four previous cases affected a similar contract, because a team that has already been through this usually hardens the same parts.

The THORChain episode, which reopened only 10 of its 13 chains after an accounting failure, completes the week's map. All three cases share the same underlying question about what really guarantees a protocol when the market moves faster than its controls, and the answer the auditors give is the same one the market gives: a contract nobody has tested with other people's money.

José Maldonado

Author

José Maldonado

Activist and blogger on technology, free software and blockchain.

The latest
From Huang to Botín, from Zara to Byron: corporate responsibility in global capitalism

Keep reading