Skip to main content

Overview

The Protocol Data module provides static configuration for supported DeFi protocols on the Stacks blockchain. This data is used throughout the application for protocol selection, filtering, and AI strategy generation. Source: src/services/protocolData.js

PROTOCOLS

Array of protocol configurations with detailed metadata.
export const PROTOCOLS: Array<Protocol>

Protocol Object Structure

PROTOCOLS
array
Array of protocol configuration objects
id
string
Unique protocol identifier (lowercase, no spaces)
name
string
Display name of the protocol
type
string
Protocol category: "Lending", "DEX", "Yield", or "Stacking"
apy
string
Annual Percentage Yield (numeric string, e.g., “8.2”)
tvl
string
Total Value Locked (formatted string, e.g., “$48.2M”)
asset
string
Supported assets (e.g., “sBTC”, “STX”, “sBTC/STX”)
risk
string
Risk level: "Low", "Medium", or "High"
description
string
Short description of the protocol’s functionality
url
string
Official protocol website URL
color
string
Brand color (hex code, e.g., “#F7931A”)
icon
string
Emoji icon for visual identification

Available Protocols

Zest Protocol

Zest Protocol

Type: Lending
APY: 8.2%
TVL: $48.2M
Risk: Low
Lend and borrow Bitcoin-backed assets with transparent on-chain rates.Visit Protocol →
{
  id: 'zest',
  name: 'Zest Protocol',
  type: 'Lending',
  apy: '8.2',
  tvl: '$48.2M',
  asset: 'sBTC',
  risk: 'Low',
  description: 'Lend and borrow Bitcoin-backed assets with transparent on-chain rates.',
  url: 'https://zestprotocol.com',
  color: '#F7931A',
  icon: '🏦',
}

Bitflow

Bitflow

Type: DEX
APY: 12.4%
TVL: $31.7M
Risk: Medium
Decentralized exchange aggregator for the best sBTC swap rates on Stacks.Visit Protocol →

ALEX Lab

ALEX Lab

Type: DEX
APY: 15.1%
TVL: $124.5M
Risk: Medium
The leading Bitcoin DeFi super app — swap, earn, and launch on Stacks.Visit Protocol →

Hermetica

Hermetica

Type: Yield
APY: 18.7%
TVL: $9.8M
Risk: High
Bitcoin-backed synthetic dollar yielding protocol built on Stacks.Visit Protocol →

StackingDAO

StackingDAO

Type: Stacking
APY: 9.5%
TVL: $89.3M
Risk: Low
Liquid stacking protocol — stack STX and keep liquidity with stSTX.Visit Protocol →

Granite

Granite

Type: Lending
APY: 7.8%
TVL: $18.6M
Risk: Low
Borrow stablecoins against your Bitcoin collateral on Stacks.Visit Protocol →

Velar

Velar

Type: DEX
APY: 11.3%
TVL: $431K
Risk: Medium
Perpetuals and spot trading protocol on Bitcoin L2 via Stacks.Visit Protocol →

RISK_STYLES

CSS class mappings for risk level styling.
export const RISK_STYLES = {
  Low: 'text-green-500',
  Medium: 'text-yellow-500',
  High: 'text-red-500',
};

Usage Example

function RiskBadge({ risk }) {
  return (
    <span className={RISK_STYLES[risk]}>
      {risk} Risk
    </span>
  );
}

FILTER_TYPES

Available protocol type filters.
export const FILTER_TYPES = ['All', 'Lending', 'DEX', 'Yield', 'Stacking'];

Usage Example

import { FILTER_TYPES } from './services/protocolData';

function ProtocolFilter({ selected, onSelect }) {
  return (
    <div>
      {FILTER_TYPES.map(type => (
        <button
          key={type}
          onClick={() => onSelect(type)}
          className={selected === type ? 'active' : ''}
        >
          {type}
        </button>
      ))}
    </div>
  );
}

Usage Examples

import { PROTOCOLS } from './services/protocolData';

// Get all protocols
console.log(PROTOCOLS);

// Filter by type
const lendingProtocols = PROTOCOLS.filter(p => p.type === 'Lending');

// Sort by APY
const sortedByAPY = [...PROTOCOLS].sort((a, b) => 
  parseFloat(b.apy) - parseFloat(a.apy)
);

// Find specific protocol
const zest = PROTOCOLS.find(p => p.id === 'zest');

Protocol Statistics

Total Protocols

7 protocols supported

Average APY

11.9% across all protocols

Total TVL

$322.6M combined liquidity

Risk Distribution

3 Low, 3 Medium, 1 High risk protocols

Protocol Types

Protocols that allow lending and borrowing:
  • Zest Protocol - 8.2% APY
  • Granite - 7.8% APY
  • Average: 8.0% APY

Best Practices

Keep Data Updated

APY and TVL should be updated regularly (consider dynamic data sources)

Type Safety

Validate protocol data structure when extending or modifying

Consistent Formatting

Use consistent formats for APY (string numbers) and TVL (e.g., “$XM”)

Icon Selection

Use recognizable emojis that represent the protocol’s function

Extending Protocol Data

To add a new protocol:
const newProtocol = {
  id: 'new-protocol',           // Unique, lowercase ID
  name: 'New Protocol',         // Display name
  type: 'Lending',              // Must match FILTER_TYPES
  apy: '10.5',                  // String number
  tvl: '$25M',                  // Formatted string
  asset: 'sBTC',                // Supported assets
  risk: 'Medium',               // Low/Medium/High
  description: 'Description',   // Short pitch
  url: 'https://...',           // Official site
  color: '#000000',             // Brand color
  icon: '🎯',                   // Emoji
};

export const PROTOCOLS = [
  ...existingProtocols,
  newProtocol,
];

Build docs developers (and LLMs) love