agentsclimarketplace

Skill 03 defi operations

Skill vaquarkhan/web3-agent-skills/skills/skill-03-defi-operations

Executes DeFi operations including token swaps, lending/borrowing, staking, liquidity provision, flash loans, perpetuals, and vault strategies. Use when interacting with Uniswap, Aave, Compound, Lido, or other DeFi protocols.From its SKILL.md

Install
npx -y skills add vaquarkhan/web3-agent-skills --skill skill-03-defi-operations

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • skips confirmationTells the agent to proceed without asking first, 1 time: "Set slippage tolerance (default 0.5%, max 3% without confirmation)".
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.7 KB, 663 tokens by cl100k_base, as published. Nobody here has run it

DeFi Operations

When to Use

  • Swapping tokens on DEXs (Uniswap, Curve, 1inch)
  • Lending/borrowing (Aave, Compound, Morpho)
  • Staking (Lido stETH, EigenLayer restaking)
  • Providing/removing liquidity (Uniswap V3, Curve)
  • Flash loans (Aave, Balancer, dYdX)
  • Perpetual trading (GMX, dYdX v4)
  • Yield vaults (Yearn, ERC-4626 vaults)

Prerequisites

  • MCP: blockchain-rpc-server, defi-protocol-server, price-feed-server
  • Skills: skill-02 (contract calls), skill-12 (gas), skill-15 (MEV for swaps)
  • Guardrails: simulate all txs; screen counterparties

Workflow

1. Swap

  1. Get quote from defi-protocol-server or 1inch API
  2. Check price impact (< 1% for large trades; use TWAP if higher — skill-15)
  3. Verify router address against known-good list
  4. Set slippage tolerance (default 0.5%, max 3% without confirmation)
  5. Approve exact amount (never unlimited without explicit user consent)
  6. Execute swap; verify received amount ≥ minOut

2. Lend / Borrow

ProtocolSupplyBorrowLiquidation Threshold
Aave V3supply()borrow()Health factor > 1.5 recommended
Compound V3supply()N/A (Comet)Collateral factor varies
MorphoOptimizer bundlesPeer-matched ratesCheck LLTV

Always maintain health factor buffer. Monitor oracle price feeds (skill-11).

3. Stake / Restake

  • Lido: submit() ETH → stETH; check rebasing vs wstETH for integrations
  • EigenLayer: deposit into strategy contracts; track withdrawal queues
  • Liquid staking: verify validator set and slashing risk

4. Liquidity Provision

  • Uniswap V3: select tick range; narrow ranges = higher IL risk
  • Calculate impermanent loss before deposit
  • Use defi-protocol-server for current pool APR/TVL

5. Flash Loans

  1. Identify provider (Aave: 0.09% fee, Balancer: 0% on some pools)
  2. Build callback contract with atomic repay logic
  3. Simulate full transaction — revert if unprofitable
  4. Never use flash loans for unbounded external calls

Protocol References

See knowledge-base/protocols/ for addresses, ABIs, and subgraph endpoints per chain.

Risk Checklist

  • Contract verified and on protocol allowlist
  • Slippage and deadline set
  • Health factor / collateral ratio safe
  • Token approvals scoped to exact amount
  • MEV protection enabled for swaps > $1,000 (skill-15)

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most operations skills give in 663 tokens

Counted across 483 of the 484 authors here whose files we hold, read 2026-08-07

  • Collect monitoring data throughout the simulationin 14 of 483, across 6 files
  • Set the random seed for reproducibilityin 14 of 483, across 6 files
  • Validate simulations against analytical solutionsin 12 of 483, across 4 files
  • Clarify goals, constraints, and inputsin 11 of 483, across 2 files
  • Implement contract tests for integration pointsin 11 of 483, across 2 files
  • Implement strangler fig infrastructure with API gatewayin 11 of 483, across 2 files
  • Audit modernized components for security vulnerabilitiesin 11 of 483, across 2 files
  • Avoid Python blocking calls in processesin 10 of 483, across 3 files
  • Use resource context managers for automatic cleanupin 9 of 483, across 2 files
  • Maintain consistent time unitsin 9 of 483, across 2 files
  • Validate outcomes against success criteriain 8 of 483, across 1 file
  • Analyze the legacy codebase for technical debtin 8 of 483, across 1 file

Said here and by no other author read

  • simulate all transactions
  • screen counterparties
  • verify router address against known-good list
  • approve exact token amount
  • verify received amount meets minimum
  • maintain health factor buffer

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.