AD

add-vault-protocol

Adds support for new ERC-4626 vault protocols to the eth_defi library.

Install

mkdir -p .claude/skills/add-vault-protocol && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4147" && unzip -o skill.zip -d .claude/skills/add-vault-protocol && rm skill.zip

Installs to .claude/skills/add-vault-protocol

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Add support for a new ERC-4626 vault protocol. Use when the user wants to integrate a new vault protocol like IPOR, Plutus, Morpho, etc. Requires vault smart contract address, protocol name, and protocol slug as inputs.
219 chars✓ has a “when” trigger
Advanced

Key capabilities

  • →Download and store the vault smart contract ABI
  • →Create a vault class for the new protocol
  • →Add a new enum member to ERC4626Feature
  • →Add protocol identification probes
  • →Generate protocol-specific historical lead migration script

How it works

The skill guides the user through a multi-step process to integrate a new ERC-4626 vault protocol by collecting necessary information, creating code components, and updating configuration files.

Inputs & outputs

You give it
Vault smart contract address, protocol name, protocol slug, chain, block explorer URL
You get back
A new vault protocol integration within the eth_defi library

When to use add-vault-protocol

  • →Add support for a new ERC-4626 vault protocol
  • →Register tokenised fund protocols
  • →Configure protocol slug and smart contract addresses

About this skill

Add vault protocol

This skill guides you through adding support for a new ERC-4626 vault protocol to the eth_defi library.

Tokenised fund protocols

Tokenised fund protocols belong under eth_defi/tokenised_fund/{protocol_slug}/, rather than eth_defi/erc_4626/vault_protocol/. Use eth_defi/tokenised_fund/asseto/ and eth_defi/tokenised_fund/securitize/ as the reference integrations. These protocols commonly expose permissioned ERC-20 token shares and bespoke subscription and redemption flows instead of ERC-4626 vault contracts.

Website descriptions

Read and follow the shared description writing style before writing or editing public descriptions.

Individual vault VaultBase.description values are Markdown, shown as "About the vault": paragraphs of two or three sentences, bold for key facts, inline links and #### subheadings where useful. VaultBase.short_description values must be single-line plain text: never include Markdown, newline or carriage-return characters, or literal \n / \r escape sequences. Apply eth_defi.vault.base.normalise_vault_description() to full descriptions and normalise_vault_short_description() to summaries, including cached metadata. Short descriptions must contain only one sentence. When automatically copying a full description or a provider-supplied summary, take only the first sentence and retain its ending punctuation; never copy several sentences into a summary. Preserve the wording within that sentence. Protocol-level Markdown fields below follow the same paragraph rules as full vault descriptions.

For protocols with 1–9 known supported vaults across all chains, add researched, handwritten short and full descriptions for every covered vault, not just the example deployment. Use the existing address-scoped handwritten metadata workflow and expose the copy through the adapter's description and short_description accessors. Protocol or curator descriptions do not satisfy this requirement: they do not populate an individual vault's "About the vault". Leave undisclosed strategy details explicitly unknown rather than substituting generic protocol claims. This is a maintained-content requirement, not a runtime threshold that removes copy when the protocol grows.

Check the actual scanner record and individual vault JSON export for both description fields, including Markdown and a single-line plain-text summary. A successful protocol metadata/logo export test alone is insufficient. Add a new numbered migration when existing persisted vault descriptions need repair; do not edit or rerun a previously successful migration.

Protocol metadata YAML is public website copy for a general audience. The short_description, long_description and fee_description fields must explain the product, not this repository's integration.

  • Use clear, neutral language to describe what the protocol offers, who operates it, its strategies or markets, and any material stablecoin, collateral, liquidity, redemption, eligibility and fee considerations.
  • Add inline Markdown links in the body for the official website and for the primary source supporting important claims. Link launch announcements, product terms, fee schedules, risk disclosures and stablecoin documentation when relevant; the links mapping alone is not enough.
  • Name public founders, executives or well-known backers only where a primary source confirms the relationship and it adds useful context. Link that source and never infer a relationship from a database, present it as an endorsement, or repeat promotional claims.
  • Keep financial and risk language factual: explain the product-specific risk without giving investment advice or describing unsupported guarantees.
  • Exclude project-specific logic and technical implementation details: no scanner, adapter, reader, classifier or pipeline behaviour, contract probe, ABI, standard, method name, bytecode or proxy discussion. Those belong in technical integration and API documentation.

Required inputs

Before starting, gather the following information from the user:

  1. Vault smart contract address - The address of an example vault contract on a blockchain
  2. Protocol name - Human-readable name (e.g., "Plutus", "IPOR", "Morpho")
  3. Protocol slug - Snake_case identifier for code (e.g., "plutus", "ipor", "morpho")
  4. Chain - Which blockchain (Ethereum, Arbitrum, Base, etc.)
  5. Block explorer URL - To fetch the ABI (e.g., Etherscan, Arbiscan, Basescan)
  6. Single vault protocol: Some protocols, especially ones issuing out their own stablecoin, are know to have only a single vault for the stablecoin staking. Example protocols are like like Spark, Ethena, Cap. In this case use HARDCODED_PROTOCOLS classification later, as there is no point to create complex vault smart contract detection patterns if the protocol does not need it.
  7. Risk level: Optional. If not given, set to None

Completion requirements

Before implementation, read vault integration through the existing framework. Keep ABI differences in the protocol manager and policy resolution in shared guard setup; do not add protocol-selection wrappers in deployment callers.

A new vault protocol integration is not complete unless it includes:

  • Protocol detection or hardcoded address classification
  • Vault class and create_vault_instance() wiring
  • Per-deployment account-admission classification through the existing hooks, with restricted/public controls and unknown-read coverage; follow account admission and permissionless shortlists
  • Deposit manager and public deposit/redemption flow capability, backed by a guarded fork transaction test
  • Risk and fee matrix entries
  • Protocol metadata YAML under eth_defi/data/vaults/metadata/
  • Handwritten short and full vault descriptions for each covered deployment when the protocol has fewer than 10 known supported vaults, with scanner and individual vault export coverage separate from protocol metadata tests
  • Original and post-processed protocol logos
  • A post-processed light.png: a light-coloured logo that remains legible on the frontend's dark backgrounds
  • Vault documentation and API documentation entries
  • Focused tests for the new protocol
  • A numbered migration for the required historical lead/data repair, following the migration documentation, preserving unrelated metadata, reader state, prices and timestamp caches

Standalone migrate-<protocol>-vaults.py and one-off backfill-history.py entrypoints are legacy format and must not be used for these repairs. Add migration/scripts/NNN-name.py with migrate(context) and use the unified runner. Reuse historical-reader helpers where a backfill is actually required; helpers must not reacquire the runner's locks.

A new protocol integration usually finds vaults that have been operating for weeks or months before the scanner could read them. Their price history then starts at the integration date. If a reviewed vault's earlier history matters, add a price backfill to the migration with run_price_backfill(), covering only those vaults from their first-seen block to their first collected price. Follow the historical price backfills section of the migration guide, including its preview-only MIGRATION_BACKFILL_BLOCKS local check and the Monad state-window rules. Include the guarded production launcher commands and expected results in a Run after merge PR comment.

Strategy tags

Run the categorise-vault-strategy skill for every newly added vault and every existing vault newly covered by the protocol integration. Do not tag only the example contract used for protocol detection. Use .claude/skills/categorise-vault-strategy/SKILL.md to review each vault's description and context, maintain the protocol's address-level tags.py mapping, wire get_strategy_tags() into the adapter, and add focused coverage.

Strategy tagging is part of protocol onboarding: the integration is incomplete until all vault addresses introduced or newly covered by detection have either an evidence-based tag mapping or are deliberately left unmapped so the resolver returns the explicit missing-information result (None for VaultBase adapters).

EVM address keys in protocol tags.py tables must be plain lowercase strings, such as "0x1234...". Do not use verbose HexAddress(...) constructors in table literals; the shared lookup helper normalises adapter inputs before looking up these keys.

Step-by-step implementation

Step 1: Download and store the ABI

  1. Fetch the vault smart contract ABI from the blockchain explorer
  2. Important: If the contract is a proxy, you need the implementation ABI, not the proxy ABI
    • Check if the contract has a implementation() function or similar
    • Use the explorer's "Read as Proxy" feature to get the implementation address
    • Download the implementation contract's ABI
  3. Create the ABI directory and file:
    eth_defi/abi/{protocol_slug}/
    eth_defi/abi/{protocol_slug}/{ContractName}.json
    
  4. Use eth_defi/abi/lagoon/ as a reference for structure

For a narrowly scoped adapter that only needs stable, no-argument view methods, using their canonical four-byte selectors is acceptable instead of storing a generated ABI. Link the authoritative ABI in the module docstring and add a fork regression test for every decoded value and scale.

Step 2: Create the vault class

Create eth_defi/erc_4626/vault_protocol/{protocol_slug}/vault.py following the patterns in:

  • eth_defi/erc_4626/vault_protocol/plutus/vault.py - Simple vault with hardcoded fees
  • `eth_defi/erc_4626/vault_protoc

Content truncated.

When not to use it

  • →When integrating tokenised fund protocols that are not ERC-4626 vaults
  • →When the protocol has only a single vault and does not require complex detection patterns

Limitations

  • →A new vault protocol integration is not complete unless it includes specific components
  • →Tokenised fund protocols belong under `eth_defi/tokenised_fund/`
  • →If the contract is a proxy, you need the implementation ABI

How it compares

This skill provides a structured, step-by-step implementation guide for integrating new vault protocols, ensuring all required components and documentation are created, unlike a manual, ad-hoc approach.

Compared to similar skills

add-vault-protocol side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
add-vault-protocol (this skill)14moReviewAdvanced
fastapi-templates5206moNo flagsIntermediate
fastapi-pro797moNo flagsAdvanced
supabase-python07moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry