Skip to content
Hathor Nodes
All posts
AI workflowsSep 22, 2026 · 8 min read

Stress-testing an LP position with AI, step by step

Hathor Nodes

Blockchain Insights

“What happens to our pool position if ATOM drops 40%?” is one of the most common questions we get from treasuries. Answering it properly used to take an analyst most of a day. Here is how we do it now.

This post walks through the AI-assisted risk workflow we run for clients, using a demo ATOM/OSMO liquidity position. The AI does the legwork: fetching data, running the numbers and drafting the explanation. An analyst reviews every step before anything goes out. Neither half works well without the other.

Step 1: get the real numbers

The single biggest improvement we have made to AI analysis is refusing to let the model guess. Before it says anything, the assistant calls a small set of tools we built that read directly from chain:

  • query_rpcPool reserves, swap fee, 30-day history
  • fetch_pricesHourly ATOM and OSMO prices
  • get_positionThe client’s LP shares (read-only)
  • run_stress_testScenario grid + Monte Carlo paths

Every number in the final report can be traced back to one of these calls. If a tool fails, the assistant says so instead of filling the gap. That one rule removes most of the risk of using AI on financial data. We cover it in more depth in Grounding AI in chain data.

Step 2: the scenario grid

Start simple: shock one asset by a fixed amount and measure the impermanent loss compared to just holding. For a 50/50 pool the formula is short enough to check by hand, which makes it a good sanity check on the simulation code.

Impermanent loss, 50/50 pool

IL(r) = 2·√r ÷ (1 + r) − 1, where r = new price ÷ old price

Impermanent loss by price shock

Loss vs holding for each ATOM move, before and after 90 days of estimated swap fees.

Two things stand out. First, IL is not linear and not symmetric: a 40% drop costs about 3.2%, a 60% drop costs 9.7%, while a 40% rise costs only 1.4%. Second, three months of fees cover the small moves entirely. For this pool, what matters is the tail, not the typical day.

Step 3: simulate the tails

A grid shows you a few chosen points. A simulation shows you how likely each outcome is. We run 10,000 price paths over 90 days, calibrated to the pair’s realized volatility, and record the position’s return against holding.

Distribution of 90-day outcomes

10,000 simulated paths · return vs holding, fees included.

Median outcome

+1.8%

vs holding, after fees

Bad case (5th percentile)

-2.2%

14% of paths underperform holding

Step 4: explain it like a human would

Numbers are not a decision. The last step is the one AI is genuinely great at: turning a table into a clear recommendation that a treasury committee can act on. Our template forces three things into every summary: what happens in the bad case, how likely that is, and what you could do about it.

For this position the draft read: “The position survives a 40% ATOM shock, but you end up heavier in ATOM. Fees cover typical volatility. If a drawdown of more than 5% is unacceptable, consider hedging a quarter of the ATOM exposure and re-running this check weekly.”

Step 5: a person signs off

An analyst re-derives the headline numbers, checks the tool logs, and edits the wording. On this report that took 15 minutes instead of a day. That is the real gain: not replacing judgment, but giving the people with judgment more time to use it.

If you would like this kind of review for your own positions, get in touch.