
Nostra Finance Hack Autopsy: How a $3.5M Oracle Manipulation Drained Starknet in 78 Minutes
On September 17, 2026, Nostra Finance — the largest lending protocol on Starknet — lost $3.5 million in under 80 minutes. The attacker did not exploit a reentrancy bug. They did not use a flash loan. They simply created a fake liquidity pool, waited for an off-chain price aggregator to pick it up, and borrowed against an 8,000x inflated price. This is a full autopsy of that attack. We ran every oracle-related vulnerability pattern through the Blockhertz AI Smart Contract Auditor and documented exactly what automated tools catch — and what they genuinely cannot.
What Happened to Nostra Finance on September 17, 2026?
Nostra Finance is a non-custodial money market on Starknet. Users deposit collateral and borrow against it. The protocol relies on an oracle to determine the current price of collateral assets. On September 17, the attacker targeted that oracle's pool-selection mechanism — not the smart contract code itself.
| Step | Action | Time (UTC) |
|---|---|---|
| 1 | Attacker deploys fake STRK/USDC pool with minimal liquidity ($400 seed capital) | 02:14 |
| 2 | Fake pool appears on GeckoTerminal; oracle pool-selection logic picks it as primary source | 02:31 |
| 3 | Attacker executes a single large swap inside the fake pool — STRK price spikes 8,000x to $312 | 02:47 |
| 4 | Attacker deposits 11,200 STRK as collateral (real value: ~$4,400) — protocol reads collateral as $35.8M | 02:49 |
| 5 | Borrows $3.5M in USDC and ETH against inflated collateral | 02:51 |
| 6 | Bridges funds to Ethereum via StarkGate, begins mixing through Railgun | 03:12 — 03:32 |
Total elapsed time from pool deployment to bridge: 78 minutes. The protocol's smart contracts executed exactly as written. The vulnerability was in the oracle infrastructure — specifically, the absence of any verification that the price source pool was legitimate.
What Is the Root Cause of the Nostra Finance Oracle Exploit?
The root cause is pool-selection hijacking. Nostra's oracle fetched prices from the highest-volume pool for a given token pair as reported by GeckoTerminal. This is a common pattern for on-chain price discovery — but it creates a direct attack surface: anyone who can make their pool appear as the highest-volume source can become the oracle.
The vulnerable pattern in simplified Solidity looks like this:
// VULNERABLE — pool address is passed externally, not whitelisted
function getPrice(address poolAddress) external view returns (uint256) {
IPool pool = IPool(poolAddress);
(uint256 reserve0, uint256 reserve1,) = pool.getReserves();
return reserve1 / reserve0; // spot price, no TWAP, no sanity check
}
The secure pattern requires at minimum three controls:
// SAFER — whitelisted pools only, TWAP price, sanity bounds enforced
mapping(address => bool) public approvedPools;
function getPrice(address poolAddress) external view returns (uint256) {
require(approvedPools[poolAddress], "Pool not whitelisted");
uint256 twapPrice = getTWAP(poolAddress, 30 minutes); // time-weighted average
require(twapPrice > minBound && twapPrice < maxBound, "Price out of bounds");
require(block.timestamp - lastUpdate[poolAddress] < stalenessThreshold, "Stale price");
return twapPrice;
}
What Does the Blockhertz AI Auditor Detect in Oracle Manipulation Attacks?
We ran Nostra Finance's oracle interface pattern through the Blockhertz AI Smart Contract Auditor. Here is what the tool flags versus what it does not — and why the distinction matters.
| Vulnerability Pattern | Severity | AI Auditor Detects? | Finding Description |
|---|---|---|---|
| Spot price used instead of TWAP | HIGH | Yes | Flags single-block price reads in price-sensitive functions |
| External pool address accepted without whitelist | HIGH | Yes | Flags unvalidated external address passed to price function |
| No price sanity bounds check | HIGH | Yes | Flags absence of min/max price validation before borrow logic |
| No staleness check on oracle data | MEDIUM | Yes | Flags missing timestamp validation on price feed return values |
| Single oracle source dependency | MEDIUM | Yes | Recommends multi-source aggregation or fallback oracle |
| Off-chain aggregator pool-selection logic | CRITICAL | No | Cannot inspect GeckoTerminal API behavior or pool ranking algorithm |
| Fake pool creation on-chain | CRITICAL | No | Attack occurs in separate contract — outside audit scope of target contract |
What Can No Automated Smart Contract Auditor Catch?
This is the most important part of this autopsy. Security tools — including ours — are scoped to the contract you submit. This attack bypassed that scope entirely.
- Off-chain infrastructure decisions — The decision to use GeckoTerminal as a pool discovery source, and the algorithm GeckoTerminal uses to rank pools, exists entirely outside any smart contract. No auditor scans API documentation or off-chain aggregator behavior.
- Economic attack surface of public infrastructure — The attacker used Starknet's own public AMM infrastructure to create a legitimate-looking pool. There is nothing to flag in the target contract about a pool that does not yet exist.
- Cross-contract attack vectors from unrelated deployers — The exploit originates in a contract deployed by the attacker, not the victim. Auditing Nostra's contracts gives zero visibility into what the attacker deploys separately.
This is not a limitation of any specific tool. It is a structural boundary of static analysis. The lesson is that oracle security requires both on-chain controls (which auditors can verify) and off-chain architecture decisions (which only threat modeling can address).
Oracle Security Checklist for DeFi Developers
If your protocol uses any external price feed — whether Chainlink, Pyth, Uniswap TWAP, or a custom aggregator — verify these six controls before deployment:
| # | Control | Why It Matters |
|---|---|---|
| 1 | Whitelist approved oracle sources — never accept external address for price lookup | Prevents pool-selection hijacking (the Nostra attack vector) |
| 2 | Use TWAP (30-minute minimum) instead of spot price | Single-block manipulation requires sustained capital across multiple blocks |
| 3 | Enforce price sanity bounds (e.g. ±20% from 24h moving average) | Limits damage from any oracle compromise to bounded deviation |
| 4 | Check staleness — reject prices older than threshold (e.g. 3600 seconds) | Prevents replay of outdated prices during oracle downtime or congestion |
| 5 | Use multi-source aggregation or a secondary fallback oracle | Single point of failure in price infrastructure = single point of attack |
| 6 | Validate oracle pool liquidity minimums before accepting as price source | Low-liquidity pools are trivially manipulable with small capital |
How Much Has Been Lost to Oracle Manipulation in DeFi?
| Protocol | Year | Loss | Attack Vector |
|---|---|---|---|
| Nostra Finance | 2026 | $3.5M | Pool-selection hijacking via GeckoTerminal |
| Mango Markets | 2022 | $114M | Spot price manipulation — self-collateralization |
| Cream Finance | 2021 | $130M | Flash loan oracle manipulation + reentrancy |
| Compound (COMP) | 2020 | $89M | DAI price spike on Coinbase Pro oracle |
| Harvest Finance | 2020 | $34M | Flash loan USDC/USDT price manipulation |
| bZx Protocol | 2020 | $8M | Flash loan + single-source oracle (Kyber) |
The Real Lesson From the Nostra Finance Hack
Oracle manipulation is not a new attack class. bZx in 2020, Compound in 2020, Mango Markets in 2022 — the attack vector has been documented publicly for six years. Nostra Finance had a professional audit. The audit passed their contract code. The attack came from infrastructure outside the audit scope.
This is the gap the Hack Autopsy series exists to document. When a protocol is exploited despite having audited contracts, the question is not "why did the audit fail?" The question is "what did the audit scope not cover — and what can each type of tool actually catch?"
Running your contracts through the Blockhertz AI Smart Contract Auditor will flag every on-chain oracle pattern in the detection table above. That is genuine value. It will not flag off-chain aggregator behavior. No tool will. Knowing that boundary is what separates a security posture from a false sense of security.
This is post #1 in the Blockhertz Hack Autopsy series. Every time a DeFi protocol is exploited, we run the vulnerability class through our AI Auditor and publish an honest breakdown of what automated tools catch — and what they miss. No vendor spin. Just the mechanics. Audit your contracts free →
Frequently Asked Questions
Was Nostra Finance audited before the exploit?
Yes. Nostra Finance had undergone smart contract audits prior to the September 2026 exploit. The attack did not target code that was in scope for those audits — it targeted the off-chain oracle infrastructure and pool-selection logic used to feed prices into the protocol.
What is oracle manipulation in DeFi?
Oracle manipulation is an attack where an adversary controls or corrupts the price data that a DeFi protocol uses to determine collateral values, liquidation thresholds, or swap rates. If a protocol trusts a manipulated price, it will execute transactions — such as borrowing $3.5M against $4,400 of real collateral — that are economically catastrophic.
Does the Blockhertz AI Auditor detect oracle vulnerabilities?
Yes — for on-chain oracle patterns. The AI Auditor flags spot price usage, unwhitelisted pool addresses, missing TWAP implementation, absent staleness checks, and single-source oracle dependency. It cannot detect off-chain aggregator behavior or attack vectors that originate in contracts outside your audit scope.
How do I protect my DeFi protocol from oracle manipulation?
Implement the six-point oracle security checklist above: whitelist price sources, use 30-minute TWAP, enforce price sanity bounds, check staleness, use multi-source aggregation, and validate pool liquidity minimums. Then run your contracts through an AI auditor to verify the on-chain implementation is correct, and conduct a threat modeling session to address the off-chain infrastructure decisions an auditor cannot reach.
Hack Autopsy #1 — Published September 2026 by the Blockhertz team. On-chain data sourced from Starkscan and StarkGate bridge records. Attack timeline reconstructed from PeckShieldAlert and SlowMist Hacked.
Resource Hub
Explore all articles →
Browse every guide on the Blockhertz blog
Explore Blockhertz
Views
5
Read Time
8 min read
Likes
1
Published
Sep 22, 2026
SIGNAL THREAD
NO SIGNALS YET — BE FIRST TO TRANSMIT
Muhammad Asif
Senior Blockchain Developer & Founder, Blockhertz
Blockchain developer and security engineer with 8+ years of experience. Founded Blockhertz in 2018 to build AI-powered tools for Web3 teams — smart contract auditing, architecture generation, gas optimization, and RWA tokenization platforms. Serving clients worldwide.