Skills bifrost-slpx-info
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ark930/bifrost-slpx-info" ~/.claude/skills/clawdbot-skills-bifrost-slpx-info && rm -rf "$T"
manifest:
skills/ark930/bifrost-slpx-info/SKILL.mdsource content
Bifrost SLPx Info
Query Bifrost vETH liquid staking data via on-chain calls to the VETH ERC-4626 vault contract.
Contract & Network
vETH is deployed on Ethereum and three L2 networks. The same contract address is used across all chains.
| Chain | ChainId | VETH Contract | WETH (underlying) | Default RPC | Fallback RPC |
|---|---|---|---|---|---|
| Ethereum | 1 | | | | |
| Base | 8453 | | | | |
| Optimism | 10 | | | | |
| Arbitrum | 42161 | | | | |
Configuration (Environment Variables)
On first run, ask the user whether they want to configure custom settings. If not, use the defaults above.
| Variable | Description | Default |
|---|---|---|
| Target chain name (, , , ) | |
| Custom RPC endpoint | Per-chain default from table above |
| VETH contract address (override) | |
Bifrost Backend API
Protocol-level statistics available via the Bifrost REST API (no RPC needed):
GET https://api.bifrost.app/api/site
Returns JSON with
vETH object containing:
| Field | Description |
|---|---|
| Total APY (Base + Farming), e.g. |
| Base staking APY from Ethereum validators, e.g. |
| Additional Bifrost farming reward APY, e.g. |
| Total value locked in USD |
| Total vETH minted (in ETH) |
| Total vETH supply (on Bifrost chain) |
| Number of vETH holders across all chains |
Use this API when users ask about APY, yield, TVL, or holder count.
Quick Reference
VETH is an ERC-4626 vault inheriting from
VToken → VTokenBase → ERC4626Upgradeable. All standard ERC-4626 view functions are available. Exchange rates are Oracle-backed.
Token Info
| Query | Function | Selector | Args | Returns | Description |
|---|---|---|---|---|---|
| Token name | | | none | string | Returns |
| Token symbol | | | none | string | Returns |
| Decimals | | | none | uint8 | Returns |
| Underlying asset | | | none | address | Returns the WETH address (differs per chain, see Contract & Network table) |
Exchange Rate Queries
| Query | Function | Selector | Args | Returns | Description |
|---|---|---|---|---|---|
| ETH → vETH rate | | | assets (wei) | uint256 (shares) | Convert an ETH amount to the equivalent vETH shares using the current Oracle exchange rate |
| vETH → ETH rate | | | shares (wei) | uint256 (assets) | Convert a vETH shares amount to the equivalent ETH value using the current Oracle exchange rate |
| Preview deposit | | | assets (wei) | uint256 (shares) | Simulate a deposit and return the exact vETH shares that would be minted |
| Preview mint | | | shares (wei) | uint256 (assets) | Simulate minting a specific amount of vETH shares and return the ETH required |
| Preview withdraw | | | assets (wei) | uint256 (shares) | Simulate withdrawing a specific ETH amount and return the vETH shares that would be burned |
| Preview redeem | | | shares (wei) | uint256 (assets) | Simulate a redemption and return the exact ETH that would be returned |
User Balance & Withdrawal Queries
| Query | Function | Selector | Args | Returns | Description |
|---|---|---|---|---|---|
| vETH balance | | | owner address | uint256 | Get the vETH token balance of a specific address |
| Claimable ETH | | | target address | (uint256, uint256, uint256) | Returns . First value = ETH ready to claim |
| Withdrawal queue | | | target address | Withdrawal[] | Returns array of withdrawal entries, each with (amount in queue) and (amount being processed) fields |
| Max redeemable | | | owner address | uint256 | Maximum vETH shares the owner can redeem in a single tx |
| Max withdrawable | | | owner address | uint256 | Maximum ETH the owner can withdraw in a single tx |
| Max depositable | | | receiver address | uint256 | Maximum ETH that can be deposited for receiver (typically type(uint256).max = unlimited) |
| Max mintable | | | receiver address | uint256 | Maximum vETH shares that can be minted for receiver (typically type(uint256).max = unlimited) |
| Allowance | | | owner, spender | uint256 | Check vETH spending allowance granted by owner to spender |
Protocol Statistics
| Query | Function | Selector | Args | Returns | Description |
|---|---|---|---|---|---|
| Total assets | | | none | uint256 | Total ETH managed by the vault, sourced from Oracle |
| Total supply | | | none | uint256 | Total vETH tokens in circulation on this chain |
| Vault balance | | | none | uint256 | ETH available for payouts (BridgeVault balance + completed withdrawals) |
| Queued withdrawals | | | none | uint256 | Total ETH amount currently queued for withdrawal globally |
| Completed withdrawals | | | none | uint256 | Total ETH amount that has completed withdrawal processing globally |
| Max withdraw count | | | none | uint256 | Maximum number of concurrent pending withdrawal entries per user |
| Paused | | | none | bool | Whether the contract is currently paused (deposits/redeems disabled) |
How to Call
All queries are read-only
eth_call — no gas, no signing.
Method A: cast (preferred)
cast call <VETH_CONTRACT> \ "<FUNCTION_SIGNATURE>(<ARG_TYPES>)(<RETURN_TYPES>)" <ARGS> \ --rpc-url <RPC_URL>
Example — query exchange rate for 1 ETH on Ethereum:
cast call 0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 \ "convertToShares(uint256)(uint256)" 1000000000000000000 \ --rpc-url https://ethereum.publicnode.com
Method B: curl + JSON-RPC (if cast unavailable)
curl -s -X POST <RPC_URL> \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"to":"<VETH_CONTRACT>","data":"<SELECTOR><ENCODED_ARGS>"},"latest"]}'
Calldata Encoding
- No-arg functions: calldata = selector only (e.g.,
for0x01e1d114
)totalAssets() - uint256 arg: selector + amount in hex, left-padded to 64 chars
- Example: 1 ETH =
→ pad to0xDE0B6B3A76400000000000000000000000000000000000000000000000000000de0b6b3a7640000
- Example: 1 ETH =
- address arg: selector + address (no 0x), left-padded to 64 chars
- Example:
→0xAbCd...1234000000000000000000000000AbCd...1234
- Example:
Response Decoding
- curl returns
. For single uint256: convert 64 hex chars to decimal, divide by 1e18.{"result":"0x<hex>"}
returns 3 × uint256 (192 hex chars):canWithdrawalAmount
. First 64 chars = claimable ETH amount.(totalAvailableAmount, pendingDeleteIndex, pendingDeleteAmount)
Agent Behavior
- Environment check: on first interaction, ask user if they want to configure
orBIFROST_CHAIN
. If not, use Ethereum Mainnet defaultsBIFROST_RPC_URL - RPC selection: use
if set; otherwise use per-chain default RPC. Fall back to per-chain fallback RPC on failureBIFROST_RPC_URL - Multi-chain awareness: when user specifies a chain (e.g. "on Base", "on Arbitrum"), switch to that chain's RPC and WETH address accordingly
- All values are in wei (18 decimals) — always convert to human-readable before displaying
- Default exchange rate query: show rate for 1 ETH if no amount specified
- Prompt for wallet address if not provided; display truncated (first 6 + last 4 chars)
- If
first value > 0, indicate claimable and suggest "claim my redeemed ETH"canWithdrawalAmount - Prefer
; fall back tocast call
+ JSON-RPC with pre-computed calldata if cast failscurl - Always fetch fresh data — do not cache across requests
- If RPC fails, retry with fallback before reporting error
- Useful links: direct users to Bifrost vETH page or Bifrost App when relevant
Error Handling
| Error | User Message |
|---|---|
| RPC failure | "Unable to connect to Ethereum. Retrying with backup endpoint..." |
Zero from | "The vETH exchange rate is temporarily unavailable. The contract may be paused." |
| Empty withdrawal array | "You have no pending vETH redemptions." |
| Invalid address | "Please provide a valid Ethereum address (0x + 40 hex characters)." |
| Retry with alternate method (cast ↔ curl). If both fail, report to user. |
Notes
- VETH inherits
. All standard ERC-4626 view functions workVToken → VTokenBase → ERC4626Upgradeable / OwnableUpgradeable / PausableUpgradeable - Exchange rates are Oracle-backed via
— may lag slightly vs. actual staking rewardsoracle.poolInfo(asset)
returnsgetWithdrawals
where each entry hasWithdrawal[]
(amount waiting in queue) andqueued
(amount being processed by Bifrost)pending- The same VETH contract address is deployed on Ethereum, Base, Optimism, and Arbitrum — but WETH (underlying asset) addresses differ per chain
reflects the global pool size from Oracle, whiletotalAssets()
is per-chain vETH circulationtotalSupply()
= BridgeVault balance + completed withdrawals — represents ETH available for immediate payoutsgetTotalBalance()