stakr-protocol
БесплатноБез исполняемых скриптовНе проверенInteract with the Stakr protocol — ERC-4626 vaults with multi-reward staking. Use when the user or an agent needs to work with Stakr vaults, add or modify…
от BankrBot★ 1 223 звезды на GitHubОб этом скилле
Stakr Protocol — Agent Overview
This skill gives agents the context to interact with the Stakr protocol: ERC-4626 tokenized vaults with multi-reward staking for any ERC-20 token. Use it when building integrations, scripts, or tooling that create vaults, add rewards, modify reward schedules, or let an agent operate its "own" vault.
Protocol at a Glance
- StakrVault: Single-asset ERC-4626 vault. Users deposit underlying, get shares; they can lock shares to earn multiple reward tokens over configurable windows.
- StakrVaultFactory: Deploys vaults and holds protocol fee configuration. One factory per chain.
- Rewards: Up to 25 reward tokens per vault. Each reward has
startTime,endTime, and totalamount. Distribution is linear over the window; logic is Masterchef-style (accumulated rewards per share). - Ownership: A vault can have an
owner(address that can add/modify rewards) oraddress(0)for permissionless reward addition.
When an agent is said to have its "own vault", it means: the agent (or a controlled EOA/contract) is the vault owner, so it can call addRewardToken and modifyRewardToken to fund and adjust rewards without third-party permission.
Emphasis: Adding and Modifying Rewards (Agent-Owned Vaults)
Agents that operate their own vault will use these two functions most:
1. addRewardToken(token, amount, settings)
Purpose: Start a new reward program for a given ERC-20 token.
- Caller: Vault owner (or anyone if
owner() == address(0)). - Parameters:
token: ERC-20 reward token address. Cannot be the vault’s share tokenaddress(vault).amount: Total amount oftokento distribute. Tokens are pulled frommsg.sender; protocol may take a fee (see factoryfeeOnAddReward).settings:Settings{ startTime, endTime }. Distribution is linear fromstartTimetoendTime; both must be in the future andstartTime < endTime.
- Effects: Registers the reward, pulls tokens (minus fee) into the vault, and emits
AddReward. Rewards cannot be withdrawn once added; they can only be modified (extended or topped up) viamodifyRewardToken. - Limits: No duplicate reward token; vault cannot have more than 25 active rewards.
Use this when the agent wants to create a new reward (e.g. launch an incentive program on its vault).
2. modifyRewardToken(token, amount, settings)
Purpose: Add more amount and/or extend (or reschedule) an existing reward.
- Caller: Same as
addRewardToken(vault owner or permissionless if owner is zero). - Parameters:
token: Address of an already active reward token.amount: Additional amount oftokento add. Pulled frommsg.sender; fee may apply. Cannot reduce existing amount.settings:Settings{ startTime, endTime }. Rules:- If the reward has not yet ended (
currentTime <= reward.settings.endTime): you can only extendendTime(and add more amount).startTimecannot be changed. - If the reward has ended (
currentTime > reward.settings.endTime): you can set a new window (startTime,endTime) and add amount;accRewardsPerShareis reset.
- If the reward has not yet ended (
- Effects: Increases
remainingAmount(and total amount) byamount, updatesendTime(and possiblystartTimeif reward had ended), pulls tokens frommsg.sender, and emitsModifyReward.
Use this when the agent wants to top up an existing reward or extend the distribution period (or reschedule after it has ended).
Summary for agents:
- New reward →
addRewardToken(token, amount, settings). - More reward or longer duration (or new window after end) →
modifyRewardToken(token, amount, settings). - Ensure the vault has been created via the factory and the agent (or its controlled address) is the vault owner to call these.
Executing Transactions via Bankr
To submit any Stakr call (vault creation, addRewardToken, modifyRewardToken), first encode calldata, then submit the transaction via the Bankr wallet API.
Use a natural-language Bankr agent prompt:
bankr agent prompt "Call addRewardToken on vault 0x... with token 0x... amount 1000 USDC starting tomorrow for 7 days"
Or submit raw encoded calldata directly:
bankr wallet submit --to <vault-address> --data <encoded-calldata> --chain base
For calldata encoding help, see the vault API reference.
3. Streaming rewards (continuous incentives)
Agents can stream rewards over time instead of funding one large window up front:
- Pattern: Call
addRewardTokenonce to start a reward (short amount if desired). Then callmodifyRewardTokenrepeatedly to add more amount and extendendTime. Each call tops up the reward and pushes the end of the distribution window forward. - Why: This avoids locking a huge amount for a long period. The agent (or a script/cron) can fund the vaul
Установить stakr-protocol в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл stakr-protocol?
Interact with the Stakr protocol — ERC-4626 vaults with multi-reward staking. Use when the user or an agent needs to work with Stakr vaults, add or modify rewards (addRewardToken, addRewards, modifyRewardToken, modifyReward), create or manage an "agent vault" or "own vault", fund incentive programs, configure reward schedules, or integrate Stakr in scripts or tooling. Prefer this skill whenever Stakr, StakrVault, rewards, staking, or vault ownership is mentioned.
Как установить скилл stakr-protocol?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл stakr-protocol запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic