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.
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.
If you don't understand those layers, the defaults will run your money in ways you didn't intend.
What an Auto-Farm Vault Actually Is
Krystal's product stack is nested (per docs/products/vaults/vault-vs-strategy.md):
- Liquidity Position — «a single position on a DEX (e.g., Uniswap V3), typically represented by an NFT issued by the protocol.» One range, one pair, your wallet holds the NFT.
- Liquidity Strategy — «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.» Still your positions, but Krystal automates the lifecycle.
- Liquidity Vault — «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.»
- Auto-Farm Vault — a Liquidity Vault plus an AI agent that selects pools, deploys capital, and manages positions end-to-end (per docs/products/vaults/auto-farm.md).
Two products exist in this layer: Auto-Farm Vaults (Krystal-managed AI agent) and Community Vaults (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.
The crucial fee detail (per docs.krystal.app/ecosystem/fees.md): inside an Auto-Farm Vault, «No additional fees for automation, zap, or rebalance within a VAULT» — 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.
How the Agent Runs
The Auto-Farm AI agent (per docs/products/vaults/auto-farm/agent-interface.md) works on an event-driven 24/7 loop, not on a fixed timer. Each evaluation cycle it does four things:
- Reads your full Instructions text.
- Reads vault state — TVL, idle balance, active positions, pending fees, gas.
- Reads market state per candidate pool — TVL, 24h volume, APR (24h and 7d), volatility, fee tier.
- Matches conditions, decides an action plan, executes it.
You can monitor the agent through four tabs in the interface:
- Agent Overview — «What is the agent doing right now?» Status, goal, what it's managing, next run.
- Chat — «How can I interact with the agent using natural language?» Ask it questions about your vault, request actions, get explanations.
- Action Logs — «What actions were attempted and what were the outcomes?» Every plan the agent tried, with success/partial/failed status.
- Terminal — «How did the agent arrive at its decisions?» The raw decision prompt, inputs, and assumptions the agent used.
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.
The Four Layers of Configuration
Auto-Farm Config (per docs/products/vaults/auto-farm/manage-an-auto-farm-vault.md) splits into four sections that map cleanly to what the agent is allowed and instructed to do.
Permissions — What the Agent Can Do
Six actions are available, mapped from user-facing names to internal action keys:
-
Add Liquidity →
swap_and_mint(open a new LP position) -
Remove Liquidity →
withdraw_and_swap(close a position, convert to base currency) -
Increase Liquidity →
swap_and_increase(add funds to an existing position) -
Rebalance →
adjust_range(move the range on the current position) -
Compound →
compound(reinvest fees back into the position) -
Harvest →
harvest(collect fees, optionally convert to base currency)
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 withdraw_and_swap. 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.
Practical permission presets by strategy:
-
Conservative.
swap_and_mint,withdraw_and_swap,adjust_range,compound,harvest. Noswap_and_increase— 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. - Balanced (default). All six enabled.
- Aggressive. All six enabled, plus a higher take-profit and tighter stop-loss in Execution Config.
The critical permission to never disable is withdraw_and_swap. Without it, the agent has no way to exit a position that goes bad. Stop-loss exits depend on it.
Scopes — Where and How Broadly the Agent Can Operate
Scopes are hard guardrails the agent cannot violate. They fall into three groups.
Pool-level constraints (you set thresholds; the agent rejects any pool that fails):
-
MIN_POOL_TVL_USD— minimum pool TVL (e.g. $200,000) -
MIN_POOL_VOLUME_24H_USD— minimum 24h trading volume (e.g. $50,000) -
MIN_VOLUME_TVL_RATIO— volume/TVL ratio (e.g. 0.3 — ensures the pool actually trades) -
MAX_FEE_TIER_PCT— reject pools above this fee tier (e.g. 1.0%) -
MIN_POOL_AGE_DAYS— reject pools younger than this (e.g. 3 days) -
MAX_PRICE_VOLATILITY_PCT— reject pools above this volatility (e.g. 75%) -
MIN_APR_24H_PCT— minimum 24h APR for entry -
MIN_APR_7D_PCT— minimum 7d APR for sustained yield
Range constraints (control how concentrated the agent's positions are):
-
MIN_POSITION_RANGE_WIDTH_PCT— narrowest allowed range -
MAX_POSITION_RANGE_WIDTH_PCT— widest allowed range (e.g. 0.2% for stablecoin pairs, 50% for volatile pairs)
Asset constraints (whitelist and blacklist):
-
ALLOWED_TOKENS— token whitelist (USDC, USDT, WETH, etc.) -
BLOCKED_TOKENS— specific token addresses to avoid (scams, exploits) -
ALLOWED_PROTOCOLS— DEX whitelist (Aerodrome, Curve, Uniswap V3) -
BLOCKED_PROTOCOLS— DEX blacklist (Uniswap V4 BSC, etc.) -
BLOCKED_POOLS— specific pool addresses
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.
Instructions — The Logic
Instructions are a free-form text block the agent reads every evaluation cycle. Two ways to create them:
- Generate with AI. Krystal drafts an instruction set based on your Goal + risk level + return target. You review and edit.
- Write manually. Full control. You write the conditions, the agent follows them.
The agent supports a 6-step decision order on each cycle. You should structure your instructions around this order:
- EXIT — for each active strategy past the minimum age, check stop-loss, take-profit, APR collapse, or volatility spike. Exit if any trigger fires.
-
OUT_RANGE — for each strategy where the price has left the range, call
adjust_rangeto recenter. - HARVEST — collect fees above the harvest threshold (or convert to base currency).
- INCREASE_LIQUIDITY — add capital to the highest-PnL strategy, respecting capital caps.
- POOL_SELECTION — filter candidate pools against Scopes.
- ENTRY — open a new position on the best qualifying pool.
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.
Instructions also include standard patterns you'll reference repeatedly:
- POOL_SELECTION — 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).
- ENTRY — when to actually mint a position; how to size it (capped by Execution Config); what range width to use.
- OUT_RANGE — when to recenter; minimum shift threshold so the agent doesn't burn gas on tiny adjustments.
- INCREASE_LIQUIDITY — when to add to an existing position instead of opening a new one; capital cap per pool.
- DUST_CLEANUP — swap stray non-base tokens above a USD threshold into base currency before harvest or increase.
- HARVEST — when to collect fees (threshold-based and time-based triggers); gas-aware skip if fees don't justify the cost.
- EXIT — when to close a position (PnL trigger, APR trigger, volatility trigger); stop-loss slippage escalation.
Range width is computed by the platform using pool_price_volatility_pct × RANGE_VOL_MULT. You do not need to specify this formula in Instructions — it is built-in. You only set the bounds (MIN_POSITION_RANGE_WIDTH_PCT, MAX_POSITION_RANGE_WIDTH_PCT) and the multiplier.
Execution Config — How Actions Are Executed
This is the system-level safety layer the agent cannot violate:
-
Slippage —
MAX_SLIPPAGE_PCT(default for swaps, mints, rebalances),STOP_LOSS_SLIPPAGE_L1_PCT(when ROI drops below L1 threshold),STOP_LOSS_SLIPPAGE_L2_PCT(when ROI drops below L2 threshold, the worst case). -
Timing —
POOL_ACTION_TIMEFRAME_HOURS(minimum strategy age before EXIT or INCREASE is eligible),COOLDOWN_ACTION_MINUTES(minimum time between any two actions). -
Capital limits —
MAX_VALUE_PER_STRATEGY_USD(max capital per position),MAX_CAPITAL_PER_POOL_USD(max exposure to a single pool),MIN_USD_PER_ACTION(don't bother if the action is too small),MIN_DUST_SWAP_USD(dust cleanup threshold). -
Gas —
MAX_GAS_PRICE_GWEI(skip actions if gas exceeds this). -
Range/sizing —
PRICE_IMPACT_PCT(target slippage on entry swaps),RANGE_VOL_MULT(range width multiplier),OUT_RANGE_MIN_SHIFT_PCT(minimum shift for a rebalance to be worth it).
Stop-loss slippage escalation is the one most users get wrong. Set STOP_LOSS_SLIPPAGE_L1_PCT to 2-5% and STOP_LOSS_SLIPPAGE_L2_PCT 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.
The Three Knobs You Set at Creation
When you create an Auto-Farm Vault (per docs/products/vaults/auto-farm/create-an-auto-farm-vault.md), you set three preferences that the AI uses to draft your initial instructions:
Risk Level
- High Risk — Memes, trending tokens, riskier bets with higher volatility.
- Balanced — High-cap, established DeFi tokens with moderate risk.
- Safe — Stablecoin pairs and low-volatility strategies.
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.
Expected Return
- Max Gain — chase top-performing pools for maximum upside.
- Growth Mode — target ~15-30% APR with balanced optimization.
- Steady Yield — target ~5-15% APR with more stable strategies.
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.
Farming Style
- Passive — relaxed strategy with weekly or less frequent adjustments.
- Smart — dynamically adjusts based on volatility and fees.
- Active — rebalances frequently to maximize yield.
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.
Goal Field vs Instructions: What Goes Where
The Goal field and the Instructions field look similar — both are free-form text — but they play different roles.
- Goal 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.
- Instructions 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.
The clean rule: Goal is intent. Instructions are conditions and actions. Put the philosophy in Goal. Put the thresholds, triggers, and decision logic in Instructions.
Concrete anti-patterns to avoid:
- Don't write specific thresholds in Goal — "TVL ≥ $200k" belongs in Scopes, not Goal.
- Don't write specific APR minimums in Goal — "8% APR minimum" belongs in Instructions or Scopes.
- Don't write range widths in Goal — "0.1% range" belongs in Scopes.
- Don't write action sequences in Goal — "Harvest when fees exceed 5%" belongs in Instructions.
- 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.
Good Goal examples from Krystal's docs:
- "Build a conservative strategy on blue-chip DeFi pools with stable yields."
- "Maximize APR on ETH pairs while managing IL."
- "Farm trending pools but exit quickly when yields drop."
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.
How to Actually Start
Four steps, in order:
-
Click Create Auto Farm Vault. Describe your goal in 1-2 sentences. Examples from Krystal's docs:
- "Build a conservative strategy on blue-chip DeFi pools with stable yields."
- "Maximize APR on ETH pairs while managing IL."
- "Farm trending pools but exit quickly when yields drop."
Focus on intent and constraints, not exact steps. The AI drafts the strategy; you review.
Pick Risk Level, Return Mode, and Farming Style. Three clicks. These are starting points, not commitments — you change them later by editing Instructions.
Review the AI-generated strategy. 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.
Verify your wallet, activate the agent, deposit funds. 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.
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.
Common Mistakes
-
Skipping Scopes. Without Scopes, the agent can pick any pool. Defaults are sensible but not protective. Add
ALLOWED_TOKENS,BLOCKED_PROTOCOLS,MIN_POOL_TVL_USDbefore activation. - Setting Max Gain with a Safe risk level. The settings contradict each other. The AI will pick a compromise that satisfies neither. Pick one consistent profile.
- Confusing Instructions with Scopes. 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.
-
Leaving
withdraw_and_swapdisabled. Without this permission, the agent cannot exit. Stop-loss cannot fire. You'll be locked in. -
Setting
STOP_LOSS_SLIPPAGE_L2_PCTtoo tight. 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%. - Not monitoring Action Logs. The agent will tell you what it did. If you never check, you won't catch a misconfigured strategy until the PnL shows it.
- Treating the AI draft as final. The "Generate with AI" output is a starting point. Review every section.
When Auto-Farm Is the Wrong Tool
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:
-
External data (GoPlus, honeypot.is, holder concentration, token age) — 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
BLOCKED_POOLSorBLOCKED_TOKENS, and the agent stays away. - Cross-protocol coordination (Aave borrow + LP simultaneously, lending supply + LP) — the agent handles LP positions only. Anything outside the vault must be coordinated manually. The agent cannot borrow to fund a position.
- Custom scoring (Sharpe ratios, multi-factor risk scores) — 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.
- Portfolio-level PnL — the agent sees per-position PnL via Terminal, not aggregate across all vaults. If you need portfolio-level alerts, monitor them yourself.
- Real-time price oracles outside the position — 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.
- Multi-pool allocation % — 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.
- Historical funding rates (perps), liquidation levels, social signals — out of scope. The agent has no concept of these.
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.
Variables the Agent Sees
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.
Per vault:
-
vault_tvl_usd— total vault value -
vault_base_currency— base currency token (USDC, USDT, ETH, native gas token) -
vault_idle_balance_usd— undeployed capital -
vault_pending_fees_usd— uncollected fees total
Per strategy / position:
-
strategy_id— unique identifier -
strategy_value_usd— current LP value -
strategy_pnl_usd— unrealized PnL in USD -
strategy_pnl_pct— PnL as percentage -
strategy_age_hours— hours since position opened -
strategy_pool_address— pool contract address -
strategy_range_lower_pct— lower bound as % from current price -
strategy_range_upper_pct— upper bound as % from current price -
strategy_in_range— boolean: price within range -
strategy_pending_fees_usd— uncollected fees for this strategy -
strategy_pending_fees_token0— pending fees in token0 -
strategy_pending_fees_token1— pending fees in token1
Per candidate pool:
-
pool_address,pool_tvl_usd,pool_volume_24h_usd,pool_apr_24h_pct,pool_apr_7d_pct,pool_price_volatility_pct,pool_fee_tier_pct,pool_age_days,pool_token0_address,pool_token1_address,pool_protocol,pool_current_price
Execution context:
-
current_gas_price_gwei,estimated_gas_cost_usd,max_value_per_strategy_usd,execution_slippage_pct,min_dust_swap_usd
Per token balance:
-
token_balance_amount,token_balance_usd
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.
The Blank Template
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.
## GOAL
[1-2 sentences: intent + risk profile + asset class + yield target]
## SCOPES
### Vault
- BASE_CURRENCY = [USDC | USDT | ETH | native_gas_token]
### Pool constraints
- MIN_POOL_TVL_USD = $[N]
- MIN_POOL_VOLUME_24H_USD = $[N]
- MIN_VOLUME_TVL_RATIO = [N]
- MAX_FEE_TIER_PCT = [N]%
- MIN_POOL_AGE_DAYS = [N]
- MAX_PRICE_VOLATILITY_PCT = [N]%
- MIN_APR_24H_PCT = [N]%
- MIN_APR_7D_PCT = [N]%
### Range constraints
- MIN_POSITION_RANGE_WIDTH_PCT = [N]%
- MAX_POSITION_RANGE_WIDTH_PCT = [N]%
### Asset constraints
- ALLOWED_TOKENS = [token1, token2, ...]
- BLOCKED_TOKENS = [token_address, ...]
- ALLOWED_PROTOCOLS = [protocol1, protocol2, ...]
- BLOCKED_PROTOCOLS = [protocol_name, ...]
- BLOCKED_POOLS = [pool_address, ...]
## INSTRUCTIONS
### DECISION_FRAMEWORK
Evaluate per active strategy in this exact order:
1. EXIT
2. OUT_RANGE
3. HARVEST
4. INCREASE_LIQUIDITY
5. POOL_SELECTION
6. ENTRY
### POOL_SELECTION
A pool qualifies for ENTRY only if ALL of the following are true:
- pool_address is NOT in BLOCKED_POOLS
- pool_protocol is in ALLOWED_PROTOCOLS (if set)
- pool_token0_address AND pool_token1_address are in ALLOWED_TOKENS (if set)
- pool_tvl_usd >= MIN_POOL_TVL_USD
- pool_volume_24h_usd >= MIN_POOL_VOLUME_24H_USD
- pool_volume_24h_usd >= pool_tvl_usd × MIN_VOLUME_TVL_RATIO
- pool_fee_tier_pct <= MAX_FEE_TIER_PCT
- pool_age_days >= MIN_POOL_AGE_DAYS
- pool_price_volatility_pct <= MAX_PRICE_VOLATILITY_PCT
- pool_apr_24h_pct >= MIN_APR_24H_PCT
- pool_apr_7d_pct >= 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.
### ENTRY
Execute swap_and_mint on the selected pool from POOL_SELECTION if ALL of the following are true:
- vault_idle_balance_usd >= MAX_VALUE_PER_STRATEGY_DEPLOY_USD
- The selected pool's strategy_id does NOT already exist in this vault
When executing swap_and_mint:
- Use the platform's range rule (RANGE_VOL_MULT × pool_price_volatility_pct, clamped by MIN/MAX bounds)
- Target position size = MAX_VALUE_PER_STRATEGY_DEPLOY_USD
- If MAX_VALUE_PER_STRATEGY_DEPLOY_USD < MIN_POSITION_SIZE_USD, do NOT open
### OUT_RANGE
For each strategy where strategy_in_range is false:
- Execute adjust_range using the ENTRY range rule
- Skip if the resulting range width differs from the current range width by less than OUT_RANGE_MIN_SHIFT_PCT
### INCREASE_LIQUIDITY
BEFORE executing INCREASE_LIQUIDITY, check ENTRY conditions: if vault_idle_balance_usd >= 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:
- Any vault token balance (excluding vault_pending_fees_usd) has USD value >= MIN_USD_PER_ACTION
- strategy_value_usd < MAX_CAPITAL_PER_POOL_USD
If strategy_value_usd >= MAX_CAPITAL_PER_POOL_USD, do NOT increase.
### DUST_CLEANUP
Execute BEFORE HARVEST and BEFORE INCREASE_LIQUIDITY.
For each token in vault where token_address is not vault_base_currency:
- If token_balance_usd >= MIN_DUST_SWAP_USD
- 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.
### HARVEST
For each strategy where strategy_age_hours >= POOL_ACTION_TIMEFRAME_HOURS:
Execute harvest (converting fees to vault_base_currency) when ANY of the following are true:
- strategy_pending_fees_usd >= strategy_value_usd × HARVEST_PERC
- A TAKE_PROFIT exit is being triggered in the same evaluation cycle
Skip harvest if ALL of the following are true:
- strategy_pending_fees_usd < estimated_gas_cost_usd × HARVEST_GAS_RATIO
Conversion target: vault_base_currency.
### EXIT
For each strategy where strategy_age_hours >= POOL_ACTION_TIMEFRAME_HOURS:
Execute withdraw_and_swap (converting to vault_base_currency) when ANY of the following are true:
- strategy_pnl_pct < STOP_LOSS_PERC
- strategy_pnl_pct >= TAKE_PROFIT_PERC
- pool_apr_24h_pct < MIN_APR_24H_PCT
- pool_apr_7d_pct < MIN_APR_7D_PCT
- pool_price_volatility_pct > MAX_PRICE_VOLATILITY_PCT
STOP_LOSS SLIPPAGE ESCALATION:
- If strategy_pnl_pct < STOP_LOSS_SLIPPAGE_L1_THRESHOLD, use STOP_LOSS_SLIPPAGE_L1_PCT for the withdraw
- If strategy_pnl_pct < STOP_LOSS_SLIPPAGE_L2_THRESHOLD, use STOP_LOSS_SLIPPAGE_L2_PCT for the withdraw
## EXECUTION_CONFIG
### Slippage
- MAX_SLIPPAGE_PCT = [N]%
- STOP_LOSS_SLIPPAGE_L1_PCT = [N]%
- STOP_LOSS_SLIPPAGE_L2_PCT = [N]%
- STOP_LOSS_SLIPPAGE_L1_THRESHOLD = [N]%
- STOP_LOSS_SLIPPAGE_L2_THRESHOLD = [N]%
### Timing
- POOL_ACTION_TIMEFRAME_HOURS = [N]
- POOL_ACTION_TIMEFRAME_TP_HOURS = [N]
- COOLDOWN_ACTION_MINUTES = [N]
### Capital
- MAX_VALUE_PER_STRATEGY_USD = $[N]
- MAX_VALUE_PER_STRATEGY_DEPLOY_USD = $[N]
- MIN_POSITION_SIZE_USD = $[N]
- MAX_CAPITAL_PER_POOL_USD = $[N]
- MIN_USD_PER_ACTION = $[N]
- MIN_DUST_SWAP_USD = $[N]
### Gas
- MAX_GAS_PRICE_GWEI = [N]
### Range / sizing
- PRICE_IMPACT_PCT = [N]%
- RANGE_VOL_MULT = [N]
- OUT_RANGE_MIN_SHIFT_PCT = [N]%
### Strategy-specific
- STOP_LOSS_PERC = [N]%
- TAKE_PROFIT_PERC = [N]%
- HARVEST_PERC = [N]%
- HARVEST_GAS_RATIO = [N]
Worked Example: Conservative Stablecoin Vault
Same template, filled in for a USDC/USDT stablecoin vault on Base. Tighter ranges, higher TVL floor, very low volatility tolerance, low stop-loss.
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:
- BASE_CURRENCY = USDC
- MIN_POOL_TVL_USD = $200,000
- MIN_POOL_VOLUME_24H_USD = $100,000
- MIN_VOLUME_TVL_RATIO = 0.3
- MAX_PRICE_VOLATILITY_PCT = 0.5%
- MIN_APR_24H_PCT = 8%
- MIN_APR_7D_PCT = 5%
- MAX_CAPITAL_PER_POOL_PERC = 50%
- MIN_POSITION_RANGE_WIDTH_PCT = 0.1%
- MAX_POSITION_RANGE_WIDTH_PCT = 0.2%
- ALLOWED_TOKENS = [USDC, USDT]
INSTRUCTIONS: [Standard 6-pattern framework from the Blank Template]
EXECUTION_CONFIG:
- STOP_LOSS_PERC = -1%
- TAKE_PROFIT_PERC = +8%
- STOP_LOSS_SLIPPAGE_L1_PCT = 2%
- STOP_LOSS_SLIPPAGE_L2_PCT = 5%
- HARVEST_PERC = 0.5%
- HARVEST_DAYS_MAX = 30
- HARVEST_GAS_RATIO = 50
- MAX_VALUE_PER_STRATEGY_USD = 50% of vault
What this config does, in plain English:
- Only USDC/USDT pools qualify (
ALLOWED_TOKENS). - TVL must be at least $200k and 24h volume at least $100k — filters out shallow pools.
- Volatility must be ≤ 0.5% — a stable-stable pool should not be moving much; high volatility means depeg risk.
- APR must be at least 8% over 24h and 5% over 7d — filters out pools with collapsing yields.
- Range width is between 0.1% and 0.2% — tight enough to capture near-peg fee density, wide enough to not rebalance every block.
- Stop-loss at -1% — tight, because stable-stable means any meaningful move is a depeg event.
- Take-profit at +8% — locks in fee gains before they get competed away.
- Harvest at 0.5% of position value — small fee thresholds, because stablecoin fees accumulate slowly and you want to compound them aggressively.
- Max 50% of vault per pool — prevents the agent from concentrating everything in a single pool.
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.
Validation Checklist Before You Activate
Before flipping the agent switch:
- [ ] Goal field is 1-2 sentences, abstract intent only — no thresholds, no actions.
- [ ] Scopes cover pool constraints, range constraints, and asset constraints.
- [ ] Instructions follow the 6-step decision order (EXIT → OUT_RANGE → HARVEST → INCREASE_LIQUIDITY → POOL_SELECTION → ENTRY).
- [ ] All 6 action patterns present (POOL_SELECTION, ENTRY, OUT_RANGE, INCREASE_LIQUIDITY, DUST_CLEANUP, HARVEST, EXIT) — or whatever subset your strategy needs, but documented.
- [ ] All variable names used in Instructions match the names in the Variables section above.
- [ ] No external API references (GoPlus, honeypot.is, Twitter, etc.).
- [ ] No custom math (Sharpe ratios, custom risk scoring).
- [ ] No cross-protocol coordination (Aave borrows, lending supply).
- [ ] Execution Config has slippage (default + L1 + L2), timing, capital limits, gas ceiling.
- [ ] STOP_LOSS escalation thresholds defined — L1 and L2.
- [ ] HARVEST trigger defined (percentage + optional time fallback).
- [ ] BLOCKED_POOLS / BLOCKED_TOKENS list populated if there are known bad actors.
- [ ] Chain recorded separately (in your own notes, not in Goal or Instructions).
- [ ] Wallet verified before activation.
- [ ] Deposit is sized so a single
MAX_VALUE_PER_STRATEGY_USDmistake can't wipe the vault.
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.
The Takeaway
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.
A working setup is usually:
- Risk Level + Return Mode + Farming Style that match each other (e.g. Balanced + Growth Mode + Smart).
- Scopes that reject scam pools and cap fee tier + volatility (your hard floor).
- Instructions that follow the 6-step decision order (EXIT → OUT_RANGE → HARVEST → INCREASE → POOL_SELECTION → ENTRY), with stop-loss and take-profit triggers defined.
- Execution Config with realistic slippage escalations (L1 = 2-5%, L2 = 10-15%) and a sensible cooldown (5-15 minutes).
- Monitoring through Action Logs and Chat, not just the Overview screen.
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.
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 docs.krystal.app before deploying real capital.
Top comments (0)