Fence Finance and Valinor Digital tranche pool
Why it happened
Attack class: Logic errorThe pool's daily settlement recorded debt as repaid with no money returned, so a self-made borrower could draw the same amount twice and take the depositors' USDC.
What would have stopped it
- Only reduce recorded debt when repayment actually arrives.
- Require approval before anyone can become a borrower.
Not scored before the exploit
BlackHart had not scored Fence Finance and Valinor Digital tranche pool before this exploit.
An attacker drained about $1.01 million in USDC from a tranche lending pool on Avalanche associated with Valinor Digital and Fence Finance. Using a flash loan, they set themselves up as a borrower on the pool, and when the pool's daily settlement wrongly marked part of that debt as repaid, they borrowed the same amount again, this time taking the depositors' money. The pool was emptied; no other product of either company has been reported affected, and neither firm had published a statement at the time of early reports. The USDC was moved to Solana through Circle's cross-chain transfer service within five minutes.
The attacker, through a borrower contract, drew the full balance of the tranche pool a second time in a drain transaction right after midnight UTC, then sent the USDC to Solana through Circle's transfer contract.
Attack flow
All 4 on-chain stepsThe attack in 3 steps. Step 1, Root control: Tranche pool (source). Step 2, Double draw: Borrower contract (hub), Attacker wallet (attacker), about $1.01M reached this step. Step 3, Bridge: Circle cross-chain transfer (exit).
Step 1: Root control
- SourceTranche pooldepositor USDC on Avalancheabout $1.01M, the whole pool0xe25cb545...47621a
Step 2: Double draw
- HubBorrower contractflash-loan setup at 23:56 UTCsecond draw at 00:00 UTC0xf09dcf4e...a57805
- AttackerAttacker walletreceives the USDCabout 507 USDC cost0x6ff1c3ff...2b1246
Step 3: Bridge
- ExitCircle cross-chain transferburned on Avalancheminted on Solana within 5 minutes0x28b5a0e9...68cf5d
Why each step worked
- Settlement marks debt repaid without repaymentused drawing room reappears at the daily rollover
- Anyone can become a borrowermissing controlno approval, whitelist or onboarding
- Aave flash loansupplied the setup capital for one transaction
- No solvency check against real USDC flowsmissing controlthe pool paid out more than was ever funded to the facility
- No outflow delaymissing controlfunds left the chain before the first public alert
Full forensic detail
Step-by-step reconstruction, root cause, counterfactuals, remediation, and disclosure timeline.
Exploit anatomy
depositForBurnWithHook(uint256,uint32,bytes32,address,bytes32,uint256,uint32,bytes)tx:0x51bb85e1...b9f397Root cause
The pool's books drifted away from the money it actually held. At its daily settlement the pool recorded a scheduled principal payment on a credit facility as paid, although no USDC came back, and that bookkeeping change made drawing room that had already been used available again. Because opening a facility on the pool did not require any approval, whitelist or onboarding, the attacker could act as their own borrower, and a flash loan let them do it without capital of their own. The result was that the pool paid out its depositors' USDC against a debt it believed had shrunk. No key was stolen and no price was manipulated; the flaw is in the pool's settlement accounting and in letting anyone become a borrower. The pool contract is not verified on public explorers, so this reading rests on the on-chain transactions and independent replays published by researchers and summarised by SlowMist; neither Valinor Digital nor Fence has published a root cause. Which party operated the pool has not been established: Blockaid named Valinor Digital and Fence, and SlowMist also associated it with Oatfi.
Prevention analysis
If settlement only lowered a facility's outstanding principal after USDC was received, no drawing room could reappear on its own and the second draw would have been refused.
A credit pool meant for vetted borrowers let an anonymous contract open a facility. Onboarding or a whitelist would have closed the door before any accounting flaw mattered.
A draw that would take a facility's total drawn amount above what was ever funded to it, or empty the pool, is a clear signal. A hard check against actual USDC flows would have stopped the payout.
Similar incidents
An internal bookkeeping step credited value that was never deposited, and real withdrawals were paid against it. Same class: records that no longer match the funds held.
A vault credited value without a matching deposit, and a flash loan amplified it into a drain of real USDC.
Remediation
Timeline
Get your protocol scored across 12 dimensions, or request ongoing coverage.