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 | INLINECODE0 | INLINECODE1 | INLINECODE2 | INLINECODE3 |
| Base |
8453 |
0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 |
0x4200000000000000000000000000000000000006 |
https://base.publicnode.com |
https://1rpc.io/base |
| Optimism | 10 |
0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 |
0x4200000000000000000000000000000000000006 |
https://optimism.publicnode.com |
https://1rpc.io/op |
| Arbitrum | 42161 |
0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 |
0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 |
https://arbitrum-one.publicnode.com |
https://1rpc.io/arb |
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 |
|---|
| INLINECODE16 | Target chain name (ethereum, base, optimism, arbitrum) | INLINECODE21 |
| INLINECODE22 |
Custom RPC endpoint | Per-chain default from table above |
|
BIFROST_VETH_ADDRESS | VETH contract address (override) |
0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 |
Bifrost Backend API
Protocol-level statistics available via the Bifrost REST API (no RPC needed):
CODEBLOCK0
Returns JSON with vETH object containing:
| Field | Description |
|---|
| INLINECODE26 | Total APY (Base + Farming), e.g. INLINECODE27 |
| INLINECODE28 |
Base staking APY from Ethereum validators, e.g.
"3.12" |
|
apyReward | Additional Bifrost farming reward APY, e.g.
"5.12" |
|
tvl | Total value locked in USD |
|
tvm | Total vETH minted (in ETH) |
|
totalIssuance | Total vETH supply (on Bifrost chain) |
|
holders | 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 | INLINECODE37 | INLINECODE38 | none | string | Returns INLINECODE39 |
| Token symbol |
symbol() |
0x95d89b41 | none | string | Returns
"vETH" |
| Decimals |
decimals() |
0x313ce567 | none | uint8 | Returns
18 |
| Underlying asset |
asset() |
0x38d52e0f | 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 | INLINECODE48 | INLINECODE49 | assets (wei) | uint256 (shares) | Convert an ETH amount to the equivalent vETH shares using the current Oracle exchange rate |
| vETH → ETH rate |
convertToAssets(uint256) |
0x07a2d13a | shares (wei) | uint256 (assets) | Convert a vETH shares amount to the equivalent ETH value using the current Oracle exchange rate |
| Preview deposit |
previewDeposit(uint256) |
0xef8b30f7 | assets (wei) | uint256 (shares) | Simulate a deposit and return the exact vETH shares that would be minted |
| Preview mint |
previewMint(uint256) |
0xb3d7f6b9 | shares (wei) | uint256 (assets) | Simulate minting a specific amount of vETH shares and return the ETH required |
| Preview withdraw |
previewWithdraw(uint256) |
0x0a28a477 | assets (wei) | uint256 (shares) | Simulate withdrawing a specific ETH amount and return the vETH shares that would be burned |
| Preview redeem |
previewRedeem(uint256) |
0x4cdad506 | 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 | INLINECODE60 | INLINECODE61 | owner address | uint256 | Get the vETH token balance of a specific address |
| Claimable ETH |
canWithdrawalAmount(address) |
0x52a630b9 | target address | (uint256, uint256, uint256) | Returns
(totalAvailableAmount, pendingDeleteIndex, pendingDeleteAmount). First value = ETH ready to claim |
| Withdrawal queue |
getWithdrawals(address) |
0x3a2b643a | target address | Withdrawal[] | Returns array of withdrawal entries, each with
queued (amount in queue) and
pending (amount being processed) fields |
| Max redeemable |
maxRedeem(address) |
0xd905777e | owner address | uint256 | Maximum vETH shares the owner can redeem in a single tx |
| Max withdrawable |
maxWithdraw(address) |
0xce96cb77 | owner address | uint256 | Maximum ETH the owner can withdraw in a single tx |
| Max depositable |
maxDeposit(address) |
0x402d267d | receiver address | uint256 | Maximum ETH that can be deposited for receiver (typically type(uint256).max = unlimited) |
| Max mintable |
maxMint(address) |
0xc63d75b6 | receiver address | uint256 | Maximum vETH shares that can be minted for receiver (typically type(uint256).max = unlimited) |
| Allowance |
allowance(address,address) |
0xdd62ed3e | owner, spender | uint256 | Check vETH spending allowance granted by owner to spender |
Protocol Statistics
| Query | Function | Selector | Args | Returns | Description |
|---|
| Total assets | INLINECODE79 | INLINECODE80 | none | uint256 | Total ETH managed by the vault, sourced from Oracle INLINECODE81 |
| Total supply |
totalSupply() |
0x18160ddd | none | uint256 | Total vETH tokens in circulation on this chain |
| Vault balance |
getTotalBalance() |
0x12b58349 | none | uint256 | ETH available for payouts (BridgeVault balance + completed withdrawals) |
| Queued withdrawals |
queuedWithdrawal() |
0x996e5c06 | none | uint256 | Total ETH amount currently queued for withdrawal globally |
| Completed withdrawals |
completedWithdrawal() |
0x63ea1b92 | none | uint256 | Total ETH amount that has completed withdrawal processing globally |
| Max withdraw count |
maxWithdrawCount() |
0xdc692cd7 | none | uint256 | Maximum number of concurrent pending withdrawal entries per user |
| Paused |
paused() |
0x5c975abb | 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)
CODEBLOCK1
Example — query exchange rate for 1 ETH on Ethereum:
CODEBLOCK2
Method B: curl + JSON-RPC (if cast unavailable)
CODEBLOCK3
Calldata Encoding
- - No-arg functions: calldata = selector only (e.g.,
0x01e1d114 for totalAssets()) - uint256 arg: selector + amount in hex, left-padded to 64 chars
- Example: 1 ETH =
0xDE0B6B3A7640000 → pad to
0000000000000000000000000000000000000000000000000de0b6b3a7640000
- - address arg: selector + address (no 0x), left-padded to 64 chars
- Example:
0xAbCd...1234 → INLINECODE100
Response Decoding
- - curl returns
{"result":"0x<hex>"}. For single uint256: convert 64 hex chars to decimal, divide by 1e18. - INLINECODE102 returns 3 × uint256 (192 hex chars):
(totalAvailableAmount, pendingDeleteIndex, pendingDeleteAmount). First 64 chars = claimable ETH amount.
Agent Behavior
- 1. Environment check: on first interaction, ask user if they want to configure
BIFROST_CHAIN or BIFROST_RPC_URL. If not, use Ethereum Mainnet defaults - RPC selection: use
BIFROST_RPC_URL if set; otherwise use per-chain default RPC. Fall back to per-chain fallback RPC on failure - 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
canWithdrawalAmount first value > 0, indicate claimable and suggest "claim my redeemed ETH" - Prefer
cast call; fall back to curl + JSON-RPC with pre-computed calldata if cast fails - 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 INLINECODE110 |
"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)." |
|
execution reverted | Retry with alternate method (cast ↔ curl). If both fail, report to user. |
Notes
- 1. VETH inherits
VToken → VTokenBase → ERC4626Upgradeable / OwnableUpgradeable / PausableUpgradeable. All standard ERC-4626 view functions work - Exchange rates are Oracle-backed via
oracle.poolInfo(asset) — may lag slightly vs. actual staking rewards - INLINECODE114 returns
Withdrawal[] where each entry has queued (amount waiting in queue) and pending (amount being processed by Bifrost) - The same VETH contract address is deployed on Ethereum, Base, Optimism, and Arbitrum — but WETH (underlying asset) addresses differ per chain
- INLINECODE118 reflects the global pool size from Oracle, while
totalSupply() is per-chain vETH circulation - INLINECODE120 = BridgeVault balance + completed withdrawals — represents ETH available for immediate payouts
Bifrost SLPx 信息
通过对VETH ERC-4626金库合约进行链上调用,查询Bifrost vETH流动性质押数据。
合约与网络
vETH部署在以太坊和三个L2网络上。所有链使用相同的合约地址。
| 链 | 链ID | VETH合约 | WETH(基础资产) | 默认RPC | 备用RPC |
|---|
| 以太坊 | 1 | 0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 | https://ethereum.publicnode.com | https://1rpc.io/eth |
| Base |
8453 | 0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 | 0x4200000000000000000000000000000000000006 | https://base.publicnode.com | https://1rpc.io/base |
| Optimism | 10 | 0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 | 0x4200000000000000000000000000000000000006 | https://optimism.publicnode.com | https://1rpc.io/op |
| Arbitrum | 42161 | 0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 | 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 | https://arbitrum-one.publicnode.com | https://1rpc.io/arb |
配置(环境变量)
首次运行时,询问用户是否要配置自定义设置。如果不配置,则使用上述默认值。
| 变量 | 描述 | 默认值 |
|---|
| BIFROSTCHAIN | 目标链名称(ethereum、base、optimism、arbitrum) | ethereum |
| BIFROSTRPC_URL |
自定义RPC端点 | 上表中各链的默认值 |
| BIFROST
VETHADDRESS | VETH合约地址(覆盖) | 0xc3997ff81f2831929499c4eE4Ee4e0F08F42D4D8 |
Bifrost后端API
通过Bifrost REST API获取协议级统计数据(无需RPC):
GET https://api.bifrost.app/api/site
返回包含vETH对象的JSON,其中包含:
| 字段 | 描述 |
|---|
| apy | 总年化收益率(基础+农耕),例如8.24 |
| apyBase |
来自以太坊验证者的基础质押年化收益率,例如3.12 |
| apyReward | 额外的Bifrost农耕奖励年化收益率,例如5.12 |
| tvl | 以美元计价的锁定总价值 |
| tvm | 已铸造的vETH总量(以ETH计) |
| totalIssuance | vETH总供应量(在Bifrost链上) |
| holders | 所有链上的vETH持有者数量 |
当用户询问年化收益率、收益、TVL或持有者数量时,使用此API。
快速参考
VETH是一个ERC-4626金库,继承自VToken → VTokenBase → ERC4626Upgradeable。所有标准ERC-4626视图函数均可用。汇率由预言机支持。
代币信息
| 查询 | 函数 | 选择器 | 参数 | 返回值 | 描述 |
|---|
| 代币名称 | name() | 0x06fdde03 | 无 | string | 返回Bifrost Voucher ETH |
| 代币符号 |
symbol() | 0x95d89b41 | 无 | string | 返回vETH |
| 小数位数 | decimals() | 0x313ce567 | 无 | uint8 | 返回18 |
| 基础资产 | asset() | 0x38d52e0f | 无 | address | 返回WETH地址(各链不同,请参见合约与网络表) |
汇率查询
| 查询 | 函数 | 选择器 | 参数 | 返回值 | 描述 |
|---|
| ETH → vETH汇率 | convertToShares(uint256) | 0xc6e6f592 | assets(wei) | uint256(份额) | 使用当前预言机汇率将ETH数量转换为等值vETH份额 |
| vETH → ETH汇率 |
convertToAssets(uint256) | 0x07a2d13a | shares(wei) | uint256(资产) | 使用当前预言机汇率将vETH份额数量转换为等值ETH价值 |
| 预览存款 | previewDeposit(uint256) | 0xef8b30f7 | assets(wei) | uint256(份额) | 模拟存款并返回将铸造的确切vETH份额 |
| 预览铸造 | previewMint(uint256) | 0xb3d7f6b9 | shares(wei) | uint256(资产) | 模拟铸造特定数量的vETH份额并返回所需的ETH |
| 预览提现 | previewWithdraw(uint256) | 0x0a28a477 | assets(wei) | uint256(份额) | 模拟提现特定ETH数量并返回将销毁的vETH份额 |
| 预览赎回 | previewRedeem(uint256) | 0x4cdad506 | shares(wei) | uint256(资产) | 模拟赎回并返回将返还的确切ETH |
用户余额与提现查询
| 查询 | 函数 | 选择器 | 参数 | 返回值 | 描述 |
|---|
| vETH余额 | balanceOf(address) | 0x70a08231 | 所有者地址 | uint256 | 获取指定地址的vETH代币余额 |
| 可领取ETH |
canWithdrawalAmount(address) | 0x52a630b9 | 目标地址 | (uint256, uint256, uint256) | 返回(totalAvailableAmount, pendingDeleteIndex, pendingDeleteAmount)。第一个值 = 可领取的ETH |
| 提现队列 | getWithdrawals(address) | 0x3a2b643a | 目标地址 | Withdrawal[] | 返回提现条目数组,每个条目包含queued(队列中的金额)和pending(正在处理的金额)字段 |
| 最大可赎回量 | maxRedeem(address) | 0xd905777e | 所有者地址 | uint256 | 所有者单次交易可赎回的最大vETH份额 |
| 最大可提现量 | maxWithdraw(address) | 0xce96cb77 | 所有者地址 | uint256 | 所有者单次交易可提现的最大ETH |
| 最大可存入量 | maxDeposit(address) | 0x402d267d | 接收者地址 | uint256 | 可为接收者存入的最大ETH(通常为type(uint256).max = 无限制) |
| 最大可铸造量 | maxMint(address) | 0xc63d75b6 | 接收者地址 | uint256 | 可为接收者铸造的最大vETH份额(通常为type(uint256).max = 无限制) |
| 授权额度 | allowance(address,address) | 0xdd62ed3e | 所有者,授权者 | uint256 | 检查所有者授予授权者的vETH花费授权额度 |
协议统计
| 查询 | 函数 | 选择器 | 参数 | 返回值 | 描述 |
|---|
| 总资产 | totalAssets() | 0x01e1d114 | 无 | uint256 | 金库管理的ETH总量,来自预言机poolInfo(asset) |
| 总供应量 |
totalSupply() | 0x18160ddd | 无 | uint256 | 此链上流通的vETH代币总量 |
| 金库余额 | getTotalBalance() | 0x12b58349