Skip to content

HkSolDev/anchor-state-sync

Repository files navigation

anchor-state-sync

A complete submission for the Ranger Build-A-Bear Hackathon | Main Track.

Prerequisites

  • Rust & Cargo
  • Anchor CLI 0.30
  • Node.js 20+
  • Solana CLI

Environment Setup

  1. Create a .env file in the app directory:
HELIUS_API_KEY=your_helius_api_key_here
WALLET_KEYPAIR=[your,wallet,bytes,...]
RPC_URL=https://mainnet.helius-rpc.com/?api-key=your_helius_api_key_here

Running the Code

  1. Install dependencies in app:
    cd app
    npm install
  2. Build and run tests:
    anchor build
    anchor test
  3. Run the Strategy Bot locally:
    cd app
    npm run start

Architecture

  • Anchor Program: Tracks strategy state, balances, and handles vault lifecycle. Emits structured events for bot ingestion.
  • TypeScript Bot: Uses Helius webhooks/logs to track states and execute periodic delta-neutral rebalances across Marginfi (base yield) and Zeta Markets (funding yield).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors