Skip to main content

GET /api/staking

Fetches current APY data and pool statistics for all supported Vesu lending pools.

Response

Returns an array of pool data objects:
slug
string
Pool identifier: prime or re7-xbtc
name
string
Human-readable pool name
poolId
string
Vesu pool contract address
supplyApy
number
Base lending APY from borrower interest (%)
btcFiApr
number
STRK BTCFi Season rewards APR (%)
totalApy
number
Combined APY: supply APY + BTCFi APR (%)
utilization
number
Pool utilization rate (0-1)
tvlUsd
number
Total value locked in USD
totalSupplied
number
Total WBTC supplied (human-readable BTC units)
btcPrice
number
Current BTC price in USD
borrowApr
number
Borrow APR (%)

Example Request

curl https://sable.money/api/staking

Example Response

[
  {
    "slug": "prime",
    "name": "Vesu PRIME",
    "poolId": "0x0451fe483d5921a2919ddd81d0de6696669bccdacd859f72a4fba7656b97c3b5",
    "supplyApy": 2.34,
    "btcFiApr": 12.56,
    "totalApy": 14.90,
    "utilization": 0.67,
    "tvlUsd": 12450000,
    "totalSupplied": 121.5,
    "btcPrice": 102450,
    "borrowApr": 4.12
  },
  {
    "slug": "re7-xbtc",
    "name": "Vesu Re7 xBTC",
    "poolId": "0x03a8416bf20d036df5b1cf3447630a2e1cb04685f6b0c3a70ed7fb1473548ecf",
    "supplyApy": 1.89,
    "btcFiApr": 18.23,
    "totalApy": 20.12,
    "utilization": 0.72,
    "tvlUsd": 8920000,
    "totalSupplied": 87.1,
    "btcPrice": 102450,
    "borrowApr": 3.45
  }
]

Supported Pools

Source: /home/daytona/workspace/source/src/app/api/staking/route.ts:5

Vesu PRIME

  • Pool ID: 0x0451fe483d5921a2919ddd81d0de6696669bccdacd859f72a4fba7656b97c3b5
  • vToken: 0x04ecb0667140b9f45b067d026953ed79f22723f1cfac05a7b26c3ac06c88f56c
  • Symbol: vWBTC
  • Risk Level: Low (1/5)
  • Description: Supply WBTC to Vesu’s flagship PRIME lending pool

Vesu Re7 xBTC

  • Pool ID: 0x03a8416bf20d036df5b1cf3447630a2e1cb04685f6b0c3a70ed7fb1473548ecf
  • vToken: 0x0131cc09160f144ec5880a0bc1a0633999030fa6a546388b5d0667cb171a52a0
  • Symbol: vWBTC-Re7xBTC
  • Risk Level: Low-Medium (2/5)
  • Description: Enhanced BTCFi rewards during incentive program

Data Source

Implementation: /home/daytona/workspace/source/src/app/api/staking/route.ts:10 The endpoint uses fetchVesuWbtcData() from the Vesu API client to fetch real-time pool data including:
  • On-chain pool state (utilization, TVL)
  • Oracle price feeds (BTC price)
  • BTCFi Season rewards APR from Vesu’s rewards program

Caching

The API includes cache headers:
Cache-Control: public, s-maxage=30, stale-while-revalidate=60
This provides:
  • 30-second CDN cache
  • Up to 60 seconds of stale data during revalidation
  • Reduced load on Vesu API endpoints

Frontend Integration

Use the useStakingPools() hook for automatic polling and state management:
import { useStakingPools } from '@/hooks/use-staking';

function StakingDashboard() {
  const { pools, loading, error } = useStakingPools();
  
  if (loading) return <div>Loading pools...</div>;
  if (error) return <div>Error: {error}</div>;
  
  return (
    <div>
      {pools.map(pool => (
        <div key={pool.config.slug}>
          <h3>{pool.config.name}</h3>
          <p>Total APY: {pool.totalApy.toFixed(2)}%</p>
          <p>TVL: ${(pool.tvlUsd / 1e6).toFixed(2)}M</p>
        </div>
      ))}
    </div>
  );
}
See Staking Hook for complete hook documentation.

Build docs developers (and LLMs) love