Helix Protocol
Helix is an AI-native DeFi infrastructure protocol built on Base. It combines a self-learning neural inference engine with non-custodial smart contracts to autonomously discover, allocate, and rebalance yield positions across every major protocol on Base — in real time, on-chain, with no human in the loop.
Unlike traditional yield aggregators that rely on static strategies or off-chain oracles, Helix's inference engine runs directly on Base. Every scoring decision, every rebalancing action, every risk check is verifiable and reproducible on-chain.
Core Concepts
Key Properties
| Property | Value | Notes |
|---|---|---|
| Network | Base Mainnet | Chain ID 8453. All contracts and inference nodes run on Base. |
| Custody Model | Non-custodial | Funds never leave your wallet. Agent signs from user key via EIP-712. |
| AI Model | v2.3.1-beta | 94 inference layers, 23 Base protocols indexed, retrains every 3,200 blocks. |
| Rebalance Cycle | ~12–15s | Target: ≤ 15 seconds. Achieved average: 12.4s on testnet. |
| Token | $HLX | 500M max supply. Governance + fee capture. ERC-20 on Base. |
| Launch | Q4 2025 | Fair launch + IDO. No VC allocation. Community-first distribution. |
Quick Start
Get a yield-seeking AI agent running against Base testnet in under 5 minutes.
1. Install the SDK
# npm
npm install @helix-protocol/sdk
# yarn
yarn add @helix-protocol/sdk
# pnpm
pnpm add @helix-protocol/sdk
2. Initialize & Connect
import { HelixClient, RiskProfile } from '@helix-protocol/sdk';
// 1. Create client
const helix = new HelixClient({
chainId: 8453, // Base Mainnet
rpcUrl: 'https://mainnet.base.org',
apiKey: process.env.HELIX_API_KEY, // get at helix.finance/dashboard
});
// 2. Connect wallet (any EIP-1193 provider)
await helix.connect(window.ethereum);
// 3. Set risk profile
await helix.setRiskProfile({
type: RiskProfile.MODERATE,
maxSlippage: 0.5, // 0.5%
maxPositions: 10,
rebalanceThreshold: 2.0, // rebalance when drift exceeds 2%
protocols: ['aerodrome', 'moonwell', 'seamless', 'aave'],
});
// 4. Start the AI agent
const agent = await helix.startAgent();
console.log('Agent started:', agent.id);
console.log('Model:', agent.modelVersion); // 'v2.3.1-beta'
3. Listen to Events
agent.on('opportunity:found', (opp) => {
console.log(`Found: ${opp.protocol} | score=${opp.score} | APY~${opp.estimatedApy}%`);
});
agent.on('position:opened', (pos) => {
console.log(`Position #${pos.id} opened in ${pos.protocol}`);
console.log(`TX: ${pos.txHash}`);
});
agent.on('rebalance', (evt) => {
console.log(`Rebalanced: ${evt.reason} | delta=${evt.delta}%`);
});
agent.on('warning', (w) => console.warn(`[${w.code}] ${w.message}`));
AI Engine Architecture
The Helix Neural Inference Engine (HNEI) is a multi-layer transformer-based model that runs natively on Base. It ingests real-time on-chain data from 23 protocols and produces scored yield opportunity vectors at every block.
Neural Core (HNEI v2.3.1)
The inference engine consists of 94 attention layers organized into three subsystems:
| Subsystem | Layers | Function |
|---|---|---|
| Market Encoder | 28 layers | Encodes real-time price feeds, liquidity depth, TVL delta, and borrow rate vectors from all indexed protocols. |
| Strategy Scorer | 38 layers | Scores each (protocol, strategy) combination on a 0–100 risk-adjusted opportunity scale. Updates every block. |
| Risk Classifier | 28 layers | Classifies each scored opportunity into risk tiers (low / moderate / high) and filters against user risk profile. |
Model Training
HNEI is retrained every 3,200 blocks (~1.7 hours) on accumulated on-chain performance data. The training loop runs off-chain but the resulting model weights are committed on-chain via a verifiable proof-of-learning mechanism (Helix PoL, described in the whitepaper).
Scoring Formula
The opportunity score for a given (protocol P, strategy S) pair is computed as:
score(P, S) = w₁·RA_yield(P,S) + w₂·Liquidity_depth(P)
+ w₃·Protocol_health(P) - w₄·Risk_penalty(S)
where:
RA_yield = risk-adjusted annualized yield (Sharpe-normalized)
Liquidity_depth = log-normalized pool TVL score
Protocol_health = smart contract risk score (audit grade × age factor)
Risk_penalty = volatility × max_drawdown × correlation_to_portfolio
weights [w₁=0.38, w₂=0.22, w₃=0.24, w₄=0.16] — learnable, retrained per cycle
Risk Management
Helix operates three independent risk layers. All three must pass before any position is opened or modified.
| Layer | Check | Trigger |
|---|---|---|
| Pre-trade | Slippage simulation, gas estimate, exposure check, concentration limit | Before every TX |
| In-flight | Gas spike detection, MEV simulation, sandwich attack guard | TX submission |
| Portfolio | Drawdown threshold, correlation check, rebalance drift monitor | Every block |
Risk Profiles
enum RiskProfile {
CONSERVATIVE = 0, // Stable LPs + Lending only. Max slippage 0.2%.
MODERATE = 1, // All strategies. Max slippage 0.5%.
AGGRESSIVE = 2, // All strategies incl. volatile LPs. Max slippage 1.0%.
}
interface RiskProfileConfig {
type: RiskProfile;
maxSlippage: number; // % (e.g. 0.5 for 0.5%)
maxPositions: number; // max concurrent open positions
rebalanceThreshold: number; // drift % to trigger rebalance
minPositionSize: number; // minimum USDC equivalent
protocols?: string[]; // protocol whitelist (empty = all)
stopLoss?: number; // optional % drawdown auto-close
}
Protocol Integrations
Helix currently indexes and scores the following Base protocols. All integrations are read-only for scoring; write operations use the protocol's own audited router contracts via Helix's verifiable adapter layer.
| Protocol | Strategies | Score Range | Status |
|---|---|---|---|
| Aerodrome Finance | Stable LP, Volatile LP, veAERO | 60–95 | ✅ Live |
| Moonwell | Lending, Borrowing | 70–92 | ✅ Live |
| Seamless Protocol | Lending, Loop Leverage | 65–88 | ✅ Live |
| AAVE v3 Base | Lending, E-Mode, GHO | 72–91 | ✅ Live |
| Uniswap v3 | Concentrated LP, Range Orders | 50–80 | ✅ Live |
| Compound v3 | USDC Lending | 68–84 | ✅ Live |
| Extra Finance | Leveraged LP, Yield Vault | 55–82 | ✅ Live |
| Beefy Finance | Auto-compound Vaults | 60–78 | 🔄 Q3 2025 |
| Morpho Blue | P2P Lending | 65–85 | 🔄 Q3 2025 |
SDK Installation
Requirements
| Dependency | Version |
|---|---|
| Node.js | ≥ 18.0.0 |
| TypeScript | ≥ 5.0 (optional) |
| viem | ≥ 2.0 (peer) |
| wagmi | ≥ 2.0 (peer, optional) |
Installation
npm install @helix-protocol/sdk viem
HelixClient Constructor
const helix = new HelixClient({
chainId: 8453, // required — Base Mainnet
rpcUrl: 'https://mainnet.base.org', // required
apiKey: 'hlx_live_...', // required — from dashboard
nodeUrl?: 'https://node.helix.finance', // optional — inference node
timeout?: 30_000, // optional — ms, default 30s
logLevel?: 'info' | 'debug' | 'silent', // optional
});
Wallet Connection Methods
// Option A — Browser wallet (MetaMask, Coinbase, Rainbow…)
await helix.connect(window.ethereum);
// Option B — viem WalletClient
import { createWalletClient, custom } from 'viem';
import { base } from 'viem/chains';
const walletClient = createWalletClient({ chain: base, transport: custom(window.ethereum) });
await helix.connect({ walletClient });
// Option C — Private key (server-side only, never in browser)
await helix.connect({ privateKey: process.env.WALLET_PRIVATE_KEY });
// Option D — Read-only mode (no signing)
await helix.connect({ address: '0x...', readOnly: true });
AI Agent — Full Reference
The HelixAgent is the primary interface to the AI inference engine. Once started, it autonomously evaluates yield opportunities and manages positions according to your configured risk profile.
Starting the Agent
const agent = await helix.startAgent({
capital: 1000, // USDC equivalent to deploy
autoApprove: true, // auto-sign position TXs
simulate: false, // set true for dry-run mode
gasBuffer: 1.25, // 25% gas headroom
});
console.log(agent.id); // 'agent_0x1234...abcd_1716213045'
console.log(agent.modelVersion); // 'v2.3.1-beta'
console.log(agent.status); // 'running'
Agent Events
Agent Control
// Pause (keeps positions open, stops new actions)
await agent.pause();
// Resume after pause
await agent.resume();
// Stop and close all positions
await agent.stop({ closeAll: true });
// Stop and leave positions open
await agent.stop({ closeAll: false });
// Get live agent stats
const stats = await agent.getStats();
// { uptime, totalTx, openPositions, closedPositions, totalPnl, winRate }
Positions API
// Get all positions for connected wallet
const positions = await helix.getPositions();
// Returns: Position[]
// Get portfolio summary
const portfolio = await helix.getPortfolio();
console.log(portfolio.totalValueUsd); // 4218.54
console.log(portfolio.pnl24h); // +2.14%
console.log(portfolio.positions); // Position[]
// Open a position manually
const pos = await helix.openPosition({
protocol: 'aerodrome',
strategy: 'stable-lp',
pair: 'USDC/USDbC',
amount: '500', // USDC string
slippage: 0.3,
});
console.log(pos.txHash); // '0x...'
// Close a position
await helix.closePosition(positionId);
// Get specific position value
const val = await helix.getPositionValue(positionId);
console.log(val.usd); // current USD value
console.log(val.pnlPct); // PnL since open (%)
React & Wagmi Integration
npm install @helix-protocol/react wagmi viem @tanstack/react-query
Provider Setup
import { WagmiProvider, createConfig } from 'wagmi';
import { base } from 'wagmi/chains';
import { HelixProvider } from '@helix-protocol/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
const wagmiConfig = createConfig({ chains: [base], connectors: [...] });
const queryClient = new QueryClient();
export function App() {
return (
<QueryClientProvider client={queryClient}>
<WagmiProvider config={wagmiConfig}>
<HelixProvider apiKey={process.env.NEXT_PUBLIC_HELIX_KEY}>
<YourApp />
</HelixProvider>
</WagmiProvider>
</QueryClientProvider>
);
}
useHelix Hook
import { useHelix } from '@helix-protocol/react';
import { useAccount, useWalletClient } from 'wagmi';
export function HelixDashboard() {
const { address } = useAccount();
const { data: walletClient } = useWalletClient();
const { agent, portfolio, status, startAgent, stopAgent } = useHelix({ walletClient });
if (!address) return <button onClick={connect}>Connect Wallet</button>;
return (
<div>
<p>Status: {status}</p> // 'idle' | 'running' | 'paused'
<p>Portfolio: ${portfolio?.totalValueUsd}</p>
<p>24h PnL: {portfolio?.pnl24h}%</p>
<button onClick={startAgent}>Start AI Agent</button>
{portfolio?.positions.map(pos => (
<div key={pos.id}>{pos.protocol}: ${pos.valueUsd.toFixed(2)}</div>
))}
</div>
);
}
REST API
All REST endpoints require a Bearer API key. Rate limits: 60 req/min on free tier, 600 req/min on pro.
GET /opportunities
curl https://api.helix.finance/v1/opportunities \
-H "Authorization: Bearer hlx_live_xxxxxxxxxxxx"
{
"opportunities": [
{
"id": "opp_aerodrome_stable-lp_usdc_20250115",
"protocol": "aerodrome",
"strategy": "stable-lp",
"pair": "USDC/USDbC",
"score": 88.4,
"estimatedApy": 12.3,
"tvl": 45200000,
"risk": "low",
"confidence": 0.94
}
],
"blockNumber": 24847932,
"timestamp": "2025-01-15T10:30:00Z"
}
POST /positions
curl -X POST https://api.helix.finance/v1/positions \
-H "Authorization: Bearer hlx_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"opportunityId": "opp_aerodrome_stable-lp_usdc_20250115",
"amount": "1000",
"token": "USDC",
"slippage": 0.5,
"walletAddress": "0x..."
}'
WebSocket — Live Feed
const ws = new WebSocket('wss://ws.helix.finance/v1/stream?key=hlx_live_xxx');
ws.onmessage = ({ data }) => {
const msg = JSON.parse(data);
if (msg.type === 'opportunity') console.log('New opp:', msg.payload);
if (msg.type === 'block') console.log('Block:', msg.blockNumber);
};
Contract Deployments
All contracts are deployed on Base Goerli testnet. Mainnet addresses will be published here at launch. Contracts are verified on Basescan.
Core Contracts
ABI Reference
IHelixRouter
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IHelixRouter {
struct DepositParams {
address token;
uint256 amount;
uint8 riskProfile; // 0=conservative 1=moderate 2=aggressive
uint16 maxSlippage; // basis points (50 = 0.5%)
bytes32 strategyId; // keccak256 of strategy identifier
}
event PositionOpened(
uint256 indexed positionId,
address indexed user,
address token,
uint256 amount,
bytes32 strategyId
);
event PositionClosed(
uint256 indexed positionId,
address indexed user,
uint256 returned,
int256 pnl
);
function deposit(DepositParams calldata params)
external returns (uint256 positionId);
function withdraw(uint256 positionId, uint256 amount)
external returns (uint256 received);
function rebalance(uint256[] calldata positionIds) external;
function getPositionValue(uint256 positionId)
external view returns (uint256 value);
function getActivePositions(address user)
external view returns (uint256[] memory);
}
Governance
Helix Protocol is governed by $HLX token holders. All protocol parameters — from supported protocols to risk engine weights to fee distribution — are controlled by on-chain proposals and votes.
Voting Power
Voting power is determined by veHLX — vote-escrowed $HLX. Lock your tokens for 1 week to 4 years. Longer locks grant proportionally more voting power (1 year = 1.0x, 4 years = 4.0x).
Governance via SDK
const gov = helix.governance();
// Get active proposals
const proposals = await gov.getProposals({ state: 'active' });
// Vote on a proposal (requires veHLX balance)
await gov.castVote({
proposalId: 7,
support: true, // true=for, false=against, null=abstain
reason: 'Aerodrome integration increases yield diversity',
});
// Lock HLX for voting power
await gov.lock({
amount: '10000', // HLX tokens
durationDays: 365, // 1 year lock = 1x voting power
});
// Submit a proposal (requires 100k veHLX)
await gov.propose({
title: 'Add Beefy Finance integration',
description: 'Integrate Beefy auto-compound vaults as a yield source...',
calldata: encodedCalldata, // on-chain execution payload
});
Proposal Lifecycle
| Stage | Duration | Description |
|---|---|---|
| Pending | 2 days | Proposal submitted, community discussion period begins. |
| Active | 5 days | Voting open. Quorum required: 4% of total veHLX supply. |
| Timelock | 2 days | Passed proposals enter 48-hour security delay before execution. |
| Executed | — | On-chain execution complete. Changes take effect immediately. |
$HLX Tokenomics
Distribution
| Allocation | % | Amount | Vesting |
|---|---|---|---|
| Community / Fair Launch | 40% | 200M HLX | No lock. Distributed via IDO + LP incentives at launch. |
| Protocol Treasury | 25% | 125M HLX | Governance-controlled. 2-year linear vest from TGE. |
| Ecosystem Grants | 15% | 75M HLX | Builder grants, integrations, hackathons. Governance-managed. |
| Liquidity Incentives | 12% | 60M HLX | LP rewards, emitted over 3 years via gauge system. |
| Core Contributors | 8% | 40M HLX | 4-year vest, 12-month cliff. No allocation at TGE. |
Token Utility
$HLX has three core utility functions within the Helix ecosystem:
| Function | Mechanism |
|---|---|
| Governance | Lock $HLX to receive veHLX. veHLX grants voting power proportional to lock duration. |
| Fee Capture | 20% of protocol performance fees are used to buy-back and burn $HLX via open-market operations. |
| Boosted Yields | Staking $HLX boosts AI agent yield allocations by up to 2.5x (governed parameter). |
Security & Audits
Audit Schedule
| Auditor | Scope | Status | ETA |
|---|---|---|---|
| Trail of Bits | HelixRouter, HelixVault, InferenceNode, adapter layer | In Progress | Q3 2025 |
| OpenZeppelin | HLX ERC-20, GovernorHelix, TimelockController | In Progress | Q3 2025 |
| Spearbit | Economic security review, tokenomics model | Scheduled | Q3 2025 |
Bug Bounty
The Helix bug bounty program is live on Immunefi. Rewards scale by severity:
| Severity | Reward |
|---|---|
| Critical | Up to $100,000 |
| High | $10,000 – $50,000 |
| Medium | $2,000 – $10,000 |
| Low | $500 – $2,000 |
Security Design Principles
| Principle | Implementation |
|---|---|
| Non-custodial | User funds never enter Helix contracts. Agent operates via delegated signing (EIP-712). |
| Upgradeable | All core contracts are upgradeable via UUPS pattern, gated by 48-hour governance timelock. |
| Circuit breakers | On-chain circuit breakers pause all operations if TVL drops >15% in 1 hour or gas exceeds 500 gwei. |
| Slippage guards | All trade executions validate slippage at TX time, not at signature time, preventing stale data attacks. |