<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sergey Sereda</title>
    <description>The latest articles on DEV Community by Sergey Sereda (@seredasv).</description>
    <link>https://dev.to/seredasv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3765014%2F9b341635-7d7b-42b6-ac63-7d198cad0034.jpg</url>
      <title>DEV Community: Sergey Sereda</title>
      <link>https://dev.to/seredasv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seredasv"/>
    <language>en</language>
    <item>
      <title>How to Use Krystal's Auto-Farm Vaults: A Practical Guide</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Tue, 15 Sep 2026 21:13:56 +0000</pubDate>
      <link>https://dev.to/seredasv/how-to-use-krystals-auto-farm-vaults-a-practical-guide-adg</link>
      <guid>https://dev.to/seredasv/how-to-use-krystals-auto-farm-vaults-a-practical-guide-adg</guid>
      <description>&lt;p&gt;&lt;em&gt;Krystal's Auto-Farm isn't a single feature. It's a vault, an AI agent, a permissions system, and an instruction language — and most users either skip the configuration or use the defaults without understanding what they're getting. This guide walks through what each piece does and how to actually set it up for real returns.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Auto-Farm is the highest-level product Krystal offers. It looks like one click: choose a risk level, pick a target return, click "Create." Then an AI agent takes over your LP positions 24/7. The reality is more layered. Behind that single click is a vault, an agent, a permissions toggle, a scope guardrail, a free-form instruction block, and an execution config that controls slippage, gas, and timing.&lt;/p&gt;

&lt;p&gt;If you don't understand those layers, the defaults will run your money in ways you didn't intend.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an Auto-Farm Vault Actually Is
&lt;/h2&gt;

&lt;p&gt;Krystal's product stack is nested (per &lt;a href="https://docs.krystal.app/products/vaults/vault-vs-strategy.md" rel="noopener noreferrer"&gt;docs/products/vaults/vault-vs-strategy.md&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity Position&lt;/strong&gt; — &lt;em&gt;«a single position on a DEX (e.g., Uniswap V3), typically represented by an NFT issued by the protocol.»&lt;/em&gt; One range, one pair, your wallet holds the NFT.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity Strategy&lt;/strong&gt; — &lt;em&gt;«a managed approach to a specific trading pair, composed of one or a series of positions that are periodically rebalanced. Strategies could include automation tools like auto-rebalance, auto-exit, and fee compounding.»&lt;/em&gt; Still your positions, but Krystal automates the lifecycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity Vault&lt;/strong&gt; — &lt;em&gt;«can hold multiple Liquidity Strategies across different pools and tokens. This allows users to build and share more customized, advanced strategies under a single, smart-contract-governed framework.»&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Farm Vault&lt;/strong&gt; — a Liquidity Vault &lt;em&gt;plus&lt;/em&gt; an AI agent that selects pools, deploys capital, and manages positions end-to-end (per &lt;a href="https://docs.krystal.app/products/vaults/auto-farm.md" rel="noopener noreferrer"&gt;docs/products/vaults/auto-farm.md&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two products exist in this layer: &lt;strong&gt;Auto-Farm Vaults&lt;/strong&gt; (Krystal-managed AI agent) and &lt;strong&gt;Community Vaults&lt;/strong&gt; (user-created, with a performance fee paid to the vault owner). They use the same vault framework but different operators. Auto-Farm Vaults are owned by Krystal's AI; Community Vaults are owned by whoever created them, and you pay them a fee on top of Krystal's fee.&lt;/p&gt;

&lt;p&gt;The crucial fee detail (per &lt;a href="https://docs.krystal.app/ecosystem/fees.md" rel="noopener noreferrer"&gt;docs.krystal.app/ecosystem/fees.md&lt;/a&gt;): inside an Auto-Farm Vault, &lt;em&gt;«No additional fees for automation, zap, or rebalance within a VAULT»&lt;/em&gt; — only the vault's 10% performance fee on generated rewards applies. Compound, harvest, rebalance, and exit inside the vault are all free. So a pool showing 50% gross APR nets you about 45% after Krystal's cut.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Agent Runs
&lt;/h2&gt;

&lt;p&gt;The Auto-Farm AI agent (per &lt;a href="https://docs.krystal.app/products/vaults/auto-farm/agent-interface.md" rel="noopener noreferrer"&gt;docs/products/vaults/auto-farm/agent-interface.md&lt;/a&gt;) works on an event-driven 24/7 loop, not on a fixed timer. Each evaluation cycle it does four things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reads your full &lt;strong&gt;Instructions&lt;/strong&gt; text.&lt;/li&gt;
&lt;li&gt;Reads &lt;strong&gt;vault state&lt;/strong&gt; — TVL, idle balance, active positions, pending fees, gas.&lt;/li&gt;
&lt;li&gt;Reads &lt;strong&gt;market state&lt;/strong&gt; per candidate pool — TVL, 24h volume, APR (24h and 7d), volatility, fee tier.&lt;/li&gt;
&lt;li&gt;Matches conditions, decides an action plan, executes it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can monitor the agent through four tabs in the interface:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent Overview&lt;/strong&gt; — &lt;em&gt;«What is the agent doing right now?»&lt;/em&gt; Status, goal, what it's managing, next run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chat&lt;/strong&gt; — &lt;em&gt;«How can I interact with the agent using natural language?»&lt;/em&gt; Ask it questions about your vault, request actions, get explanations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action Logs&lt;/strong&gt; — &lt;em&gt;«What actions were attempted and what were the outcomes?»&lt;/em&gt; Every plan the agent tried, with success/partial/failed status.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal&lt;/strong&gt; — &lt;em&gt;«How did the agent arrive at its decisions?»&lt;/em&gt; The raw decision prompt, inputs, and assumptions the agent used.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Chat and Terminal tabs are where the agent stops being a black box. Chat lets you iterate without leaving the UI; Terminal shows you exactly what the agent saw before it acted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Four Layers of Configuration
&lt;/h2&gt;

&lt;p&gt;Auto-Farm Config (per &lt;a href="https://docs.krystal.app/products/vaults/auto-farm/manage-an-auto-farm-vault.md" rel="noopener noreferrer"&gt;docs/products/vaults/auto-farm/manage-an-auto-farm-vault.md&lt;/a&gt;) splits into four sections that map cleanly to what the agent is allowed and instructed to do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissions — What the Agent Can Do
&lt;/h3&gt;

&lt;p&gt;Six actions are available, mapped from user-facing names to internal action keys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add Liquidity&lt;/strong&gt; → &lt;code&gt;swap_and_mint&lt;/code&gt; (open a new LP position)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove Liquidity&lt;/strong&gt; → &lt;code&gt;withdraw_and_swap&lt;/code&gt; (close a position, convert to base currency)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Increase Liquidity&lt;/strong&gt; → &lt;code&gt;swap_and_increase&lt;/code&gt; (add funds to an existing position)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rebalance&lt;/strong&gt; → &lt;code&gt;adjust_range&lt;/code&gt; (move the range on the current position)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compound&lt;/strong&gt; → &lt;code&gt;compound&lt;/code&gt; (reinvest fees back into the position)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Harvest&lt;/strong&gt; → &lt;code&gt;harvest&lt;/code&gt; (collect fees, optionally convert to base currency)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These six are the agent's entire vocabulary. Any custom logic must use combinations of these six. There is no "swap to USDC and exit" action separate from &lt;code&gt;withdraw_and_swap&lt;/code&gt;. There is no "bridge to another chain" action. If you want the agent to do something outside this set, you have to do it manually or use an external tool.&lt;/p&gt;

&lt;p&gt;Practical permission presets by strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Conservative.&lt;/strong&gt; &lt;code&gt;swap_and_mint&lt;/code&gt;, &lt;code&gt;withdraw_and_swap&lt;/code&gt;, &lt;code&gt;adjust_range&lt;/code&gt;, &lt;code&gt;compound&lt;/code&gt;, &lt;code&gt;harvest&lt;/code&gt;. No &lt;code&gt;swap_and_increase&lt;/code&gt; — the agent can rebalance and exit but cannot add more capital to a struggling position. This forces you to decide manually whether to commit more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balanced (default).&lt;/strong&gt; All six enabled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aggressive.&lt;/strong&gt; All six enabled, plus a higher take-profit and tighter stop-loss in Execution Config.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The critical permission to never disable is &lt;code&gt;withdraw_and_swap&lt;/code&gt;. Without it, the agent has no way to exit a position that goes bad. Stop-loss exits depend on it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scopes — Where and How Broadly the Agent Can Operate
&lt;/h3&gt;

&lt;p&gt;Scopes are hard guardrails the agent cannot violate. They fall into three groups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pool-level constraints&lt;/strong&gt; (you set thresholds; the agent rejects any pool that fails):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MIN_POOL_TVL_USD&lt;/code&gt; — minimum pool TVL (e.g. $200,000)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MIN_POOL_VOLUME_24H_USD&lt;/code&gt; — minimum 24h trading volume (e.g. $50,000)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MIN_VOLUME_TVL_RATIO&lt;/code&gt; — volume/TVL ratio (e.g. 0.3 — ensures the pool actually trades)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MAX_FEE_TIER_PCT&lt;/code&gt; — reject pools above this fee tier (e.g. 1.0%)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MIN_POOL_AGE_DAYS&lt;/code&gt; — reject pools younger than this (e.g. 3 days)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MAX_PRICE_VOLATILITY_PCT&lt;/code&gt; — reject pools above this volatility (e.g. 75%)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MIN_APR_24H_PCT&lt;/code&gt; — minimum 24h APR for entry&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MIN_APR_7D_PCT&lt;/code&gt; — minimum 7d APR for sustained yield&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Range constraints&lt;/strong&gt; (control how concentrated the agent's positions are):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MIN_POSITION_RANGE_WIDTH_PCT&lt;/code&gt; — narrowest allowed range&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MAX_POSITION_RANGE_WIDTH_PCT&lt;/code&gt; — widest allowed range (e.g. 0.2% for stablecoin pairs, 50% for volatile pairs)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Asset constraints&lt;/strong&gt; (whitelist and blacklist):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ALLOWED_TOKENS&lt;/code&gt; — token whitelist (USDC, USDT, WETH, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;BLOCKED_TOKENS&lt;/code&gt; — specific token addresses to avoid (scams, exploits)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ALLOWED_PROTOCOLS&lt;/code&gt; — DEX whitelist (Aerodrome, Curve, Uniswap V3)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;BLOCKED_PROTOCOLS&lt;/code&gt; — DEX blacklist (Uniswap V4 BSC, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;BLOCKED_POOLS&lt;/code&gt; — specific pool addresses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The default vault has no scopes set. That means the agent can pick any pool, any token, any range. If you don't configure scopes, you're trusting the AI's defaults with no guardrails. Add them before activating the agent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Instructions — The Logic
&lt;/h3&gt;

&lt;p&gt;Instructions are a free-form text block the agent reads every evaluation cycle. Two ways to create them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate with AI.&lt;/strong&gt; Krystal drafts an instruction set based on your Goal + risk level + return target. You review and edit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write manually.&lt;/strong&gt; Full control. You write the conditions, the agent follows them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent supports a 6-step decision order on each cycle. You should structure your instructions around this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;EXIT&lt;/strong&gt; — for each active strategy past the minimum age, check stop-loss, take-profit, APR collapse, or volatility spike. Exit if any trigger fires.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OUT_RANGE&lt;/strong&gt; — for each strategy where the price has left the range, call &lt;code&gt;adjust_range&lt;/code&gt; to recenter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HARVEST&lt;/strong&gt; — collect fees above the harvest threshold (or convert to base currency).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;INCREASE_LIQUIDITY&lt;/strong&gt; — add capital to the highest-PnL strategy, respecting capital caps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;POOL_SELECTION&lt;/strong&gt; — filter candidate pools against Scopes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ENTRY&lt;/strong&gt; — open a new position on the best qualifying pool.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This order is mandatory in practice: the agent protects capital first, maintains positions second, realizes gains third, and only then deploys idle capital. If you reorder this in your instructions, the agent will still try to follow your text but the platform's safety layers may reject conflicting plans.&lt;/p&gt;

&lt;p&gt;Instructions also include standard patterns you'll reference repeatedly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;POOL_SELECTION&lt;/strong&gt; — list of conditions a pool must satisfy to be eligible (TVL ≥ X, volume ≥ Y, ratio ≥ Z, fee tier ≤ W, age ≥ N, volatility ≤ V, 24h APR ≥ A, 7d APR ≥ B).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ENTRY&lt;/strong&gt; — when to actually mint a position; how to size it (capped by Execution Config); what range width to use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OUT_RANGE&lt;/strong&gt; — when to recenter; minimum shift threshold so the agent doesn't burn gas on tiny adjustments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;INCREASE_LIQUIDITY&lt;/strong&gt; — when to add to an existing position instead of opening a new one; capital cap per pool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DUST_CLEANUP&lt;/strong&gt; — swap stray non-base tokens above a USD threshold into base currency before harvest or increase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HARVEST&lt;/strong&gt; — when to collect fees (threshold-based and time-based triggers); gas-aware skip if fees don't justify the cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EXIT&lt;/strong&gt; — when to close a position (PnL trigger, APR trigger, volatility trigger); stop-loss slippage escalation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Range width is computed by the platform using &lt;code&gt;pool_price_volatility_pct × RANGE_VOL_MULT&lt;/code&gt;. You do not need to specify this formula in Instructions — it is built-in. You only set the bounds (&lt;code&gt;MIN_POSITION_RANGE_WIDTH_PCT&lt;/code&gt;, &lt;code&gt;MAX_POSITION_RANGE_WIDTH_PCT&lt;/code&gt;) and the multiplier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Execution Config — How Actions Are Executed
&lt;/h3&gt;

&lt;p&gt;This is the system-level safety layer the agent cannot violate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Slippage&lt;/strong&gt; — &lt;code&gt;MAX_SLIPPAGE_PCT&lt;/code&gt; (default for swaps, mints, rebalances), &lt;code&gt;STOP_LOSS_SLIPPAGE_L1_PCT&lt;/code&gt; (when ROI drops below L1 threshold), &lt;code&gt;STOP_LOSS_SLIPPAGE_L2_PCT&lt;/code&gt; (when ROI drops below L2 threshold, the worst case).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timing&lt;/strong&gt; — &lt;code&gt;POOL_ACTION_TIMEFRAME_HOURS&lt;/code&gt; (minimum strategy age before EXIT or INCREASE is eligible), &lt;code&gt;COOLDOWN_ACTION_MINUTES&lt;/code&gt; (minimum time between any two actions).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capital limits&lt;/strong&gt; — &lt;code&gt;MAX_VALUE_PER_STRATEGY_USD&lt;/code&gt; (max capital per position), &lt;code&gt;MAX_CAPITAL_PER_POOL_USD&lt;/code&gt; (max exposure to a single pool), &lt;code&gt;MIN_USD_PER_ACTION&lt;/code&gt; (don't bother if the action is too small), &lt;code&gt;MIN_DUST_SWAP_USD&lt;/code&gt; (dust cleanup threshold).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gas&lt;/strong&gt; — &lt;code&gt;MAX_GAS_PRICE_GWEI&lt;/code&gt; (skip actions if gas exceeds this).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Range/sizing&lt;/strong&gt; — &lt;code&gt;PRICE_IMPACT_PCT&lt;/code&gt; (target slippage on entry swaps), &lt;code&gt;RANGE_VOL_MULT&lt;/code&gt; (range width multiplier), &lt;code&gt;OUT_RANGE_MIN_SHIFT_PCT&lt;/code&gt; (minimum shift for a rebalance to be worth it).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stop-loss slippage escalation is the one most users get wrong. Set &lt;code&gt;STOP_LOSS_SLIPPAGE_L1_PCT&lt;/code&gt; to 2-5% and &lt;code&gt;STOP_LOSS_SLIPPAGE_L2_PCT&lt;/code&gt; to 5-15%, with thresholds like -10% / -50%. When the position drops 10%, the agent accepts up to 5% slippage on the exit. When it drops 50%, slippage tolerance climbs to 15%. The exit always succeeds, but the price gets worse as the loss gets worse. Tune these conservatively or you will get slippage-drained exits on black swan days.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Knobs You Set at Creation
&lt;/h2&gt;

&lt;p&gt;When you create an Auto-Farm Vault (per &lt;a href="https://docs.krystal.app/products/vaults/auto-farm/create-an-auto-farm-vault.md" rel="noopener noreferrer"&gt;docs/products/vaults/auto-farm/create-an-auto-farm-vault.md&lt;/a&gt;), you set three preferences that the AI uses to draft your initial instructions:&lt;/p&gt;

&lt;h3&gt;
  
  
  Risk Level
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High Risk&lt;/strong&gt; — Memes, trending tokens, riskier bets with higher volatility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balanced&lt;/strong&gt; — High-cap, established DeFi tokens with moderate risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe&lt;/strong&gt; — Stablecoin pairs and low-volatility strategies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This shapes which pools the agent will consider by default. It does not enforce a hard risk cap — Scopes are what enforce hard limits. Risk Level is a hint that biases the AI-generated instructions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Expected Return
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Max Gain&lt;/strong&gt; — chase top-performing pools for maximum upside.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Growth Mode&lt;/strong&gt; — target ~15-30% APR with balanced optimization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Steady Yield&lt;/strong&gt; — target ~5-15% APR with more stable strategies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again, this is a target. The actual APR depends on the market and your Scopes. If you set Max Gain but your Scopes reject pools above 50% APR, the agent will struggle to find qualifying pools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Farming Style
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Passive&lt;/strong&gt; — relaxed strategy with weekly or less frequent adjustments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart&lt;/strong&gt; — dynamically adjusts based on volatility and fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active&lt;/strong&gt; — rebalances frequently to maximize yield.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Active styles earn more in sideways markets but cost more in gas and create more taxable events. Passive styles are cheaper but miss fast moves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Goal Field vs Instructions: What Goes Where
&lt;/h2&gt;

&lt;p&gt;The Goal field and the Instructions field look similar — both are free-form text — but they play different roles.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Goal&lt;/strong&gt; is what you write at vault creation (1-2 sentences). The Krystal AI generator uses it as input to draft your initial Instructions. You rarely edit the Goal afterwards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instructions&lt;/strong&gt; are the tactical logic the agent reads every evaluation cycle. You can edit Instructions any time, and the next evaluation cycle uses the new version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The clean rule: &lt;strong&gt;Goal is intent. Instructions are conditions and actions.&lt;/strong&gt; Put the philosophy in Goal. Put the thresholds, triggers, and decision logic in Instructions.&lt;/p&gt;

&lt;p&gt;Concrete anti-patterns to avoid:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't write specific thresholds in Goal — &lt;em&gt;"TVL ≥ $200k"&lt;/em&gt; belongs in Scopes, not Goal.&lt;/li&gt;
&lt;li&gt;Don't write specific APR minimums in Goal — &lt;em&gt;"8% APR minimum"&lt;/em&gt; belongs in Instructions or Scopes.&lt;/li&gt;
&lt;li&gt;Don't write range widths in Goal — &lt;em&gt;"0.1% range"&lt;/em&gt; belongs in Scopes.&lt;/li&gt;
&lt;li&gt;Don't write action sequences in Goal — &lt;em&gt;"Harvest when fees exceed 5%"&lt;/em&gt; belongs in Instructions.&lt;/li&gt;
&lt;li&gt;Don't write the chain in Goal or Instructions. Each Auto-Farm vault is bound to a specific chain at creation — the agent already knows it, mentioning it confuses interpretation. Record chain separately for your own reference.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good Goal examples from Krystal's docs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"Build a conservative strategy on blue-chip DeFi pools with stable yields."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Maximize APR on ETH pairs while managing IL."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Farm trending pools but exit quickly when yields drop."&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice: all three are intent + risk profile + asset class + yield target, in one or two sentences. No thresholds. No specific percentages. The AI uses this as a brief and drafts the Instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Actually Start
&lt;/h2&gt;

&lt;p&gt;Four steps, in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Click Create Auto Farm Vault.&lt;/strong&gt; Describe your goal in 1-2 sentences. Examples from Krystal's docs:

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"Build a conservative strategy on blue-chip DeFi pools with stable yields."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Maximize APR on ETH pairs while managing IL."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Farm trending pools but exit quickly when yields drop."&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Focus on intent and constraints, not exact steps. The AI drafts the strategy; you review.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pick Risk Level, Return Mode, and Farming Style.&lt;/strong&gt; Three clicks. These are starting points, not commitments — you change them later by editing Instructions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review the AI-generated strategy.&lt;/strong&gt; This is the step most people skip. The AI will propose a set of pool filters, range widths, harvest thresholds, and stop-loss triggers. Edit anything that doesn't match your actual risk tolerance. At minimum, set Scopes before turning the agent on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verify your wallet, activate the agent, deposit funds.&lt;/strong&gt; By default Auto-Farm Config is not activated — you have to turn it on. Verification is required for security. Deposit is optional at creation; you can add capital later.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After activation, monitor through Agent Overview (status) and Action Logs (what it did). Use Chat to ask the agent why it took a specific action. Use Terminal if you need to debug an unexpected behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Mistakes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Skipping Scopes.&lt;/strong&gt; Without Scopes, the agent can pick any pool. Defaults are sensible but not protective. Add &lt;code&gt;ALLOWED_TOKENS&lt;/code&gt;, &lt;code&gt;BLOCKED_PROTOCOLS&lt;/code&gt;, &lt;code&gt;MIN_POOL_TVL_USD&lt;/code&gt; before activation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setting Max Gain with a Safe risk level.&lt;/strong&gt; The settings contradict each other. The AI will pick a compromise that satisfies neither. Pick one consistent profile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confusing Instructions with Scopes.&lt;/strong&gt; Instructions are the agent's logic ("exit when X"). Scopes are the agent's guardrails ("never touch pool Y"). Both are needed; one alone is incomplete.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leaving &lt;code&gt;withdraw_and_swap&lt;/code&gt; disabled.&lt;/strong&gt; Without this permission, the agent cannot exit. Stop-loss cannot fire. You'll be locked in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setting &lt;code&gt;STOP_LOSS_SLIPPAGE_L2_PCT&lt;/code&gt; too tight.&lt;/strong&gt; On a real crash, the exit won't fill at 2% slippage. You'll sit in a position that should have closed. Set L2 to 10-15%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not monitoring Action Logs.&lt;/strong&gt; The agent will tell you what it did. If you never check, you won't catch a misconfigured strategy until the PnL shows it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treating the AI draft as final.&lt;/strong&gt; The "Generate with AI" output is a starting point. Review every section.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When Auto-Farm Is the Wrong Tool
&lt;/h2&gt;

&lt;p&gt;Auto-Farm Vaults assume you trust the agent's defaults for everything you didn't explicitly configure. The agent only sees on-chain state + Krystal's indexer. No external feeds, no portfolio-wide view, no custom math. If your strategy needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;External data (GoPlus, honeypot.is, holder concentration, token age)&lt;/strong&gt; — the agent works only with on-chain data plus what Krystal indexes. Token age and holder data are not in scope. Run an external script, manually add the result to &lt;code&gt;BLOCKED_POOLS&lt;/code&gt; or &lt;code&gt;BLOCKED_TOKENS&lt;/code&gt;, and the agent stays away.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-protocol coordination (Aave borrow + LP simultaneously, lending supply + LP)&lt;/strong&gt; — the agent handles LP positions only. Anything outside the vault must be coordinated manually. The agent cannot borrow to fund a position.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom scoring (Sharpe ratios, multi-factor risk scores)&lt;/strong&gt; — the agent executes actions, not math. Simplify to a single APR threshold the agent can read; if you need a composite score, compute it externally and reduce it to a binary "include / exclude" decision the agent can act on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portfolio-level PnL&lt;/strong&gt; — the agent sees per-position PnL via Terminal, not aggregate across all vaults. If you need portfolio-level alerts, monitor them yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time price oracles outside the position&lt;/strong&gt; — the agent reads price through Terminal context. No external price feed integration. If your stop-loss depends on a custom oracle, you have to implement it externally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-pool allocation %&lt;/strong&gt; — the agent picks one pool per ENTRY. If you want 30/30/40 split across three pools, you encode that into Instructions as conditional logic, but the runtime behavior is "pick one best pool, then consider the next." Coarse, not surgical.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Historical funding rates (perps), liquidation levels, social signals&lt;/strong&gt; — out of scope. The agent has no concept of these.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For any of these, use a different tool or run external scripts alongside the vault. The agent is best when your strategy fits cleanly into the 6-action vocabulary. Anything that needs more is a sign that Auto-Farm is the wrong layer for that strategy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variables the Agent Sees
&lt;/h2&gt;

&lt;p&gt;The agent reads a fixed set of variables from vault state, position state, and pool state. If you write Instructions that reference variables by name, these are the names you can use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Per vault:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vault_tvl_usd&lt;/code&gt; — total vault value&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vault_base_currency&lt;/code&gt; — base currency token (USDC, USDT, ETH, native gas token)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vault_idle_balance_usd&lt;/code&gt; — undeployed capital&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vault_pending_fees_usd&lt;/code&gt; — uncollected fees total&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Per strategy / position:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;strategy_id&lt;/code&gt; — unique identifier&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_value_usd&lt;/code&gt; — current LP value&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_pnl_usd&lt;/code&gt; — unrealized PnL in USD&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_pnl_pct&lt;/code&gt; — PnL as percentage&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_age_hours&lt;/code&gt; — hours since position opened&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_pool_address&lt;/code&gt; — pool contract address&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_range_lower_pct&lt;/code&gt; — lower bound as % from current price&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_range_upper_pct&lt;/code&gt; — upper bound as % from current price&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_in_range&lt;/code&gt; — boolean: price within range&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_pending_fees_usd&lt;/code&gt; — uncollected fees for this strategy&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_pending_fees_token0&lt;/code&gt; — pending fees in token0&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;strategy_pending_fees_token1&lt;/code&gt; — pending fees in token1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Per candidate pool:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;pool_address&lt;/code&gt;, &lt;code&gt;pool_tvl_usd&lt;/code&gt;, &lt;code&gt;pool_volume_24h_usd&lt;/code&gt;, &lt;code&gt;pool_apr_24h_pct&lt;/code&gt;, &lt;code&gt;pool_apr_7d_pct&lt;/code&gt;, &lt;code&gt;pool_price_volatility_pct&lt;/code&gt;, &lt;code&gt;pool_fee_tier_pct&lt;/code&gt;, &lt;code&gt;pool_age_days&lt;/code&gt;, &lt;code&gt;pool_token0_address&lt;/code&gt;, &lt;code&gt;pool_token1_address&lt;/code&gt;, &lt;code&gt;pool_protocol&lt;/code&gt;, &lt;code&gt;pool_current_price&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Execution context:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;current_gas_price_gwei&lt;/code&gt;, &lt;code&gt;estimated_gas_cost_usd&lt;/code&gt;, &lt;code&gt;max_value_per_strategy_usd&lt;/code&gt;, &lt;code&gt;execution_slippage_pct&lt;/code&gt;, &lt;code&gt;min_dust_swap_usd&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Per token balance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;token_balance_amount&lt;/code&gt;, &lt;code&gt;token_balance_usd&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your Instructions reference a variable name that isn't in this list, the agent treats it as undefined and skips that condition. Use the exact names above.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Blank Template
&lt;/h2&gt;

&lt;p&gt;A complete copy-paste starting point for any Auto-Farm Vault. Fill in the bracketed values, set your chain in your own notes (not in the template), and activate the agent after reviewing every section.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## GOAL&lt;/span&gt;

[1-2 sentences: intent + risk profile + asset class + yield target]

&lt;span class="gu"&gt;## SCOPES&lt;/span&gt;

&lt;span class="gu"&gt;### Vault&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; BASE_CURRENCY = [USDC | USDT | ETH | native_gas_token]

&lt;span class="gu"&gt;### Pool constraints&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; MIN_POOL_TVL_USD = $[N]
&lt;span class="p"&gt;-&lt;/span&gt; MIN_POOL_VOLUME_24H_USD = $[N]
&lt;span class="p"&gt;-&lt;/span&gt; MIN_VOLUME_TVL_RATIO = [N]
&lt;span class="p"&gt;-&lt;/span&gt; MAX_FEE_TIER_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; MIN_POOL_AGE_DAYS = [N]
&lt;span class="p"&gt;-&lt;/span&gt; MAX_PRICE_VOLATILITY_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; MIN_APR_24H_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; MIN_APR_7D_PCT = [N]%

&lt;span class="gu"&gt;### Range constraints&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; MIN_POSITION_RANGE_WIDTH_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; MAX_POSITION_RANGE_WIDTH_PCT = [N]%

&lt;span class="gu"&gt;### Asset constraints&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; ALLOWED_TOKENS = [token1, token2, ...]
&lt;span class="p"&gt;-&lt;/span&gt; BLOCKED_TOKENS = [token_address, ...]
&lt;span class="p"&gt;-&lt;/span&gt; ALLOWED_PROTOCOLS = [protocol1, protocol2, ...]
&lt;span class="p"&gt;-&lt;/span&gt; BLOCKED_PROTOCOLS = [protocol_name, ...]
&lt;span class="p"&gt;-&lt;/span&gt; BLOCKED_POOLS = [pool_address, ...]

&lt;span class="gu"&gt;## INSTRUCTIONS&lt;/span&gt;

&lt;span class="gu"&gt;### DECISION_FRAMEWORK&lt;/span&gt;

Evaluate per active strategy in this exact order:
&lt;span class="p"&gt;
1.&lt;/span&gt; EXIT
&lt;span class="p"&gt;2.&lt;/span&gt; OUT_RANGE
&lt;span class="p"&gt;3.&lt;/span&gt; HARVEST
&lt;span class="p"&gt;4.&lt;/span&gt; INCREASE_LIQUIDITY
&lt;span class="p"&gt;5.&lt;/span&gt; POOL_SELECTION
&lt;span class="p"&gt;6.&lt;/span&gt; ENTRY

&lt;span class="gu"&gt;### POOL_SELECTION&lt;/span&gt;

A pool qualifies for ENTRY only if ALL of the following are true:
&lt;span class="p"&gt;
-&lt;/span&gt; pool_address is NOT in BLOCKED_POOLS
&lt;span class="p"&gt;-&lt;/span&gt; pool_protocol is in ALLOWED_PROTOCOLS (if set)
&lt;span class="p"&gt;-&lt;/span&gt; pool_token0_address AND pool_token1_address are in ALLOWED_TOKENS (if set)
&lt;span class="p"&gt;-&lt;/span&gt; pool_tvl_usd &amp;gt;= MIN_POOL_TVL_USD
&lt;span class="p"&gt;-&lt;/span&gt; pool_volume_24h_usd &amp;gt;= MIN_POOL_VOLUME_24H_USD
&lt;span class="p"&gt;-&lt;/span&gt; pool_volume_24h_usd &amp;gt;= pool_tvl_usd × MIN_VOLUME_TVL_RATIO
&lt;span class="p"&gt;-&lt;/span&gt; pool_fee_tier_pct &amp;lt;= MAX_FEE_TIER_PCT
&lt;span class="p"&gt;-&lt;/span&gt; pool_age_days &amp;gt;= MIN_POOL_AGE_DAYS
&lt;span class="p"&gt;-&lt;/span&gt; pool_price_volatility_pct &amp;lt;= MAX_PRICE_VOLATILITY_PCT
&lt;span class="p"&gt;-&lt;/span&gt; pool_apr_24h_pct &amp;gt;= MIN_APR_24H_PCT
&lt;span class="p"&gt;-&lt;/span&gt; pool_apr_7d_pct &amp;gt;= MIN_APR_7D_PCT

Among all qualified pools, select the pool with the highest pool_apr_24h_pct. If two pools tie on APR, select the one with higher pool_tvl_usd.

&lt;span class="gu"&gt;### ENTRY&lt;/span&gt;

Execute swap_and_mint on the selected pool from POOL_SELECTION if ALL of the following are true:
&lt;span class="p"&gt;
-&lt;/span&gt; vault_idle_balance_usd &amp;gt;= MAX_VALUE_PER_STRATEGY_DEPLOY_USD
&lt;span class="p"&gt;-&lt;/span&gt; The selected pool's strategy_id does NOT already exist in this vault

When executing swap_and_mint:
&lt;span class="p"&gt;
-&lt;/span&gt; Use the platform's range rule (RANGE_VOL_MULT × pool_price_volatility_pct, clamped by MIN/MAX bounds)
&lt;span class="p"&gt;-&lt;/span&gt; Target position size = MAX_VALUE_PER_STRATEGY_DEPLOY_USD
&lt;span class="p"&gt;-&lt;/span&gt; If MAX_VALUE_PER_STRATEGY_DEPLOY_USD &amp;lt; MIN_POSITION_SIZE_USD, do NOT open

&lt;span class="gu"&gt;### OUT_RANGE&lt;/span&gt;

For each strategy where strategy_in_range is false:
&lt;span class="p"&gt;
-&lt;/span&gt; Execute adjust_range using the ENTRY range rule
&lt;span class="p"&gt;-&lt;/span&gt; Skip if the resulting range width differs from the current range width by less than OUT_RANGE_MIN_SHIFT_PCT

&lt;span class="gu"&gt;### INCREASE_LIQUIDITY&lt;/span&gt;

BEFORE executing INCREASE_LIQUIDITY, check ENTRY conditions: if vault_idle_balance_usd &amp;gt;= MAX_VALUE_PER_STRATEGY_DEPLOY_USD AND a new pool qualifies from POOL_SELECTION, execute ENTRY instead, NOT INCREASE_LIQUIDITY.

Otherwise, execute swap_and_increase on the strategy with the highest strategy_pnl_pct if ALL of the following are true:
&lt;span class="p"&gt;
-&lt;/span&gt; Any vault token balance (excluding vault_pending_fees_usd) has USD value &amp;gt;= MIN_USD_PER_ACTION
&lt;span class="p"&gt;-&lt;/span&gt; strategy_value_usd &amp;lt; MAX_CAPITAL_PER_POOL_USD

If strategy_value_usd &amp;gt;= MAX_CAPITAL_PER_POOL_USD, do NOT increase.

&lt;span class="gu"&gt;### DUST_CLEANUP&lt;/span&gt;

Execute BEFORE HARVEST and BEFORE INCREASE_LIQUIDITY.

For each token in vault where token_address is not vault_base_currency:
&lt;span class="p"&gt;
-&lt;/span&gt; If token_balance_usd &amp;gt;= MIN_DUST_SWAP_USD
&lt;span class="p"&gt;-&lt;/span&gt; AND token_address is NOT pool_token0_address AND is NOT pool_token1_address of any active strategy

Then swap the entire token_balance_amount to vault_base_currency using swap_and_increase on the strategy with the highest strategy_pnl_pct.

&lt;span class="gu"&gt;### HARVEST&lt;/span&gt;

For each strategy where strategy_age_hours &amp;gt;= POOL_ACTION_TIMEFRAME_HOURS:

Execute harvest (converting fees to vault_base_currency) when ANY of the following are true:
&lt;span class="p"&gt;
-&lt;/span&gt; strategy_pending_fees_usd &amp;gt;= strategy_value_usd × HARVEST_PERC
&lt;span class="p"&gt;-&lt;/span&gt; A TAKE_PROFIT exit is being triggered in the same evaluation cycle

Skip harvest if ALL of the following are true:
&lt;span class="p"&gt;
-&lt;/span&gt; strategy_pending_fees_usd &amp;lt; estimated_gas_cost_usd × HARVEST_GAS_RATIO

Conversion target: vault_base_currency.

&lt;span class="gu"&gt;### EXIT&lt;/span&gt;

For each strategy where strategy_age_hours &amp;gt;= POOL_ACTION_TIMEFRAME_HOURS:

Execute withdraw_and_swap (converting to vault_base_currency) when ANY of the following are true:
&lt;span class="p"&gt;
-&lt;/span&gt; strategy_pnl_pct &amp;lt; STOP_LOSS_PERC
&lt;span class="p"&gt;-&lt;/span&gt; strategy_pnl_pct &amp;gt;= TAKE_PROFIT_PERC
&lt;span class="p"&gt;-&lt;/span&gt; pool_apr_24h_pct &amp;lt; MIN_APR_24H_PCT
&lt;span class="p"&gt;-&lt;/span&gt; pool_apr_7d_pct &amp;lt; MIN_APR_7D_PCT
&lt;span class="p"&gt;-&lt;/span&gt; pool_price_volatility_pct &amp;gt; MAX_PRICE_VOLATILITY_PCT

STOP_LOSS SLIPPAGE ESCALATION:
&lt;span class="p"&gt;
-&lt;/span&gt; If strategy_pnl_pct &amp;lt; STOP_LOSS_SLIPPAGE_L1_THRESHOLD, use STOP_LOSS_SLIPPAGE_L1_PCT for the withdraw
&lt;span class="p"&gt;-&lt;/span&gt; If strategy_pnl_pct &amp;lt; STOP_LOSS_SLIPPAGE_L2_THRESHOLD, use STOP_LOSS_SLIPPAGE_L2_PCT for the withdraw

&lt;span class="gu"&gt;## EXECUTION_CONFIG&lt;/span&gt;

&lt;span class="gu"&gt;### Slippage&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; MAX_SLIPPAGE_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; STOP_LOSS_SLIPPAGE_L1_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; STOP_LOSS_SLIPPAGE_L2_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; STOP_LOSS_SLIPPAGE_L1_THRESHOLD = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; STOP_LOSS_SLIPPAGE_L2_THRESHOLD = [N]%

&lt;span class="gu"&gt;### Timing&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; POOL_ACTION_TIMEFRAME_HOURS = [N]
&lt;span class="p"&gt;-&lt;/span&gt; POOL_ACTION_TIMEFRAME_TP_HOURS = [N]
&lt;span class="p"&gt;-&lt;/span&gt; COOLDOWN_ACTION_MINUTES = [N]

&lt;span class="gu"&gt;### Capital&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; MAX_VALUE_PER_STRATEGY_USD = $[N]
&lt;span class="p"&gt;-&lt;/span&gt; MAX_VALUE_PER_STRATEGY_DEPLOY_USD = $[N]
&lt;span class="p"&gt;-&lt;/span&gt; MIN_POSITION_SIZE_USD = $[N]
&lt;span class="p"&gt;-&lt;/span&gt; MAX_CAPITAL_PER_POOL_USD = $[N]
&lt;span class="p"&gt;-&lt;/span&gt; MIN_USD_PER_ACTION = $[N]
&lt;span class="p"&gt;-&lt;/span&gt; MIN_DUST_SWAP_USD = $[N]

&lt;span class="gu"&gt;### Gas&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; MAX_GAS_PRICE_GWEI = [N]

&lt;span class="gu"&gt;### Range / sizing&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; PRICE_IMPACT_PCT = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; RANGE_VOL_MULT = [N]
&lt;span class="p"&gt;-&lt;/span&gt; OUT_RANGE_MIN_SHIFT_PCT = [N]%

&lt;span class="gu"&gt;### Strategy-specific&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; STOP_LOSS_PERC = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; TAKE_PROFIT_PERC = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; HARVEST_PERC = [N]%
&lt;span class="p"&gt;-&lt;/span&gt; HARVEST_GAS_RATIO = [N]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Worked Example: Conservative Stablecoin Vault
&lt;/h2&gt;

&lt;p&gt;Same template, filled in for a USDC/USDT stablecoin vault on Base. Tighter ranges, higher TVL floor, very low volatility tolerance, low stop-loss.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;GOAL:
Maximize fee generation through ultra-tight, stable-stable liquidity
(USDC/USDT only), with disciplined capital preservation via dual APR
filter (24h+7d), elevated pool liquidity threshold, and tight stop-loss
execution. Position ranges max 0.2% width to capture near-peg fee density
without IL exposure. Convert all earnings to USDC.

SCOPES:
&lt;span class="p"&gt;-&lt;/span&gt; BASE_CURRENCY = USDC
&lt;span class="p"&gt;-&lt;/span&gt; MIN_POOL_TVL_USD = $200,000
&lt;span class="p"&gt;-&lt;/span&gt; MIN_POOL_VOLUME_24H_USD = $100,000
&lt;span class="p"&gt;-&lt;/span&gt; MIN_VOLUME_TVL_RATIO = 0.3
&lt;span class="p"&gt;-&lt;/span&gt; MAX_PRICE_VOLATILITY_PCT = 0.5%
&lt;span class="p"&gt;-&lt;/span&gt; MIN_APR_24H_PCT = 8%
&lt;span class="p"&gt;-&lt;/span&gt; MIN_APR_7D_PCT = 5%
&lt;span class="p"&gt;-&lt;/span&gt; MAX_CAPITAL_PER_POOL_PERC = 50%
&lt;span class="p"&gt;-&lt;/span&gt; MIN_POSITION_RANGE_WIDTH_PCT = 0.1%
&lt;span class="p"&gt;-&lt;/span&gt; MAX_POSITION_RANGE_WIDTH_PCT = 0.2%
&lt;span class="p"&gt;-&lt;/span&gt; ALLOWED_TOKENS = [USDC, USDT]

INSTRUCTIONS: [Standard 6-pattern framework from the Blank Template]

EXECUTION_CONFIG:
&lt;span class="p"&gt;-&lt;/span&gt; STOP_LOSS_PERC = -1%
&lt;span class="p"&gt;-&lt;/span&gt; TAKE_PROFIT_PERC = +8%
&lt;span class="p"&gt;-&lt;/span&gt; STOP_LOSS_SLIPPAGE_L1_PCT = 2%
&lt;span class="p"&gt;-&lt;/span&gt; STOP_LOSS_SLIPPAGE_L2_PCT = 5%
&lt;span class="p"&gt;-&lt;/span&gt; HARVEST_PERC = 0.5%
&lt;span class="p"&gt;-&lt;/span&gt; HARVEST_DAYS_MAX = 30
&lt;span class="p"&gt;-&lt;/span&gt; HARVEST_GAS_RATIO = 50
&lt;span class="p"&gt;-&lt;/span&gt; MAX_VALUE_PER_STRATEGY_USD = 50% of vault
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this config does, in plain English:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only USDC/USDT pools qualify (&lt;code&gt;ALLOWED_TOKENS&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;TVL must be at least $200k and 24h volume at least $100k — filters out shallow pools.&lt;/li&gt;
&lt;li&gt;Volatility must be ≤ 0.5% — a stable-stable pool should not be moving much; high volatility means depeg risk.&lt;/li&gt;
&lt;li&gt;APR must be at least 8% over 24h and 5% over 7d — filters out pools with collapsing yields.&lt;/li&gt;
&lt;li&gt;Range width is between 0.1% and 0.2% — tight enough to capture near-peg fee density, wide enough to not rebalance every block.&lt;/li&gt;
&lt;li&gt;Stop-loss at -1% — tight, because stable-stable means any meaningful move is a depeg event.&lt;/li&gt;
&lt;li&gt;Take-profit at +8% — locks in fee gains before they get competed away.&lt;/li&gt;
&lt;li&gt;Harvest at 0.5% of position value — small fee thresholds, because stablecoin fees accumulate slowly and you want to compound them aggressively.&lt;/li&gt;
&lt;li&gt;Max 50% of vault per pool — prevents the agent from concentrating everything in a single pool.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a "set and forget" config. Once activated, you mostly watch Action Logs for any unexpected exits and rebalance the vault's capital allocation when the agent reports it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validation Checklist Before You Activate
&lt;/h2&gt;

&lt;p&gt;Before flipping the agent switch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Goal field is 1-2 sentences, abstract intent only — no thresholds, no actions.&lt;/li&gt;
&lt;li&gt;[ ] Scopes cover pool constraints, range constraints, and asset constraints.&lt;/li&gt;
&lt;li&gt;[ ] Instructions follow the 6-step decision order (EXIT → OUT_RANGE → HARVEST → INCREASE_LIQUIDITY → POOL_SELECTION → ENTRY).&lt;/li&gt;
&lt;li&gt;[ ] All 6 action patterns present (POOL_SELECTION, ENTRY, OUT_RANGE, INCREASE_LIQUIDITY, DUST_CLEANUP, HARVEST, EXIT) — or whatever subset your strategy needs, but documented.&lt;/li&gt;
&lt;li&gt;[ ] All variable names used in Instructions match the names in the Variables section above.&lt;/li&gt;
&lt;li&gt;[ ] No external API references (GoPlus, honeypot.is, Twitter, etc.).&lt;/li&gt;
&lt;li&gt;[ ] No custom math (Sharpe ratios, custom risk scoring).&lt;/li&gt;
&lt;li&gt;[ ] No cross-protocol coordination (Aave borrows, lending supply).&lt;/li&gt;
&lt;li&gt;[ ] Execution Config has slippage (default + L1 + L2), timing, capital limits, gas ceiling.&lt;/li&gt;
&lt;li&gt;[ ] STOP_LOSS escalation thresholds defined — L1 and L2.&lt;/li&gt;
&lt;li&gt;[ ] HARVEST trigger defined (percentage + optional time fallback).&lt;/li&gt;
&lt;li&gt;[ ] BLOCKED_POOLS / BLOCKED_TOKENS list populated if there are known bad actors.&lt;/li&gt;
&lt;li&gt;[ ] Chain recorded separately (in your own notes, not in Goal or Instructions).&lt;/li&gt;
&lt;li&gt;[ ] Wallet verified before activation.&lt;/li&gt;
&lt;li&gt;[ ] Deposit is sized so a single &lt;code&gt;MAX_VALUE_PER_STRATEGY_USD&lt;/code&gt; mistake can't wipe the vault.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If any checkbox is missing, fix it before activation. The agent will run with whatever defaults the platform fills in for missing fields, and those defaults may not match your intent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;Auto-Farm is the easiest path to active LP management on Krystal, but it's also the easiest path to running your money with defaults you didn't read. The three-step wizard at creation is the surface. The four-layer config underneath — Permissions, Scopes, Instructions, Execution Config — is where real returns and real risk live.&lt;/p&gt;

&lt;p&gt;A working setup is usually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Risk Level + Return Mode + Farming Style&lt;/strong&gt; that match each other (e.g. Balanced + Growth Mode + Smart).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scopes&lt;/strong&gt; that reject scam pools and cap fee tier + volatility (your hard floor).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instructions&lt;/strong&gt; that follow the 6-step decision order (EXIT → OUT_RANGE → HARVEST → INCREASE → POOL_SELECTION → ENTRY), with stop-loss and take-profit triggers defined.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution Config&lt;/strong&gt; with realistic slippage escalations (L1 = 2-5%, L2 = 10-15%) and a sensible cooldown (5-15 minutes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring&lt;/strong&gt; through Action Logs and Chat, not just the Overview screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat the AI-generated draft as a starting point. Edit it. Add Scopes. Activate. Then watch Action Logs for the first week before trusting the agent with more capital.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This guide is based on the official Krystal documentation for Auto-Farm Vaults (verified January 2026). Vault mechanics, fees, and AI agent behavior may change as Krystal iterates on the product. Always cross-check the live docs at &lt;a href="https://docs.krystal.app" rel="noopener noreferrer"&gt;docs.krystal.app&lt;/a&gt; before deploying real capital.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>defi</category>
      <category>cryptocurrency</category>
      <category>bitcoin</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>LP Automation Tools Compared: VFat, Krystal, and MaxFi</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Fri, 11 Sep 2026 16:02:09 +0000</pubDate>
      <link>https://dev.to/seredasv/lp-automation-tools-compared-vfat-krystal-and-maxfi-lof</link>
      <guid>https://dev.to/seredasv/lp-automation-tools-compared-vfat-krystal-and-maxfi-lof</guid>
      <description>&lt;p&gt;&lt;em&gt;Three tools automate concentrated-liquidity positions. VFat and Krystal are the established names; MaxFi is the new entrant with an aggressive zero-swap rebalance logic. The mechanic that makes MaxFi great in a bounce-back market is the same one that can hurt you badly in a continued-down market. Here's what each one charges, what each one does on a price drop, and how to pick.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Active liquidity management has three popular automation tools right now: &lt;strong&gt;VFat&lt;/strong&gt;, &lt;strong&gt;Krystal&lt;/strong&gt;, and &lt;strong&gt;MaxFi&lt;/strong&gt;. They all claim to do the same thing — keep your LP range in the money — but they rebalance very differently. And how they rebalance determines whether you keep your gains or get steamrolled on a bad day.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Each Tool Does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://vfat.io" rel="noopener noreferrer"&gt;VFat&lt;/a&gt;&lt;/strong&gt; — yield aggregator and concentrated-liquidity manager. Uses its own Sickle contracts, self-custodial. Charges a small platform fee per rebalance on top of swap costs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://defi.krystal.app" rel="noopener noreferrer"&gt;Krystal&lt;/a&gt;&lt;/strong&gt; — multi-chain liquidity-farming agent with many DEXs. Heavy on Auto-Farm Vaults and AI-driven monitoring. Charges per-action fees plus auto-compound and auto-harvest fees on LP earnings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://maxfi.tech" rel="noopener noreferrer"&gt;MaxFi&lt;/a&gt;&lt;/strong&gt; — newer product from the Snuggle team. Runs on &lt;strong&gt;Robinhood Chain, Base, and Arbitrum&lt;/strong&gt;, including tokenized US stocks against USDG on Robinhood Chain. Uses a zero-swap rebalancing logic that sticks to the current price and never crystallizes impermanent loss at extreme moves. The rebalance delay is user-configurable from &lt;strong&gt;1 hour to 168 hours&lt;/strong&gt;. Charges a 15% performance fee on LP earnings only. Configuration is &lt;strong&gt;per-position&lt;/strong&gt; with a &lt;strong&gt;preset library of three levels&lt;/strong&gt; (Aggressive / Moderate / Conservative) auto-tuned per pool from on-chain liquidity data; you can also customize range width and rebalance delay manually on top of any preset. &lt;strong&gt;Range width is a single parameter that applies equally to both sides of the current price&lt;/strong&gt; — you cannot widen one side independently of the other.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A note on Snuggle vs. MaxFi.&lt;/strong&gt; &lt;a href="https://snuggle.fi" rel="noopener noreferrer"&gt;Snuggle&lt;/a&gt; and MaxFi are products of the same team and share the zero-swap rebalancing logic. &lt;strong&gt;MaxFi is the broader, more active version&lt;/strong&gt;: it expands on Snuggle by adding &lt;strong&gt;Robinhood Chain&lt;/strong&gt; support (tokenized US stocks and ETFs) and a much wider set of pools across Robinhood Chain, Base, and Arbitrum, plus AI-managed strategies. So when this article talks about MaxFi's zero-swap mechanic, the same logic applies to Snuggle — the difference is mostly in surface area, not in how the rebalance itself works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Key Difference: How They Rebalance
&lt;/h2&gt;

&lt;p&gt;VFat and Krystal use the &lt;strong&gt;classic swap-to-rebalance&lt;/strong&gt; approach. When your position goes out of range, they sell one token and buy the other to bring the position back inside the new range. That swap happens at the worst possible moment — right after a price extreme — and costs you in three ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The DEX swap fee (0.01–1% depending on the pool)&lt;/li&gt;
&lt;li&gt;Slippage on the trade (often 0.5–5% in volatile moves)&lt;/li&gt;
&lt;li&gt;MEV / sandwich attacks (0.2–1% on public mempools)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You also crystallize your impermanent loss permanently. If the price reverses immediately, you've already bought high or sold low. That loss is locked in forever.&lt;/p&gt;

&lt;p&gt;MaxFi uses a different approach — &lt;strong&gt;zero-swap rebalancing&lt;/strong&gt;. When your position goes out of range, MaxFi repositions the range to touch the current price using only the tokens you already hold. No swap. No slippage. No MEV. The AMM itself rebalances you as price drifts back through your range. Impermanent loss is deferred, not crystallized.&lt;/p&gt;

&lt;p&gt;Sounds perfect. It is, with one big asterisk.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tail Risk Nobody Mentions
&lt;/h2&gt;

&lt;p&gt;Zero-swap rebalancing works brilliantly when the market is &lt;strong&gt;mean-reverting&lt;/strong&gt;: price spikes, your range gets re-anchored, price drifts back, the AMM rebalances you at better average prices, you collect fees the whole time.&lt;/p&gt;

&lt;p&gt;But what happens when the price doesn't bounce back — when it just keeps going down?&lt;/p&gt;

&lt;p&gt;In a classic swap-based tool, a falling price triggers an ETH→USDC swap at the lower price. You exit your ETH exposure into USDC. Painful trade, but your capital is partly protected.&lt;/p&gt;

&lt;p&gt;In a zero-swap tool, &lt;strong&gt;the price falls through your range and the position stays 100% ETH&lt;/strong&gt;. No swap, no protection. The range just gets re-anchored to the new, lower price, with you sitting in the depreciating token. The next 10% drop does the same thing. And the next. Each "rebalance" is a no-op: you're already all-ETH, so there's nothing to swap, and the range simply slides lower with you.&lt;/p&gt;

&lt;p&gt;You only get back to a balanced position if the price reverses and traders start pushing it back through your range. If the trend is one-way down, you ride the entire drop with no hedge.&lt;/p&gt;

&lt;p&gt;Here's the scenario at a glance:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Market Behavior&lt;/th&gt;
&lt;th&gt;VFat / Krystal (Swap-Based)&lt;/th&gt;
&lt;th&gt;MaxFi (Zero-Swap)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Range-bound oscillation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OK — earns fees, but pays swap costs on every rebalance&lt;/td&gt;
&lt;td&gt;Best — earns fees with zero structural cost; defers IL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Drift down then bounce&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OK — crystallizes IL at the bottom, but recovers&lt;/td&gt;
&lt;td&gt;Best — no IL crystallized, AMM rebalances you on the way back&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sustained 50% rise&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OK — locks in gains via repeated sells&lt;/td&gt;
&lt;td&gt;OK — accumulates USDC on each range exit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sustained 50% drop&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Best — converts ETH to USDC on each dip, preserves capital&lt;/td&gt;
&lt;td&gt;Worst — stays 100% ETH through the entire decline, takes the full hit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The row that matters most: &lt;strong&gt;the one-way drop&lt;/strong&gt;. That's where MaxFi's elegance becomes a liability.&lt;/p&gt;

&lt;p&gt;This isn't a theoretical concern. ETH has dropped 50%+ multiple times in its history (2018, 2022, mid-2025). A position opened just before any of those drops would have ridden all the way down on a zero-swap tool.&lt;/p&gt;

&lt;p&gt;There's a second consequence worth naming explicitly. In a swap-based tool, every dip sells a slice of your ETH into USDC — your average entry price for ETH drops with each dip. You're locking in "I bought cheaper." In a zero-swap tool, &lt;strong&gt;your average entry price never improves on a one-way move&lt;/strong&gt;: each rebalance just re-anchors the range to the new lower price, with the position sitting 100% ETH. No swap, no better average.&lt;/p&gt;

&lt;p&gt;And the second cost is dead time: when the price sits below your range, your position is 100% ETH and earns &lt;strong&gt;zero LP fees&lt;/strong&gt;. You only start earning again when the price reverses and re-enters your range — and even then, only on trades that cross through it. The pool is effectively idle for the entire drawdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where You Configure Automation: Per-Position vs Per-Vault
&lt;/h2&gt;

&lt;p&gt;This is a structural difference that doesn't show up in the fee tables but matters a lot when you're running many positions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://vfat.io" rel="noopener noreferrer"&gt;VFat&lt;/a&gt;&lt;/strong&gt; is &lt;strong&gt;per-position only&lt;/strong&gt;. Every CL position you open gets its own Auto-Rebalance, Auto-Harvest, Auto-Compound, and Auto-Exit settings. There is no "apply this rule to N positions at once." Ten positions = ten separate automation configs to maintain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://defi.krystal.app" rel="noopener noreferrer"&gt;Krystal&lt;/a&gt;&lt;/strong&gt; runs on three nested levels (per &lt;a href="https://docs.krystal.app/products/vaults/vault-vs-strategy.md" rel="noopener noreferrer"&gt;docs/products/vaults/vault-vs-strategy.md&lt;/a&gt;):

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity Position:&lt;/strong&gt; &lt;em&gt;«a single position on a DEX (e.g., Uniswap V3), typically represented by an NFT issued by the protocol.»&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity Strategy:&lt;/strong&gt; &lt;em&gt;«a managed approach to a specific trading pair, composed of one or a series of positions that are periodically rebalanced. Strategies could include automation tools like auto-rebalance, auto-exit, and fee compounding.»&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liquidity Vault:&lt;/strong&gt; &lt;em&gt;«can hold multiple Liquidity Strategies across different pools and tokens. This allows users to build and share more customized, advanced strategies under a single, smart-contract-governed framework.»&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Vault's core capabilities (per &lt;a href="https://docs.krystal.app/products/vaults/what-is-liquidity-vault.md" rel="noopener noreferrer"&gt;docs/products/vaults/what-is-liquidity-vault.md&lt;/a&gt;): &lt;em&gt;«Manages multiple LP assets · Auto collect and convert fees · Enables auto-compounding, rebalancing, exiting · Bundle multiple LP actions (e.g., migrate, rebalance) into fewer txs · Auto-farm with enabled AI Agent.»&lt;/em&gt; Auto-Farm Vaults add an AI agent that selects pools, deploys capital, and manages positions end-to-end hands-free (per &lt;a href="https://docs.krystal.app/products/vaults/auto-farm.md" rel="noopener noreferrer"&gt;docs/products/vaults/auto-farm.md&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Crucial fee detail (per &lt;a href="https://docs.krystal.app/ecosystem/fees.md" rel="noopener noreferrer"&gt;docs.krystal.app/ecosystem/fees.md&lt;/a&gt;): inside a Vault, &lt;em&gt;«No additional fees for automation, zap, or rebalance within a VAULT»&lt;/em&gt; — only the Vault's performance fee on generated rewards applies (10% for Auto-Farm Vault, 10% default / 5% sharing for Community Vault). This means a single fee layer and a single automation layer across all positions inside the Vault.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://maxfi.tech" rel="noopener noreferrer"&gt;MaxFi&lt;/a&gt;&lt;/strong&gt; is per-position with a strong preset library. Three presets (Aggressive / Moderate / Conservative) per pool are auto-generated from on-chain liquidity data; you tune one position at a time, but the presets make that fast.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practical takeaway: &lt;strong&gt;if you want one rulebook applied across many positions, Krystal is the only one of the three that does that natively.&lt;/strong&gt; VFat and MaxFi force per-position config, which is fine for 1–5 positions and gets painful past 10.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Capital After Opening
&lt;/h2&gt;

&lt;p&gt;Once a position is open, the three tools treat capital additions differently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://maxfi.tech" rel="noopener noreferrer"&gt;MaxFi&lt;/a&gt;&lt;/strong&gt; does &lt;strong&gt;not&lt;/strong&gt; let you add funds to an existing position. The only mechanism that grows the position is auto-compound — the matching-token side of accrued fees is reinvested into the new range after each rebalance (&lt;a href="https://www.maxfi.tech/docs" rel="noopener noreferrer"&gt;maxfi.tech/docs&lt;/a&gt; → Auto-Compound). There's no "Add Funds" / "Top Up" / "Increase Position" flow in the docs. If you want more exposure to a working position, you open a new one — and end up with several positions on the same asset at different investment sizes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://defi.krystal.app" rel="noopener noreferrer"&gt;Krystal&lt;/a&gt;&lt;/strong&gt; does support it. The Position Details page has an explicit &lt;strong&gt;"Add Liquidity"&lt;/strong&gt; button (per &lt;a href="https://docs.krystal.app/products/liquidity-management/lp-transactions/provide-liquidity.md" rel="noopener noreferrer"&gt;docs.krystal.app/products/liquidity-management/lp-transactions/provide-liquidity.md&lt;/a&gt;), so you can deploy more capital into an existing position in one click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://vfat.io" rel="noopener noreferrer"&gt;VFat&lt;/a&gt;&lt;/strong&gt; does support it. You can deploy more capital into an existing VFat position.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practical takeaway: if your strategy involves scaling into a working position over time, Krystal and VFat are the cleanest fit. MaxFi forces you to manage multiple positions on the same asset.&lt;/p&gt;

&lt;h2&gt;
  
  
  UI and Pool Coverage
&lt;/h2&gt;

&lt;p&gt;Two more practical differences worth naming:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VFat's UI is cleaner.&lt;/strong&gt; It does one thing — concentrated-liquidity management — and the dashboard stays focused. Less clutter, fewer popups, fewer side menus. If you only need LP automation and don't care about cross-chain yield dashboards, VFat is the calmer interface to live in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Krystal has the broadest pool coverage.&lt;/strong&gt; It lists positions across &lt;strong&gt;9 chains and 19+ DEXs&lt;/strong&gt; (Uniswap V3/V4, PancakeSwap, SushiSwap, Aerodrome, Camelot, THENA, Raydium, Thruster, Shadow, and others). That breadth is the main reason Krystal's UI looks busier — it's showing you a lot of surfaces, vaults, strategies, and chains in the same app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MaxFi is somewhere in between.&lt;/strong&gt; Roughly &lt;strong&gt;200 pools&lt;/strong&gt; across tokenized US stocks, Bitcoin, Ethereum, meme, AI-agent, altcoin, base ecosystem, stablecoin, and Robinhood meme categories — a much wider list than the docs page summary suggests, but a clean layout with a clear "Earn / Positions / Docs" navigation. The trade-off is choice vs focus: Krystal has more chains and DEXs, MaxFi has a single-chain concentration but a focused pool library.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If "I just want to manage a handful of LP positions and not think about it" is your priority, VFat and MaxFi win. If "I want every pool I can imagine on every chain, in one app" is your priority, Krystal wins.&lt;/p&gt;

&lt;h2&gt;
  
  
  Per-Operation Fees at a Glance
&lt;/h2&gt;

&lt;p&gt;What you actually pay for each action — per tool, before any market costs.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;VFat&lt;/th&gt;
&lt;th&gt;Krystal&lt;/th&gt;
&lt;th&gt;MaxFi&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deposit LP token / both tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deposit single token (with swap)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.09% of swapped slice&lt;/td&gt;
&lt;td&gt;0.05–0.25% (Zap, by pool tier)&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Withdraw&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0% / 0.09% if swap&lt;/td&gt;
&lt;td&gt;Free / tier swap fee&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Auto rebalance fee&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.01% of position (≤0.05% pool) → up to 0.05% (higher-fee pool)&lt;/td&gt;
&lt;td&gt;0.01% → up to 0.05% of position (by pool tier)&lt;/td&gt;
&lt;td&gt;Free (no swap, no position fee)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Swap on rebalance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.09% of swapped slice (VFat) + 0.01–1% DEX pool fee&lt;/td&gt;
&lt;td&gt;0.1% of volume (Krystal) + 0.01–1% DEX pool fee&lt;/td&gt;
&lt;td&gt;None — zero-swap mechanic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Manual harvest / compound&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.9% of rewards each&lt;/td&gt;
&lt;td&gt;Manual compound 0.05–0.25% by tier (of compound amount)&lt;/td&gt;
&lt;td&gt;Free (single 15% performance fee)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Auto-compound / auto-harvest&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Auto-Harvest 1.2% / Auto-Compound 1.8% of rewards&lt;/td&gt;
&lt;td&gt;2% of LP fees each&lt;/td&gt;
&lt;td&gt;Free (single 15% performance fee)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance / reward fee&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;10% of rewards (Auto-Farm Vault) / 10% default, 5% sharing (Community Vault)&lt;/td&gt;
&lt;td&gt;15% of LP earnings only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Slippage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes — depends on market&lt;/td&gt;
&lt;td&gt;Yes — depends on market&lt;/td&gt;
&lt;td&gt;None — no swap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MEV / sandwich risk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Possible on public mempool&lt;/td&gt;
&lt;td&gt;Possible on public mempool&lt;/td&gt;
&lt;td&gt;Impossible — no swap, nothing to sandwich&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three things jump out from this table:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;VFat and Krystal charge on every action.&lt;/strong&gt; Every rebalance pays a swap fee plus a platform fee plus a DEX pool fee plus (in Krystal's case) auto-compound and auto-harvest fees on the LP earnings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MaxFi has zero per-operation fees.&lt;/strong&gt; The only charge is 15% of LP earnings, paid at the end on what the position actually made.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The difference in mechanics shapes the fee profile.&lt;/strong&gt; VFat and Krystal have predictable per-event costs but crystallize impermanent loss on every swap. MaxFi's only cost scales with profit and IL is deferred, not locked in.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Fee Comparison on a $10,000 ETH/USDC Position
&lt;/h2&gt;

&lt;p&gt;Setup: &lt;strong&gt;$10,000&lt;/strong&gt; in an ETH/USDC concentrated-liquidity position, &lt;strong&gt;±15% range&lt;/strong&gt;, &lt;strong&gt;0.01% fee tier pool&lt;/strong&gt;. ETH moves &lt;strong&gt;50% up&lt;/strong&gt; or &lt;strong&gt;50% down&lt;/strong&gt; from entry. A ±15% range means each 15% move triggers a rebalance — so each scenario produces &lt;strong&gt;3 rebalances&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  VFat (≤ 0.05% fee tier pool)
&lt;/h3&gt;

&lt;p&gt;Assumes a ~$5,000 swap slice per rebalance (half the $10k position, swapped into the other token).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Per-Event Cost&lt;/th&gt;
&lt;th&gt;× 3 Rebalances&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Rebalance fee (VFat)&lt;/td&gt;
&lt;td&gt;0.01% × $10k = $1&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swap fee (VFat, 0.09% of slice)&lt;/td&gt;
&lt;td&gt;0.09% × $5k = $4.50&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$13.50&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DEX pool fee (0.01% of slice)&lt;/td&gt;
&lt;td&gt;0.01% × $5k = $0.50&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$1.50&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Structural protocol cost (predictable)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$6 / event — ~$18 over 3&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two lines below are &lt;strong&gt;not protocol fees&lt;/strong&gt; — they're market costs that depend on volatility and pool depth at the moment of the swap. Splitting them makes the actual range honest:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Market Condition&lt;/th&gt;
&lt;th&gt;Slippage (per event)&lt;/th&gt;
&lt;th&gt;MEV / sandwich (per event)&lt;/th&gt;
&lt;th&gt;× 3 Rebalances&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Calm market, deep pool&lt;/td&gt;
&lt;td&gt;0.1–0.5% ($5–$25)&lt;/td&gt;
&lt;td&gt;0.1–0.3% ($5–$15)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+$30–$120&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Normal volatility&lt;/td&gt;
&lt;td&gt;0.5–2% ($25–$100)&lt;/td&gt;
&lt;td&gt;0.2–0.5% ($10–$25)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+$105–$375&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wild move, thin pool&lt;/td&gt;
&lt;td&gt;2–5% ($100–$250)&lt;/td&gt;
&lt;td&gt;0.5–1% ($25–$50)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+$375–$900&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Realistic total over 3 rebalances: ~$125–$395&lt;/strong&gt; in normal conditions. The $775 ceiling only happens during genuinely stressed moves on a thin pool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Krystal (auto-rebalance, ≤0.05% fee tier)
&lt;/h3&gt;

&lt;p&gt;Same ~$5,000 swap slice per rebalance.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Per-Event Cost&lt;/th&gt;
&lt;th&gt;× 3 Rebalances&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Auto-rebalance fee&lt;/td&gt;
&lt;td&gt;0.01% × $10k = $1&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swap fee (Krystal, 0.1% of volume)&lt;/td&gt;
&lt;td&gt;0.1% × $5k = $5&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$15&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DEX pool fee (0.01% of slice)&lt;/td&gt;
&lt;td&gt;0.01% × $5k = $0.50&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$1.50&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Structural protocol cost (predictable)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$6.50 / event — ~$20 over 3&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same split for market costs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Market Condition&lt;/th&gt;
&lt;th&gt;Slippage (per event)&lt;/th&gt;
&lt;th&gt;MEV / sandwich (per event)&lt;/th&gt;
&lt;th&gt;× 3 Rebalances&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Calm market, deep pool&lt;/td&gt;
&lt;td&gt;0.1–0.5% ($5–$25)&lt;/td&gt;
&lt;td&gt;0.1–0.3% ($5–$15)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+$30–$120&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Normal volatility&lt;/td&gt;
&lt;td&gt;0.5–2% ($25–$100)&lt;/td&gt;
&lt;td&gt;0.2–0.5% ($10–$25)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+$105–$375&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wild move, thin pool&lt;/td&gt;
&lt;td&gt;2–5% ($100–$250)&lt;/td&gt;
&lt;td&gt;0.5–1% ($25–$50)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+$375–$900&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Plus &lt;strong&gt;4% of LP fees&lt;/strong&gt; (2% auto-compound + 2% auto-harvest) — on top of everything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Realistic total over 3 rebalances: ~$125–$395 + 4% LP earnings&lt;/strong&gt; in normal conditions. Same $775 ceiling only in stressed moves.&lt;/p&gt;

&lt;h3&gt;
  
  
  MaxFi (15% performance fee only)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Per-Event Cost&lt;/th&gt;
&lt;th&gt;× 3 Rebalances&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Rebalance&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Swap&lt;/td&gt;
&lt;td&gt;none (zero-swap)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slippage&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MEV&lt;/td&gt;
&lt;td&gt;impossible (no swap)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance fee&lt;/td&gt;
&lt;td&gt;15% of LP earnings only&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;15% × LP earnings&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Approx. total over 3 rebalances&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;15% × LP earnings, $0 structural cost&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The structural cost gap is the whole point: &lt;strong&gt;$0 vs $60 every time the range breaks&lt;/strong&gt; — before you even count slippage and MEV. MaxFi wins the cost comparison by construction, not by negotiation.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the Scenarios Play Out
&lt;/h3&gt;

&lt;p&gt;Same $10,000 ETH/USDC position, ±15% range, 0.01% pool, three rebalances each direction:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;VFat&lt;/th&gt;
&lt;th&gt;Krystal&lt;/th&gt;
&lt;th&gt;MaxFi&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;+50% rise, then back to entry&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lost 0.01% platform + ~$140–$390 in swap cost. Net: negative or break-even.&lt;/td&gt;
&lt;td&gt;Same as VFat + 4% of any LP fees. Slightly worse.&lt;/td&gt;
&lt;td&gt;15% of any LP fees earned during the round-trip. No structural cost.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;+50% rise, held to top&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sold into the rise; captured partial upside but missed the peak. Net: positive but capped.&lt;/td&gt;
&lt;td&gt;Same as VFat + 4% LP fee cut.&lt;/td&gt;
&lt;td&gt;Accumulates USDC on each range exit; captures upside. Net: positive, capped by range.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;−50% drop, then bounce back&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Crystallized IL at each dip. Recovery partial; you'll never get the full IL back. Net: negative or marginal.&lt;/td&gt;
&lt;td&gt;Same as VFat.&lt;/td&gt;
&lt;td&gt;Zero IL crystallized; AMM rebalances you during the bounce. Net: best of the three.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;−50% drop, no bounce&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Swapped ETH→USDC at each dip; preserved part of capital. Loss limited to swap costs.&lt;/td&gt;
&lt;td&gt;Same as VFat.&lt;/td&gt;
&lt;td&gt;Stayed 100% ETH through the whole drop. Took the full 50% hit. Net: worst of the three.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How to Pick
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VFat&lt;/strong&gt; — fine for low-frequency rebalancing on chains you trust. Cheap per rebalance, but you pay the swap and IL tax every time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Krystal&lt;/strong&gt; — multi-chain and feature-rich. Best if you want AI monitoring across many chains. Higher overhead than VFat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MaxFi&lt;/strong&gt; — best in mean-reverting markets; worst in sustained one-way moves. If you believe the asset is going to bounce, MaxFi wins. If you believe it's going to grind down, MaxFi bleeds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A practical rule: only use MaxFi-style zero-swap tools when you have a stop-loss plan outside the position. The tool optimizes for fees in the happy path; it doesn't protect you from a trend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Service When
&lt;/h2&gt;

&lt;p&gt;Three tools, three jobs. The right pick depends on your portfolio size, how often you can watch the position, and what kind of market you're trading.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pick by Portfolio Size
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1–3 positions.&lt;/strong&gt; You can manage these by hand. Every automation fee is a cost you can avoid by rebalancing yourself when conditions change. Manual keeps every basis point of your earnings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5–10 positions.&lt;/strong&gt; This is where automation starts to pay for itself. Watching 5–10 ranges and rebalancing each one to market takes real time every day. VFat's small per-rebalance fee is usually cheaper than the missed opportunities of doing it manually.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10+ positions.&lt;/strong&gt; Automation is no longer optional. At this scale you need Krystal's multi-chain coverage or VFat's reliability — running it all by hand becomes impossible. MaxFi makes sense too if you want to defer fees and your positions are mostly in mean-reverting pairs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pick by Time Away from Your Laptop
&lt;/h3&gt;

&lt;p&gt;The more time you expect to be offline (vacations, conferences, weeks where you're traveling), the more the automation fee becomes worth it. But the &lt;strong&gt;rebalance delay&lt;/strong&gt; you set should match both your absence and the asset class — different assets need different response times.&lt;/p&gt;

&lt;p&gt;Asset-by-asset delay rules of thumb:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tokenized US stocks (Robinhood Chain and similar).&lt;/strong&gt; Set &lt;strong&gt;72h over the weekend&lt;/strong&gt;, when the underlying stock market is closed but the on-chain AMM can drift on thin liquidity. The pool price moves even though the underlying stock hasn't — every rebalance during that drift looks like a loss, but the AMM and the stock price converge again on Monday. Shorter delays work fine during working days when both the AMM and the underlying market are active.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Meme coins.&lt;/strong&gt; Set &lt;strong&gt;~1 hour&lt;/strong&gt;. APY is high on these pools and you want to catch almost every move. Long delays here mean missing the runs that make meme LP positions pay off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Major assets (BTC, ETH, SOL).&lt;/strong&gt; Set &lt;strong&gt;~24 hours&lt;/strong&gt;. You want to avoid reacting to brief spikes; only rebalance once the market structure has clearly changed. A 24h delay filters out noise without missing real moves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short-term altcoins and low-volume pools.&lt;/strong&gt; Match the delay to the asset's volatility — typically between 1h and 24h. Pick shorter if the pool is liquid enough to absorb swaps without big slippage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Match the tool to your absence:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Days to a couple of weeks.&lt;/strong&gt; A short rebalance delay on VFat or Krystal is enough. VFat's rebalance delay is configurable from 0 to 255 minutes (just over 4 hours), so it filters out brief noise but is meant for short absences. Krystal's delay is configurable per position. The bot catches the rebalance for you while you're offline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weeks to months.&lt;/strong&gt; Look for tools with longer rebalance windows or hands-off presets. MaxFi's configurable delay (1 hour to 168 hours / 1 week) covers most trips and matches the asset-class rules above; for longer absences, VFat and Krystal both keep running unattended.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You're effectively offline full-time.&lt;/strong&gt; At this point you're paying for the service, not just the automation. VFat and Krystal both run well in fully unattended mode. MaxFi shines if you pair it with a stop-loss plan (see below).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pick by Market Expectation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Range-bound or mean-reverting market.&lt;/strong&gt; MaxFi is the best tool. Zero-swap rebalancing means you keep earning fees through the bounce-back instead of paying every step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trend day, up.&lt;/strong&gt; VFat and Krystal sell into the rise. You capture the move in slices. MaxFi accumulates USDC on each range exit — also works, but VFat/Krystal are the conventional play here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trend day, down.&lt;/strong&gt; VFat and Krystal swap ETH → USDC on each dip and protect your capital. MaxFi stays 100% ETH through the whole drop, which is the worst case for it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The MaxFi-Specific Risk You Need to Plan For
&lt;/h3&gt;

&lt;p&gt;Three things MaxFi does differently from the other two — and three things you have to set up yourself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. No stop-loss on the position itself.&lt;/strong&gt; MaxFi's automation is rebalance-only. There is no Auto-Exit equivalent to VFat's feature — you can't tell MaxFi "close this position if price drops to X." If you want a hard floor, you have to build it outside the protocol.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Rebalance delay exists to filter noise — use it for that.&lt;/strong&gt; The 0–168h delay setting is meant to wait out brief spikes before triggering a rebalance. A typical use case: tokenized US stocks on Robinhood Chain. The stock market is closed on weekends, but the on-chain pool price can drift on thin liquidity during those 72 hours. If MaxFi rebalances during the drift, the position appears out of range and looks like a loss — but the underlying stock price hasn't actually moved, the AMM has just moved around an illiquid book. &lt;strong&gt;Set a 72h delay on stock pools so the bot waits out the weekend&lt;/strong&gt; and only rebalances once Monday's trading brings the AMM and the underlying price back together. Same logic for low-volume hours on thin pools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The downside of zero-swap during a sustained drop.&lt;/strong&gt; If price drops through your range and keeps dropping, every rebalance in a zero-swap tool just slides your range lower with you. &lt;strong&gt;The position will end up 100% ETH at the bottom&lt;/strong&gt;, even if it took ten rebalances to get there. That's the danger: you don't sell anything on the way down, so if the price later bounces back, you sell your ETH back into USDC only when the price rises back into your range. &lt;strong&gt;You sell low relative to the drop, even though the trend is now reversing&lt;/strong&gt; — you sell "by a good price" relative to the bottom, but by a cheap price relative to where you started. The fee earnings you collect along the way cushion the loss, but only partially.&lt;/p&gt;

&lt;p&gt;The good scenario for MaxFi: price drops &lt;strong&gt;below&lt;/strong&gt; the range in one move, then bounces back. You accumulate 100% ETH at the lower (cheap) price, then as price recovers into your range, you sell at gradually rising prices — earning fees the whole way up and selling at a "good price" relative to the dip.&lt;/p&gt;

&lt;p&gt;That's why the only safe way to run MaxFi is &lt;strong&gt;with a stop-loss plan outside the position&lt;/strong&gt;. Here's the safer option:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set a manual exit trigger&lt;/strong&gt; (price X below range, time T since range break) and close the position by hand before further declines. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without that, MaxFi is the wrong tool for a position in a coin you expect to trend hard in either direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VFat&lt;/strong&gt; charges a small fee per rebalance and pays for it in swap costs and IL crystallization. Best when rebalances are rare.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Krystal&lt;/strong&gt; is the multi-chain option with a richer feature set and more fees layered on top of the same swap-based mechanics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MaxFi&lt;/strong&gt; wins on cost-per-rebalance (zero structural cost) and is best in mean-reverting markets. Its zero-swap rebalance is also its biggest risk in a sustained downtrend — your position rides the entire drop with no protective swap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pick by what you expect from the market. Range-bound or bounce-back? MaxFi. Trend day? VFat or Krystal with manual oversight.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Not financial advice. Fee schedules change — verify on each tool's official docs before committing capital. ETH/USDC at 0.01% tier exists on some DEXes but is less common than 0.05% — adjust assumptions if you're working with a different pool. Numbers were current at time of writing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VFat fee schedule: &lt;a href="https://docs.vfat.io/fees" rel="noopener noreferrer"&gt;docs.vfat.io/fees&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Krystal fee schedule: &lt;a href="https://docs.krystal.app/ecosystem/fees" rel="noopener noreferrer"&gt;docs.krystal.app/ecosystem/fees&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Krystal vault structure (Position / Strategy / Vault): &lt;a href="https://docs.krystal.app/products/vaults/vault-vs-strategy.md" rel="noopener noreferrer"&gt;docs/products/vaults/vault-vs-strategy.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Krystal Vault core capabilities: &lt;a href="https://docs.krystal.app/products/vaults/what-is-liquidity-vault.md" rel="noopener noreferrer"&gt;docs/products/vaults/what-is-liquidity-vault.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Krystal Auto-Farm Vault: &lt;a href="https://docs.krystal.app/products/vaults/auto-farm.md" rel="noopener noreferrer"&gt;docs/products/vaults/auto-farm.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Krystal Provide Liquidity (Add Liquidity button on Position Details): &lt;a href="https://docs.krystal.app/products/liquidity-management/lp-transactions/provide-liquidity.md" rel="noopener noreferrer"&gt;docs/products/liquidity-management/lp-transactions/provide-liquidity.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Snuggle fee schedule: &lt;a href="https://snuggle.fi/docs" rel="noopener noreferrer"&gt;snuggle.fi/docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MaxFi docs (zero-swap rebalance, presets, fees): &lt;a href="https://maxfi.tech/docs" rel="noopener noreferrer"&gt;maxfi.tech/docs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tools:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://vfat.io" rel="noopener noreferrer"&gt;VFat&lt;/a&gt; · &lt;a href="https://defi.krystal.app" rel="noopener noreferrer"&gt;Krystal&lt;/a&gt; · &lt;a href="https://maxfi.tech" rel="noopener noreferrer"&gt;MaxFi&lt;/a&gt; · &lt;a href="https://snuggle.fi" rel="noopener noreferrer"&gt;Snuggle&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>crypto</category>
      <category>bitcoin</category>
    </item>
    <item>
      <title>AI Engineer: The Role Your Company Needs</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Wed, 19 Aug 2026 07:20:00 +0000</pubDate>
      <link>https://dev.to/seredasv/ai-engineer-the-role-your-company-needs-160p</link>
      <guid>https://dev.to/seredasv/ai-engineer-the-role-your-company-needs-160p</guid>
      <description>&lt;p&gt;Companies are hiring "AI developers" to write prompts and glue models to APIs. The role they actually need is different: an engineer who treats AI as a system to be designed, measured, and controlled — not a magic box to be prompted. This role barely exists on the market, which means the companies that hire for it first win.&lt;/p&gt;

&lt;p&gt;Walk into any company building an AI project and you'll find one of two people in charge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The prompt engineer. Crafts elegant prompts, demos beautifully, and produces agents that work in the meeting room and fall apart with real customers.&lt;/li&gt;
&lt;li&gt;The traditional developer. Builds robust software, tests everything, and treats the AI as an awkward API call — underusing what models can actually do.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are half the answer. The whole answer is a new role that combines them: the AI engineer. And almost nobody is hiring for it — which is exactly why it's the most valuable role in software right now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What an AI Engineer Actually Does&lt;/strong&gt;&lt;br&gt;
The AI engineer builds the layer around the model — everything that isn't the prompt. Concretely, their day looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Context engineering. Designing what the model sees, in what structure, at what moment. Not just writing prompts, but building the pipeline: what data gets loaded, how it's organized, how retrieval finds the right documents. They treat context like code — versioned, reviewed, tested.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tool and agent architecture. Deciding what the agent can do, not just what it can say: which tools, what schemas, how the loop handles errors, where humans step in. They design autonomy the way architects design access — deliberately, with boundaries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Evaluation. Building the test sets and scoring systems that make the agent measurable. They can answer "did this week's change improve things?" with numbers, not feelings. This is the skill that separates AI as a gamble from AI as an engineering discipline.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Production thinking. Observability, tracing, cost control, guardrails, security. They build agents that survive real users, real data, and real failures — not just demos.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Domain translation. The part you can't teach in a bootcamp: understanding the business deeply enough to encode its rules — the unwritten policies, the data relationships, the edge cases — into something the model can use. The best AI engineers are half engineer, half chief operating officer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;How to Find the Right Person (and Be the Right Person)&lt;/strong&gt;&lt;br&gt;
If you're hiring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Don't hire for prompt skills. Hire for engineering discipline plus evidence of AI production experience — eval sets, traces, guardrails, shipped failures and fixes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ask for the boring work: "Show me your test set. How do you score it? What did you learn from the last regression?" A candidate who can't show evaluation cannot own an agent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Look for the hybrid: someone technical enough to build, curious enough to learn your business, and humble enough to measure.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If you're building this career:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The market is wide open, and the demand is guaranteed — every company running an agent in production will need this role.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build the proof: ship an agent, maintain it, measure it, write about what you learned. Show eval scores going up over time. That's a portfolio no course can fake.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Bottom Line&lt;/strong&gt;&lt;br&gt;
Almost every company needs an AI engineer right now. Almost none know it yet. The ones who hire first win the next decade of software.&lt;/p&gt;

&lt;p&gt;The prompt era is ending. Any AI can be prompted; the ones that deliver are designed. The person who designs them — who understands the business deeply enough to encode it, and the engineering deeply enough to make it reliable — is the role that will define software for the next ten years.&lt;/p&gt;

&lt;p&gt;Your company can keep hiring prompt writers. Or it can hire the people who build the actual product.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>hr</category>
      <category>software</category>
    </item>
    <item>
      <title>Grid Bot vs Concentrated Liquidity Pool Comparison | Real Test Results</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Tue, 18 Aug 2026 22:02:30 +0000</pubDate>
      <link>https://dev.to/seredasv/grid-bot-vs-concentrated-liquidity-pool-comparison-real-test-results-4jhi</link>
      <guid>https://dev.to/seredasv/grid-bot-vs-concentrated-liquidity-pool-comparison-real-test-results-4jhi</guid>
      <description>&lt;p&gt;&lt;em&gt;I ran two strategies on the same price range: a grid trading bot on Pionex and a liquidity pool position on VFat (CL10, WETH/USDC on Base). Same range, -15% / +5% (1630–2000). Same idea: earn while the price stays in this area. The results were not close.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I wanted to know what actually works better in my case — so I set up both. Same pair, same range, same time period. Here's what I got:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Grid bot (Pionex): &lt;strong&gt;11.83% APY&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;LP position (VFat CL10, WETH/USDC on Base): &lt;strong&gt;21.63% APY&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Almost twice the return. Same range. Here's why.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Grid Bot Earns
&lt;/h2&gt;

&lt;p&gt;A grid bot splits the range into steps. It puts buy orders below the price and sell orders above it. Every time the price crosses a step and completes a cycle (buy low, sell high), you make money — in my case 0.10% per trigger.&lt;/p&gt;

&lt;p&gt;The catch: the bot only earns when the price actually crosses the steps. If the price stays flat, the bot does nothing. If it drifts slowly, you earn only when a step gets touched — not for the time in between.&lt;/p&gt;

&lt;p&gt;There's also a cost side. The 0.10% per trigger is what I keep &lt;strong&gt;after&lt;/strong&gt; fees. Each side of the trade costs 0.05%, so one full round costs 0.10%. That means the price has to move 0.20% per step just so I keep 0.10% net. Fees take as much as the bot earns.&lt;/p&gt;

&lt;p&gt;Grid bots earn from price crossings. They don't care about trading volume. If lots of trades happen between your steps, the bot earns nothing from them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the LP Position Earns
&lt;/h2&gt;

&lt;p&gt;An LP position in the WETH/USDC pool earns fees from every trade that happens while the price is inside your range — not just when the price crosses your levels. You lock in 1630–2000, and every swap in that zone pays you a share of the fees.&lt;/p&gt;

&lt;p&gt;Simply put:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Grid bot&lt;/strong&gt; earns only on triggers — small, fixed amounts, only when the price moves across levels. And each round costs you exchange fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LP position&lt;/strong&gt; earns from all the trading volume in your range — all the time. Instead of paying fees, you &lt;strong&gt;collect a fee from every swap&lt;/strong&gt; that happens in your range.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On top of that, some DeFi protocols pay you &lt;strong&gt;extra tokens or points&lt;/strong&gt; on top of the fees. Those points can be converted into real tokens later. It's a second income stream on the same position — one that a grid bot never gives you.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;Same range, same pair, same period:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Grid bot (Pionex), 0.1% per trigger: 11.83% APY&lt;/li&gt;
&lt;li&gt;LP (VFat CL10, WETH/USDC, Base): 21.63% APY&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The grid bot needed the price to cross its steps many times to collect small slices. The LP position earned the whole time the price stayed in range — every swap in the zone paid it.&lt;/p&gt;

&lt;p&gt;That's the main reason for the gap: the grid bot is paid per crossing, the LP position is paid per swap. In a range with steady volume, there are far more swaps than crossings.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the Grid Bot Wins
&lt;/h2&gt;

&lt;p&gt;I'm not saying grid bots are useless. They can be better in some cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Big, fast swings.&lt;/strong&gt; If the price bounces hard across the range, trigger-based earning works well.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You want the profit in your pocket right away.&lt;/strong&gt; Each grid cycle is a closed, real gain. LP fees stay in the position until you take them out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low volume.&lt;/strong&gt; If nobody trades in your range, an LP position earns almost nothing. A grid bot can still capture the swings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LP has risks too: impermanent loss if the price leaves the range hard, and it only earns while it's in range.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned — and What I Do Now
&lt;/h2&gt;

&lt;p&gt;For my case, the answer is clear: LP is better for me. If the range holds and volume is normal, LP earns much more than a grid bot.&lt;/p&gt;

&lt;p&gt;And there's more you can do on top. Even a spot position (just holding ETH) can earn more with the right moves. If the price drops below the bottom of your range:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use lending/borrowing to borrow stablecoins against your position — no need to sell anything.&lt;/li&gt;
&lt;li&gt;Use the borrowed stablecoin to open a new LP position with a new, lower range.&lt;/li&gt;
&lt;li&gt;You restart the pool and keep earning in the new zone, instead of sitting out of range and earning nothing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the downside of LP — "what if the price falls below the range?" — has a workaround: borrow, reposition, keep earning.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;For range-bound markets with normal volume — the exact situation most people set up grid bots for — LP wins, and it's not close. The grid bot is paid only when the price crosses your steps. The LP position is paid for every swap in your range, the whole time it's in range.&lt;/p&gt;

&lt;p&gt;In my test: 11.83% vs 21.63% on the same 1630–2000 range. Same pair, same idea — almost twice the return.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;One test on one range, not financial advice. Results depend on volume, volatility, and how long the price stays in range — but the mechanics behind the gap are structural, not luck.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>cryptocurrency</category>
      <category>crypto</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Demo vs Product: Why AI Fails in Production</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Mon, 17 Aug 2026 07:51:17 +0000</pubDate>
      <link>https://dev.to/seredasv/demo-vs-product-why-ai-fails-in-production-582m</link>
      <guid>https://dev.to/seredasv/demo-vs-product-why-ai-fails-in-production-582m</guid>
      <description>&lt;p&gt;Every AI demo works. That's the trap. The gap between a demo that wows your leadership and a product that survives real customers isn't the model — it's everything you didn't think about until the demo was over.&lt;/p&gt;

&lt;p&gt;I've watched this cycle repeat in companies of every size:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Month 1. Someone builds a stunning demo. The AI answers questions flawlessly. Leadership is excited. The project is approved.&lt;/li&gt;
&lt;li&gt;Month 4. The "product" is struggling. Wrong answers. Confusing edge cases. Slow. The team blames the model. Leadership starts doubting the whole thing.&lt;/li&gt;
&lt;li&gt;Month 6. The project is quietly shelved. Everyone concludes: "AI doesn't work for us."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the uncomfortable truth: the demo worked. The model didn't get worse. The environment changed. The demo ran in a perfect world. The product runs in yours.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What a Demo Actually Tests&lt;/strong&gt;&lt;br&gt;
Demos are great at showing what a model can do. They're terrible at showing what a model will do. Here's the difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The data. The demo runs on clean, formatted documents. The product runs on PDFs scanned in 2011 and spreadsheets with dead columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The systems. The demo touches no other system. The product has to talk to CRM, ERP, tickets, and emails — all speaking different dialects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The user. The demo has one patient, polite user. The product has hundreds, typing in shortcuts and typos.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The question. The demo asks "It works!" The product asks "Why did it answer this way?"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model is the same in both columns. The context is not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Five Killers of AI Products&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Business rules. Your company runs on unwritten rules: discounts apply only to certain tiers, refunds have deadlines, approvals have thresholds. Nobody wrote them down because everyone knows them. The model doesn't. In the demo, the rules didn't come up. In production, they come up every hour.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Messy reality. Demo data is curated. Production data is your data: three naming conventions for the same product, statuses that mean different things in different systems, documents that contradict each other. The model faithfully reproduces the confusion of the source.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security and access. In the demo, the AI sees everything. In production, you discover that your AI answering questions must know who's asking — and what they're allowed to know. Access rights aren't a feature; they're a lawsuit waiting to happen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integration. In the demo, the AI sits alone. In production, it must read from your systems and write back — and your systems were built before AI existed, with APIs that don't always play nice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Real users. In the demo, the question was "What's the refund policy?" In production, it's "where's my refund??" Real users don't ask like documentation reads. And they ask at 2 AM, in three languages, about products that don't exist yet.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Demo-to-Product Bridge&lt;/strong&gt;&lt;br&gt;
None of this means the demo lied. It means the demo showed the model's best moment (the ceiling) — while the product must survive the worst conditions, where all the real-world problems live. The bridge between them is engineering, and it looks like this:&lt;/p&gt;

&lt;p&gt;Write the rules down. Before launch, collect the business rules that live in your experts' heads. This is the highest-value work in the whole project — and it's not glamorous. It's documentation.&lt;/p&gt;

&lt;p&gt;Test with real data, not curated data. From day one, run the model against your actual documents and real questions from your support logs. The first bad answers are the map of what you need to fix.&lt;/p&gt;

&lt;p&gt;Design the guardrails first. Who is the AI allowed to answer? What does it do when it's not sure? Where does a human step in? Decide these before launch, not after the first complaint.&lt;/p&gt;

&lt;p&gt;Plan the integration like a normal software project. Because that's what it is. The AI is one component of a system — with the same needs as any other component: access, monitoring, errors, fallbacks.&lt;/p&gt;

&lt;p&gt;Expect iteration. The first version will be wrong in ways you can't predict. That's normal software development. The teams that succeed are the ones who built a feedback loop — measure, fix, release — instead of expecting the demo to be the product.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Takeaway&lt;/strong&gt;&lt;br&gt;
A demo proves the model can do the task. Only the product proves you can deliver it to real users, every day, at scale.&lt;/p&gt;

&lt;p&gt;The companies that succeed with AI don't skip the boring work. They understand that the model is the easy 20%. The hard 80% is everything around it: rules, data quality, security, integration, users — and the discipline to measure and iterate.&lt;/p&gt;

&lt;p&gt;The demo was real. The model didn't fail. Your business context — documented, connected, and controlled — is the missing half of the product. That part has no demo. It has to be built.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>software</category>
      <category>softwareengineering</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Your AI Doesn’t Know Your Company</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Fri, 14 Aug 2026 19:50:01 +0000</pubDate>
      <link>https://dev.to/seredasv/your-ai-doesnt-know-your-company-7da</link>
      <guid>https://dev.to/seredasv/your-ai-doesnt-know-your-company-7da</guid>
      <description>&lt;p&gt;Here’s the most misunderstood thing about AI agents: they don’t remember anything. Your model doesn’t know your business, your products, or your customers. It reconstructs them from scratch — every single time you ask it something.&lt;/p&gt;

&lt;p&gt;Most companies treat AI agents like a brilliant new employee: hire it, hand it the keys to the data, and it just knows everything, right?&lt;/p&gt;

&lt;p&gt;Wrong. It’s closer to this: every morning, a new temporary consultant walks in, knows nothing about you, and you have exactly one chance to brief them before they answer questions all day. Tomorrow, a different consultant with no memory of yesterday shows up. That’s how an AI model works.&lt;/p&gt;

&lt;p&gt;It doesn’t have a brain that remembers your company. It only has short-term memory — and it builds your world again from whatever you put in front of it, with every single request.&lt;/p&gt;

&lt;p&gt;This one fact explains most AI failures in business. And it also shows exactly how to fix them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Model Is a Consultant With Amnesia&lt;/strong&gt;&lt;br&gt;
When your team asks the AI “how does our refund process work?”, the model doesn’t remember the refund policy from some internal memory. It takes the documents you loaded into the conversation, the instructions you wrote, and puts together its best guess of your refund process — from scratch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three consequences follow:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you didn’t give it the policy, it will invent one. Not because it’s trying to trick you — because it has to give an answer. When your documents have gaps, the model fills them with whatever sounds believable. That’s what “hallucination” really is: the model guessing when it doesn’t have enough information.&lt;/li&gt;
&lt;li&gt;If your documents are messy, the model’s understanding is messy. Your data lives in PDFs, spreadsheets, CRM records, emails — in different formats, different languages, different decades. The model sees what it’s given. Conflicting versions of the truth? It will happily repeat both, in the same answer.&lt;/li&gt;
&lt;li&gt;If you change nothing, nothing changes. The model has no memory of yesterday’s answers. Improve your briefing today, and today is better. Stop, and it snaps back to baseline. There is no “learning on the job” — only better briefing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;What This Means for Your Business&lt;/strong&gt;&lt;br&gt;
This isn’t a weakness to be afraid of. It’s actually a design that works in your favor: you are in total control of what the model knows, at every moment.&lt;/p&gt;

&lt;p&gt;That control is a process, and it looks a lot like onboarding a new employee — except you do it every day:&lt;/p&gt;

&lt;p&gt;Write the company briefing once. A single main document: who you are, what you sell, how your processes work, what your terms mean, and what the model must never do. One source of truth. This is the most valuable piece of work in any AI project — and almost nobody has it.&lt;/p&gt;

&lt;p&gt;Explain the data before feeding it. Before you load documents, write down what they are and how they connect. An invoice file without explanation is just text. With explanation — “these are invoices; number format is INV-YYYY-XXXXX; totals are before VAT” — it becomes knowledge.&lt;/p&gt;

&lt;p&gt;Keep the briefing up to date. Products change. Processes change. Policies change. Update the briefing, and the model updates instantly. That’s the one advantage a model has over an employee — no retraining, no culture change, just better documentation.&lt;/p&gt;

&lt;p&gt;Test with real questions. Before launch, ask the model the 20 questions your customers actually ask. Where it fails, the failure is a map of your documentation gaps. Fix the briefing, not the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Takeaway&lt;/strong&gt;&lt;br&gt;
Stop expecting the model to “know” your company. It can’t — and it will never pretend not to, either.&lt;/p&gt;

&lt;p&gt;The model’s knowledge of your business is exactly equal to the quality of the context you give it.&lt;/p&gt;

&lt;p&gt;The companies that get AI right are not the ones with the most data. They’re the ones who treat context as a product: carefully written, structured, versioned, and maintained — like the best employee onboarding manual ever written.&lt;/p&gt;

&lt;p&gt;Because in the end, that’s all the model is asking for: a briefing good enough to do the job.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Feed Your AI Agents Clean Data</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Tue, 11 Aug 2026 07:40:40 +0000</pubDate>
      <link>https://dev.to/seredasv/feed-your-ai-agents-clean-data-50ii</link>
      <guid>https://dev.to/seredasv/feed-your-ai-agents-clean-data-50ii</guid>
      <description>&lt;p&gt;Most AI projects run into the same problem: a capable model, a motivated team, and a data set that has accumulated for years without cleanup. The wrong answers usually don't come from the model — they come from the data fed into it.&lt;/p&gt;

&lt;p&gt;Teams often assume the fix is "a better model." It almost never is. The model is rarely the problem — the data it receives is.&lt;/p&gt;

&lt;p&gt;Here's a rule that's hard to accept but always holds: AI doesn't fix your data. It repeats it. If documents contradict each other, the AI will surface both. If information is outdated, the AI quotes the outdated version. If a file is unreadable, the AI literally cannot process it.&lt;/p&gt;

&lt;p&gt;The model is only as good as the data you give it. And most organizations' document collections contain significant noise and duplication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Data Quality Issues&lt;/strong&gt;&lt;br&gt;
Common patterns in enterprise document stores:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Duplicates. Identical or near-identical files saved in multiple locations with different names.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Near-duplicates. Versioned documents ("Draft", "Final", "v2", "Final_Final") that are 90% the same but treated as separate records.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Outdated content. Documents from years ago still sitting in active knowledge bases, referencing prices, policies, or products that no longer exist.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Contradictions. Different departments maintaining different versions of the same rule, with no central authority.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unreadable files. Scanned PDFs, images, handwritten notes — files without a text layer the model can access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Broken structure. Text cells where the schema expects numbers, null values in fields that can't be empty, rows that don't match their headers. Human eyes scroll past this; a machine parsing the file fails or silently misreads it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mixed formats. One column carrying several formats — dates as "01/02/2024" and "2 January 2024", amounts as "1000" and "1,000.00". Every downstream query becomes a guess about what the value actually means.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Missing context. Files in multiple languages, full of internal abbreviations, with no dates, owners, or metadata.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this flows straight into the AI. The results reflect the input quality.&lt;/p&gt;

&lt;p&gt;Feeding the model more data doesn't make it smarter. Feeding it cleaner, more specific data does. Everything else is noise in, noise out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Answer Is a Pipeline, Not a One-Time Cleanup&lt;/strong&gt;&lt;br&gt;
A single cleanup effort isn't enough — new documents arrive constantly. What you need is a pipeline: a repeatable process every piece of data passes through before the AI sees it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Centralize collection. Shared drives, archives, CRM, email — bring everything to one place. You can't fix what you can't see.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make everything readable. Run OCR on scanned PDFs, extract text from images, handle multiple languages. If the AI can't read a page, that page effectively doesn't exist.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normalize formats. One date format, one currency format, one product naming convention. Inconsistent records must resolve to the same canonical representation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deduplicate in two passes. First, exact duplicates via content hashing. Second, near-duplicates by semantic similarity — using embeddings (numerical representations of document meaning) and k-nearest neighbors (search for documents with similar embeddings). This catches "Final" vs "Final_v2" style variants. These become a single record with version history, not multiple files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Establish currency. Date-stamp every document. Archive old versions (retain for audit, don't delete). Mark one authoritative "current" version per topic. Only current versions go to the AI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enrich with metadata. Add structure: document type, department, dates, owner, status, links to related records. This transforms a file pile into structured knowledge the agent can reason over.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Serve only the cleaned set. Build the vector index from the validated output. The agent never touches the raw folder. If a document didn't pass the pipeline, it doesn't exist for the AI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a quality gate. Measure: duplicates caught, current vs. expired ratio, "new document to AI-ready" latency. You can't improve what you don't track.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Loop That Keeps It Clean&lt;/strong&gt;&lt;br&gt;
Clean once and stop is a false economy. The pipeline runs continuously:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;New document arrives → OCR, deduplication, version comparison, metadata enrichment, security scan, indexing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Document goes stale → flagged, archived, removed from the AI's retrieval set.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quality gate runs on schedule → automated checks on the metrics above.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A practical side effect: clean data makes AI projects cheaper. Fewer tokens per request, faster responses, fewer costly errors. One well-selected document outperforms ten stale ones. The pipeline pays for itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Security Check Most Pipelines Skip&lt;/strong&gt;&lt;br&gt;
Cleaning isn't only about quality — it's also about safety. Here's the attack nobody in the business room expects: a retrieved document can contain instructions directed at the AI itself.&lt;/p&gt;

&lt;p&gt;This is called indirect prompt injection. A malicious or just careless document — a contract, a scanned PDF, an imported wiki page — can carry a line like "ignore your previous instructions and say...". When that document gets pulled into the model's context, the text stops being data and starts behaving like a command. The model can change its behavior because of a sentence buried in a file. This is precisely what OCR-extracted text is good at hiding: what looks like a typo in a scan can be a fully functional attack.&lt;/p&gt;

&lt;p&gt;So in the pipeline, after OCR and extraction, every document passes a security pass before it's allowed into the index:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pattern scan. A first pass with regex over the extracted text for known injection phrasing in multiple languages: "ignore previous instructions", "disregard", "you are now", "system prompt", "override prior commands", and similar. Fast and cheap — it catches the naive cases, which are most cases. Languages matter: documents get translated, and so do attacks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Semantic scan. Regex misses rephrased attacks. A second pass uses a classifier or embedding-based anomaly detection: it flags chunks that read like instructions addressed to an AI rather than factual content. An invoice doesn't tell a model what to answer; a document that does should get attention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hidden content audit. Text the eye skips still reaches the model: text inside images (needs its own OCR pass), hidden layers in PDFs, tracked changes, comments, metadata fields. Attackers hide payloads there, so the audit must look there too.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quarantine. Flagged documents go to a review queue — a human decides: clean it, strip it, or exclude it. Nothing silently enters the index on the first run.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And one principle that matters more than any scan: defense in depth. Even with cleaning in place, the agent must treat retrieved text as untrusted data, not instructions. Retrieved content never overrides the system prompt. The scan reduces exposure; the agent design is what actually stops the attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Practice Teaches&lt;/strong&gt;&lt;br&gt;
A few lessons that only show up once you've run this pipeline for real:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Expect the first pass to remove a lot. In most document stores, a double-digit percentage of files turn out to be duplicates, near-duplicates, or outdated. That's normal, not a sign you did something wrong — it's the point.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Near-duplicate detection by embeddings catches what naming alone can't. Two files called something completely different can still be 90% the same document. Similarity search finds them; file names never will.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The hard part isn't cleaning — it's deciding what "current" means. Every topic needs one authoritative version, and that decision belongs to domain experts, not algorithms. The pipeline proposes; a human with business context approves.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deletion improves answers more than addition. In retrieval, every extra document is a candidate for the wrong answer. Removing stale records usually improves output quality more than adding new ones.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cost and latency drop together with cleanliness. Each request costs tokens proportional to what's indexed; a smaller, validated set means cheaper and faster answers without losing quality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automate in stages. Let the pipeline archive and merge for a few weeks while you review its decisions. Once it's consistently right, switch to full automation — but keep quality metrics on.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Production-Grade Example: Databricks&lt;br&gt;
If you want this as a managed system rather than a custom build, platforms like Databricks implement the full pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ingestion and OCR at scale. Millions of files, distributed OCR — what used to be a months-long manual project becomes a scheduled job.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normalization, deduplication, and near-duplicates. Spark runs the embedding pipeline; vector search for k-nearest neighbors is built in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Models without the plumbing. Serve open models hosted by Databricks — cached weights, optimized inference, pay-per-token (embeddings like GTE-Large included) — or connect external providers like OpenAI, Anthropic, or Bedrock through one governed endpoint: credentials in a single place, rate limits and usage tracking applied centrally. No separate infrastructure to run or maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Metadata and governance (Unity Catalog). Document versions, access controls, full audit trails — so cleaning never accidentally exposes protected data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One platform for the entire stack. Cleaning, embeddings, vector indexes, and retrieval in one place, not a chain of disconnected tools.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't a vendor endorsement. It's an illustration of what mature data engineering looks like: a governed, scalable system instead of a script that breaks at month three. The pipeline logic matters more than the platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Takeaway&lt;/strong&gt;&lt;br&gt;
Before considering a larger model, more hires, or new AI initiatives: look at your data.&lt;/p&gt;

&lt;p&gt;You don't need a bigger model. You need cleaner data.&lt;/p&gt;

&lt;p&gt;A strong model on clean data beats a perfect model on raw, unprocessed data. Every time. The reason most AI projects underdeliver isn't the AI — it's unreliable input: duplicated, outdated, unreadable, and fed straight into the engine.&lt;/p&gt;

&lt;p&gt;Clean the data. The model handles the rest.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>software</category>
      <category>machinelearning</category>
      <category>dataengineering</category>
    </item>
    <item>
      <title>Context Is the New Code</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Mon, 10 Aug 2026 07:46:29 +0000</pubDate>
      <link>https://dev.to/seredasv/context-is-the-new-code-330g</link>
      <guid>https://dev.to/seredasv/context-is-the-new-code-330g</guid>
      <description>&lt;p&gt;Many years, the bottleneck in software was writing code. AI just moved the bottleneck. It's no longer "can we build it?" — it's "what context do we give the model?" The companies that win with AI aren't the ones with the biggest models or much more data. They're the ones with the best context.&lt;/p&gt;

&lt;p&gt;Here's the shift nobody talks about: AI can already write code, analyze documents, and answer questions faster than any human team. And yet, most AI projects don't deliver 10x results. Why?&lt;/p&gt;

&lt;p&gt;Because the hard part moved. It used to be creating the solution. Now it's describing it — completely, precisely, and in a way the model can actually use.&lt;/p&gt;

&lt;p&gt;That description is called context. And context engineering is the new core skill of the AI era.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is Context, Really?&lt;/strong&gt;&lt;br&gt;
Context is everything you give the model at the moment it answers: documents, instructions, data, examples. It's the model's working memory — the only memory it has.&lt;/p&gt;

&lt;p&gt;Think of it as the brief you hand a consultant before a meeting. The consultant is brilliant — but brilliant is useless without the right brief.&lt;/p&gt;

&lt;p&gt;Here's what most companies get wrong: they confuse more context with better context. They stuff the model with every document they own, and the answers get worse. Why?&lt;/p&gt;

&lt;p&gt;Everything in context competes for the model's attention. Give it 500 pages, and your key instruction will drown among them. The model doesn't know which of your 200 documents matter for this particular question — so it blends them all into one average, mediocre answer.&lt;/p&gt;

&lt;p&gt;A brilliant consultant with a warehouse of unsorted paperwork is slower and more confused than one with three well-chosen documents and a clear goal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Big Window Illusion&lt;/strong&gt;&lt;br&gt;
"Don't worry," the sales pitch says, "our model has a huge context window — you can feed it everything!"&lt;/p&gt;

&lt;p&gt;Resist this. A bigger window doesn't solve the problem — it amplifies it. More noise in, more confusion out. The answer to "my AI gives bad answers" is not "give it more stuff." It's almost always "give it the right stuff, at the right moment."&lt;/p&gt;

&lt;p&gt;This is where retrieval changes everything: instead of loading your whole library, the system finds the right three documents for each question and loads only those. Your AI becomes not a consultant buried in paperwork, but a consultant who knows exactly which shelf to pull from.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Build Better Context (Without Being Technical)&lt;/strong&gt;&lt;br&gt;
You don't need to write code to improve context. You need to write — clearly.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create the company briefing. One page: what you do, what your products are, what your terms mean, what the model must never do. This single document improves every AI interaction you have, forever.&lt;/li&gt;
&lt;li&gt;Describe data before feeding it. Every dataset you load gets an explanation: what it is, what its fields mean, how it connects to other data. Raw files are material. Explained files are knowledge.&lt;/li&gt;
&lt;li&gt;Show examples instead of abstractions. "Answer like these three examples" beats "be professional and helpful" a hundred times over. The model learns patterns from examples, not adjectives.&lt;/li&gt;
&lt;li&gt;Delete more than you add. When an answer is wrong, ask: what should the model not have seen? Usually, the fix is less context, not more.&lt;/li&gt;
&lt;li&gt;Maintain it like code. Context is not set-and-forget. Products change, policies change, customers change. Version it, review it, update it — like you would any critical document.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The New Economics of Software&lt;/strong&gt;&lt;br&gt;
For decades, the economics of software were simple: more developers, more features, more cost. AI flips the equation: the marginal cost of building approaches zero. What becomes expensive is specifying — explaining your business to the model well enough to get great results.&lt;/p&gt;

&lt;p&gt;And this is good news for the companies that accept it. The skill that used to matter — writing code — is getting cheaper every year. The skill that matters now — understanding your business and explaining it clearly — is becoming your biggest advantage.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Code is no longer the bottleneck. Good context is.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The winners won't be the companies with the most data or the biggest budgets. They'll be the ones who learn to brief their AI like a top consultant: precise, structured, and always up to date.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>software</category>
      <category>machinelearning</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Stop Feeding Your AI. Start Teaching It</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Fri, 07 Aug 2026 20:46:32 +0000</pubDate>
      <link>https://dev.to/seredasv/stop-feeding-your-ai-start-teaching-it-37b1</link>
      <guid>https://dev.to/seredasv/stop-feeding-your-ai-start-teaching-it-37b1</guid>
      <description>&lt;p&gt;Why the most common mistake I see in AI projects is treating the model like a storage box — and why the human brain is the best user manual we have.&lt;/p&gt;

&lt;p&gt;Across finance, e-commerce, and logistics, I keep watching the same mistake play out: when an AI agent underperforms, teams reach for one lever — more data. "Feed it everything we have," they say. The files pile up, and the answers get worse. Not because there's too little data, but because there's too little understanding.&lt;/p&gt;

&lt;p&gt;More data doesn't fix a model that doesn't know what the data is, how it connects, and what to do with it. Fixing that requires the same thing you'd give a new employee: a proper onboarding.&lt;/p&gt;

&lt;p&gt;Here's the uncomfortable truth: most teams treat AI models like storage boxes, but AI models work more like human brains. And once you understand that, everything changes — how you structure data, how you write prompts, how you evaluate results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why the Brain Analogy Is the Right One&lt;/strong&gt;&lt;br&gt;
An AI model is the closest thing we have to a simplified human brain — and the parallel runs deeper than "it's made of neurons."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Weights = Long-Term Memory&lt;/strong&gt;&lt;br&gt;
Training adjusts billions of parameters — "weights." This mirrors how a brain consolidates knowledge: you don't memorize each experience, you extract patterns and store them as connections. The model doesn't know your specific invoices; it knows how invoices generally look.&lt;/p&gt;

&lt;p&gt;This is why training data quality matters more than volume. You are not teaching the model facts. You are teaching it patterns. A child who learns math through fifty thousand random problems gets less value than one who learns ten well-structured problems with explanations of why the solution works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context Window = Working Memory&lt;/strong&gt;&lt;br&gt;
The context window is your model's working memory — the sticky notes on a person's desk, the brief you hand a consultant before a meeting.&lt;/p&gt;

&lt;p&gt;You only have so much room. And everything you put in there competes for the model's attention. Put 500 pages of irrelevant documentation into a small window, and the model will literally lose your instructions — the same way a person forgets the task when you bury it under paperwork.&lt;/p&gt;

&lt;p&gt;The message is brutal and liberating: what you leave out of context is as important as what you put in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Prompt = The Briefing&lt;/strong&gt;&lt;br&gt;
A prompt isn't a "query." A prompt is a briefing. Would you hand a senior analyst a folder of data and no instructions and expect a great report? No. You'd tell them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Who they are (role)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Who the reader is (audience)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What the goal is (outcome)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What constraints apply (format, tone, boundaries)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to handle edge cases&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's exactly what a system prompt does. A model with a well-written system prompt and mediocre data will outperform a model with perfect data and no instructions — every single time.&lt;/p&gt;

&lt;p&gt;Few-Shot Examples = Showing, Not Just Telling&lt;br&gt;
Anyone who has trained a junior employee knows the fastest way to teach isn't explaining — it's showing. "Here are three examples of how we wrote this report. Now do the fourth."&lt;/p&gt;

&lt;p&gt;This is few-shot prompting, and it works on models exactly the way apprenticeship works on humans. The model doesn't just learn the rule; it learns the pattern of the rule applied — the tone, the structure, the level of detail.&lt;/p&gt;

&lt;p&gt;RAG = The Reference Library&lt;br&gt;
Retrieval-Augmented Generation — the model fetching relevant documents on demand — is the reference shelf next to a consultant's desk. The consultant doesn't memorize the shelf. They know it exists, they know how to search it, and they know when to consult it and when to answer from experience.&lt;/p&gt;

&lt;p&gt;A consultant who re-reads the entire library before answering every question is terrible. So is a model that has your whole corpus stuffed in context. Retrieval is about finding the right three documents, not dumping all three thousand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where the Analogy Breaks (Say This, It Makes You Credible)&lt;/strong&gt;&lt;br&gt;
The brain analogy is a lens, not a law. Three honest differences make you sound like you know what you're talking about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;No persistent identity. A model has no memory of your previous conversation unless you rebuild it. Every session is a fresh hire with the same training — you must re-onboard it every time. Work with it: keep a canonical system prompt, keep structure in one place, rebuild context deliberately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No true understanding. The model predicts tokens; it doesn't "know" the meaning of what it says. It cannot tell you what it doesn't know — it will confidently fabricate (that's "hallucination"). A person who didn't know an answer would say "I don't know." A model says it only if you teach it to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No causal reasoning by default. Humans infer cause and effect instantly. Models pattern-match. If your data implies a false correlation, the model will faithfully reproduce it.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The expert isn't the person who oversells the metaphor. The expert says: here's the analogy that explains 80% of what you need, and here's the 20% where it breaks. That's how you build trust — and trust turns readers into clients.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Playbook: Teach, Don't Feed&lt;/strong&gt;&lt;br&gt;
Here's the sequence we can use with every client. Five steps — none of them is "add more data."&lt;/p&gt;

&lt;p&gt;Step 1. Define the job, not the data. Before touching a document, answer: what should this agent do? What does a great answer look like? If you can't describe the job in two sentences, you can't teach it.&lt;/p&gt;

&lt;p&gt;Step 2. Map the schema. Every domain has structure: invoices have line items, orders have statuses, tickets have priorities. Write down the entities, their fields, and — critically — how they relate. The model doesn't know what your invoice numbers mean. Explain it.&lt;/p&gt;

&lt;p&gt;Step 3. Teach the relationships, not the raw files. Your data lives in silos: CRM, ERP, support tickets. The model doesn't see that a ticket belongs to an order that belongs to a customer. You must build that graph — explicitly — in the context you give it. This is the single most underrated step in AI engineering. Clients ask for "more data" when what they actually need is "the same data, connected."&lt;/p&gt;

&lt;p&gt;Step 4. Show examples, set constraints. Three excellent worked examples beat thirty mediocre ones. Write the boundaries: what the agent must never do, what it must always do, how it says "I don't know."&lt;/p&gt;

&lt;p&gt;Step 5. Evaluate, then iterate — on structure, not volume. Build a test set of 50 real cases. Score answers. When it fails, ask: is the data there? Is the instruction clear? Is the retrieval finding the right document? In my experience, 90% of failures are structure problems, not data problems. But almost every client starts by adding data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Want You to Remember&lt;/strong&gt;&lt;br&gt;
If you take one idea from this article, take this:&lt;/p&gt;

&lt;p&gt;A model with great data and no instructions is a genius who doesn't know what you want. A model with great instructions is an expert who delivers.&lt;/p&gt;

&lt;p&gt;Every time a client says "let's add more data," what they usually mean is "let's get a better result." And the path to a better result runs through understanding — what the data is, how it connects, and what you want the model to do with it.&lt;/p&gt;

&lt;p&gt;Treat your AI like a person. Onboard it. Explain the context. Show examples. Set boundaries. And don't drown it in paperwork — you wouldn't do that to a great employee. You'd help them focus.&lt;/p&gt;

&lt;p&gt;Your model will thank you. More importantly, your results will.&lt;/p&gt;

&lt;p&gt;If you're building an AI agent and it's not performing, I'd bet the problem isn't the model — it's the structure around it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>architecture</category>
      <category>software</category>
    </item>
    <item>
      <title>Show Dev: I built a fast offline calculator hub with Next.js &amp; Cloudflare</title>
      <dc:creator>Sergey Sereda</dc:creator>
      <pubDate>Tue, 10 Feb 2026 21:17:47 +0000</pubDate>
      <link>https://dev.to/seredasv/show-dev-i-built-a-fast-offline-calculator-hub-with-nextjs-cloudflare-e38</link>
      <guid>https://dev.to/seredasv/show-dev-i-built-a-fast-offline-calculator-hub-with-nextjs-cloudflare-e38</guid>
      <description>&lt;p&gt;Hi everyone! I’m a full-stack engineer and like many of you, I’m tired of “utility” websites that are bloated with ads, cookies, painfully slow, and overloaded with trackers.&lt;/p&gt;

&lt;p&gt;So I decided to build qalc.ai — a clean, lightning-fast hub for calculators and practical tools that actually respect the user experience.&lt;/p&gt;

&lt;p&gt;It works fully offline after the first load, has no intrusive pop-ups, and only a single small banner ad that can be closed for the entire day without interrupting anything.&lt;/p&gt;

&lt;p&gt;Originally, I built most of these tools for myself — things I was constantly calculating or Googling while working with finance, crypto, and everyday conversions. Over time, it turned into a growing collection of calculators and productivity tools that I now keep expanding.&lt;/p&gt;

&lt;p&gt;The Tech Stack 🛠️&lt;/p&gt;

&lt;p&gt;To keep it fast, scalable, and SEO-friendly:&lt;br&gt;
Frontend: Next.js (App Router) for SSR + ISR&lt;br&gt;
Styling: Tailwind CSS with shadcn UI&lt;br&gt;
Edge &amp;amp; SEO: Cloudflare caching + IndexNow for instant indexing&lt;br&gt;
Logic: Pure TypeScript (no heavy backend)&lt;/p&gt;

&lt;p&gt;UX Philosophy:&lt;br&gt;
Works offline&lt;br&gt;
No clutter&lt;br&gt;
No annoying ads&lt;br&gt;
No tracking&lt;br&gt;
Just input → result&lt;/p&gt;

&lt;p&gt;I’d Love Your Feedback 🎤&lt;/p&gt;

&lt;p&gt;I’d really appreciate a technical roast or constructive feedback:&lt;br&gt;
Performance: Does it feel instant?&lt;br&gt;
UI/UX: Is navigation clear?&lt;br&gt;
Features: What calculator or tool do you Google most often?&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://qalc.ai" rel="noopener noreferrer"&gt;https://qalc.ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for checking it out — happy hacking! 🚀&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>nextjs</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
