How KyberSwap protects your rate twice: off-chain, then on-chain
Aggregator quote spoofing is real. 0x just published the data: of 84,163 Uniswap v4 hooks they scanned, they classified 54% as malicious. In the worst cases, users received up to 50% less than the quote showed.
Well, I agree on the diagnosis. But I disagree on the cure.
The problem isn't hooks. It's that quoting happens off-chain, before your trade settles.
A hook can show a tight quote to win the route, then widen the spread before execution. So can a PropAMM. So can a sandwich attack. So can an LP pulling JIT liquidity. Every one of these exploits the same gap: the router decided seconds ago, and your money moves now.
Filtering pools doesn't close that gap. It narrows your liquidity and punishes good hooks along with bad ones.
However,
@KyberNetwork solves this with two layers:
1️⃣ Layer 1 — Dynamic Trade Routing (off-chain):
- Scans every pool and DEX on the chain
- Splits your trade across the best combination
2️⃣ Layer 2 — Smart Settlement (on-chain):
- Sends backup candidate pools along with your transaction
- The contract compares them at the moment of execution
- Executes whichever actually pays most, right then. This is not about prediction, but about measurement
Here's a real example on Base:
- User demand: 662,820 BASECAT → USDC
- One leg was routed to a vanilla v4 pool that, at execution, would have paid 0.130484408 ETH
- Smart Settlement compared it on-chain against a hooked v4 pool paying 1.116392138 ETH (8.5x more) and replaced the bad pool with the better one.
- The trade delivered 13,241.92 USDC against an 11,487 USDC floor. Without that on-chain switch it would have dropped below the floor and reverted outright
- tnx hash:
basescan.org/tx/0x80a1d9a95b…
⚠️ note: On this transaction you'll see an [execution reverted] label, which can be confusing. That's simply Smart Settlement rejecting the vanilla Uniswap v4 candidate and executing the better one.
In general, you can't fix quote-time routing by curating the quote. You fix it by deciding on-chain, inside the transaction, at the moment your money moves.
🗒️ For further reading:
- Uniswap v4 hooks were a mistake (published by 0x):
nitter.net/0xProject/status/20995…
- Go with any hook. Settle with the good one (published by KyberSwap):
nitter.net/KyberNetwork/status/21…
- Kyber Dynamic Trade Routing docs:
docs.kyberswap.com/developer…
- Kyber Smart Settlement docs:
docs.kyberswap.com/developer…
Recently, we've received questions about malicious Uniswap v4 hooks.
Here's our answer 👇