The loan is fine until the tick isn't.
DIA-V reads the live Uniswap V3 pool on Base and asks what your flash-loan size does to price if liquidity thins, slippage spikes, or you actually use the leverage you typed in. One verdict: the worst scenario.
How it works
- You name a Base pool, which side you are borrowing (token0 or token1), a size in human token units, and leverage from 1 to 10.
- DIA-V calls the pool over JSON-RPC:
liquidity()andslot0(), then each token's decimals, so the size and the liquidity share a unit. - Price impact is a concentrated-liquidity approximation inside the active tick. For a small borrow, impact ~ X / L_scaled. L_scaled is active liquidity turned into human units of the borrowed asset. The divisor is 1e18 for an 18-decimal token and 1e6 for USDC. The number we score is the closed-form tick move: it matches that ratio for small X, and it blows up if the size exhausts the tick.
- Five scenarios run separately. The verdict is the worst of them, plus the largest base size that would have kept every scenario under 2%.
Stresses
Full active liquidity, the size you sent, no leverage.
30% of the in-range liquidity is gone.
60% gone. Same borrow.
Slippage comes back three times the tick estimate.
Size times the leverage you asked for.
These are not stacked. A drain and a leverage multiple at the same time is worse than whichever single scenario won. APPROVE means none of these five screens tripped, not that the loan is safe.
Price
USDC per validation. x402 on Base L2. Unpaid machine calls get HTTP 402 with the payment terms. This page is free.
https://agentpaystore.com/diav/api/validate
Call it
curl -s -X POST https://agentpaystore.com/diav/api/validate -H 'Content-Type: application/json' -d '{"pool":"0xd0b53D9277642d899DF5C87A3966A349A798F224","borrow_asset":"token0","borrow_amount":10,"leverage":2}'
That pool is Uniswap V3 WETH/USDC 0.05% on Base. token0 is WETH, so 10 means ten WETH, not ten wei. With no payment header the response is 402. Retry with the x402 PAYMENT-SIGNATURE (or X-PAYMENT) header. The form below is the human path.
Try it
What this will not tell you
It does not walk the tick bitmap, so depth outside the current tick is invisible. It does not add the pool fee, simulate your callback, or know if a lender will fund the loan. The fee multiplier (it rises once the worst stress leaves the 2% band, and caps at 5) and the max leverage (the highest 1x-10x that still clears 2% on full liquidity) are recommendations, not instructions the pool will follow. Treat the verdict as a screen you run before you size the loan, not as a promise about the next block.