Automated summary
Surfaces Krystal API data on DeFi liquidity pools, vaults and LP positions, plus LP transaction building (zap-in, zap-out, compound, rebalancing) across 13+ blockchains.
Strengths
- Covers the full LP position lifecycle: pool discovery, opening, adding liquidity, withdrawing, compounding and range adjustment.
- Handles multi-chain quirks explicitly, such as nftMintAddress and buildTx=true on Solana versus signing txData directly on EVM.
- Documents useful edge cases, including liquidityPercent=0 to claim only fees while leaving principal in the pool.
- Keeps slippage controls distinct per action (swapSlippage, liquiditySlippage, withdrawSlippage).
Limitations
- Examples are curl calls returning raw txData; signing and broadcasting through a web3 provider is left entirely to the user.
- Computing ticks aligned to the pool's tickSpacing and judging vault risk are not automated.
- The documentation is split across many reference files (reference/lp-actions/*, vaults, positions) that must be loaded individually.
Use it when you need to query pools or LP positions, or build a DeFi transaction (zap-in, zap-out, compound, rebalance) through the Krystal API on EVM or Solana.
Avoid it for general market data or spot trading, or when you want end-to-end on-chain execution without managing a web3 provider.
Security analysis
CautionThe skill is primarily API documentation for a DeFi service and contains no destructive, obfuscated, or exfiltration behavior. However, it explicitly guides agents through building, signing, and sending financial transactions, so it warrants caution rather than being fully safe.
- •Instructs agents to sign and send `txData` for real on-chain DeFi transactions; this is financially sensitive and should require explicit user confirmation.
- •Uses network API calls and `curl` examples for legitimate pool/vault data retrieval, but still requires network access.
- •No private-key handling or secret exfiltration is specified, but transaction signing must be handled by a secure wallet/provider.
Examples
Use the Krystal API to list the top liquidity pools across all chains, then show me the TVL, volume and APR for the best Base pools.Zap out my Uniswap v3 position tokenId 12345 on Base with liquidityPercent=0 so I only claim the fees, swapping them to USDC, and build the txData.Rebalance my LP position tokenId 12345 on Arbitrum: fetch the pool tickSpacing from Pool Detail, pick a new range around the current price, and build the adjust-range transaction.name: krystal-defi-api description: Provides DeFi liquidity pool data, vault management, user positions, and LP transaction-building via the Krystal API. Use for pool analytics (TVL/volume/APR), listing positions (including single-position lookup by positionId), and LP actions like zap-in, zap-out (including fee-claim via liquidityPercent=0), swap-and-increase, adjust-range (rebalance), and compound across chains like Ethereum, BSC, Polygon, Arbitrum, Base, and Solana.
Krystal API
DeFi liquidity pool explorer and transaction API supporting 13+ blockchains.
Quick Start
Base URL: https://api.krystal.app
# Get top pools across all chains
curl "https://api.krystal.app/all/v2/lp_explorer/top_pools?skipCheckAutomation=true"
# Get pool details
curl "https://api.krystal.app/all/v1/lp_explorer/pool_detail?chainId=8453&poolAddress=0x..."
Instructions
Finding Pools
- Use Top Pools to discover high-performing pools
- Use Pool Detail for specific pool information
- Use Pool Chart for liquidity distribution visualization
Creating LP Positions
- Get pool details including
tickSpacingfrom Pool Detail - Calculate tick range aligned with pool's tick spacing
- Use Zap In to build the transaction
- Sign and send
txDatausing a web3 provider
Increasing Liquidity (Swap and Increase)
- Get position
tokenIdfrom User Positions (for Solana, also passnftMintAddress) - Use Swap and Increase with
tokenInAddress,amountIn,swapSlippage, andliquiditySlippage - Set
fundFromOwner=trueandisVault=truewhen adding to a Krystal auto-farm vault position - Sign and send
txDatausing a web3 provider (same as Zap In)
Withdrawing LP Positions (Zap Out)
- Get position
tokenIdfrom User Positions (for Solana, also passnftMintAddress) - Use Zap Out with
targetToken,liquidityPercent,swapSlippage, andwithdrawSlippage- Set
liquidityPercent = 0to claim only fees (principal stays in the pool; claimed tokens are swapped totargetToken) - Use
0 < liquidityPercent ≤ 1to withdraw principal liquidity (plus any fees) totargetToken
- Set
- Sign and send
txDatausing a web3 provider (same as Zap In)
Compounding Fees into a Position
- Get position
tokenIdfrom User Positions (for Solana, also passnftMintAddress) - Use Compound with
swapSlippageandliquiditySlippageto reinvest unclaimed fees back into the same position - Set
isVault=truewhen compounding a Krystal auto-farm vault position - Sign and send
txDatausing a web3 provider
Rebalancing Positions (Adjust Range)
- Get position
tokenIdfrom User Positions (for Solana, also passnftMintAddress) - Get pool
tickSpacingfrom Pool Detail and choose newnewTickLowerandnewTickUpperaligned with it - Use Adjust Range with
swapSlippage,liquiditySlippage, andwithdrawSlippage - On EVM chains, sign and send
txDatadirectly. On Solana, call withbuildTx=truefirst to gettxData, then sign and send it.
Exploring Vaults
- Use Vaults to list available vaults
- Filter by
category(ALL_VAULT,NEW_VAULT,BOOST_VAULT) andisAutoFarmVaultto narrow results - Evaluate vaults by
tvl,apr,riskScore, andvaultSecurities - Use Vault Profile Stats to get a wallet's aggregate vault statistics (owned, joined, yields, PnL)
Viewing Positions
- Use User Positions to list a wallet's liquidity positions
- Check
statsByChain["all"]for aggregate portfolio metrics (total PnL, APR, unclaimed fees) - Filter by
chainIdsorpositionStatus(open/closed) to narrow results - Evaluate individual positions by
pnl,apr,impermanentLoss,compareWithHodl, andstatus(IN_RANGE/OUT_RANGE) - Use
refreshAll=truefor fresh on-chain data (slower) or omit for cached data (faster)
Wallet Operations
- Use Token Search to get user's token balances
- Select input token for swap/zap operations
Key Conventions
- Always use
skipCheckAutomation=truefor faster responses - Monetary values: Returned as strings to preserve precision
- APR values: Returned as numbers (percentages)
- Native tokens: Use NativeTokenAddress placeholders
- Amounts: Always in wei (smallest unit)
Endpoints Reference
| Endpoint | Purpose | |----------|---------| | Top Pools | Discover pools by TVL, volume, APR | | Pool Detail | Get pool info, tick spacing, incentives | | Pool Chart | Liquidity distribution and price history | | Zap In | Build swap + mint transaction | | Swap and Increase | Add liquidity to existing position (swap + increase) | | Zap Out | Build withdraw + swap transaction | | Compound | Reinvest unclaimed fees into existing position | | Adjust Range | Rebalance position to new tick range | | User Positions | List wallet LP positions & stats | | Vaults | List shared & auto-farm vaults | | Token Search | Query wallet token balances |
Types Reference
See types.md for complete type definitions:
Core Types: Token, Pool, PoolDetail, ChainId, LPProtocolAlias
Chart Types: PoolChartData, Tick, PricePoint
Transaction Types: TxData, ZapTxInfo, SwapAmount
Position Types: UserPosition, PositionChainStats, PositionTokenAmount, PositionPool
Vault Types: Vault, VaultOwner, VaultSecurity, VaultStats
Wallet Types: WalletToken, TokenBalance
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/krystal-defi-api-ms1aw4xq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/krystal-defi-api-ms1aw4xq/download' --output '.skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md.part' && mv '.skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md.part' '.skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md' && test -s '.skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/krystal-defi-api' && cp -R '.skill-downloads/krystal-defi-api-ms1aw4xq' '.claude/skills/krystal-defi-api'Cursor
test -f '.skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md' && test -s '.skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/krystal-defi-api' && cp -R '.skill-downloads/krystal-defi-api-ms1aw4xq' '.cursor/skills/krystal-defi-api'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/krystal-defi-api-ms1aw4xq'openskills read 'krystal-defi-api-ms1aw4xq'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/krystal-defi-api-ms1aw4xq/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.