Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

172 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arrakis Solana Expansion – Engineering Lead Technical Challenge

PART 1 – Solana Smart Contract

Challenge Overview

Arrakis is evaluating an expansion of its liquidity-orchestration products to Solana. Design and implement a minimal Solana smart contract (SVM, Rust) that performs the following core Arrakis-style primitive:

Vault Requirements:

  1. Accept deposits of a token pair (e.g. USDC/SOL) from a single LP (not multiple LPs)
  2. Track shares and total supply safely
  3. Allow a whitelisted manager address to execute a "rebalance instruction" (simulating Arrakis strategies)
  4. Emit structured events that downstream indexers can reliably consume
  5. Deploy a full range liquidity on Orca

Deliverables:

  • A small repo (Rust smart contract + client test)
  • A 1–2 page explanation of key design decisions and security considerations
  • A note on how you would evolve this into a production-ready vault system

Solution Summary

Implemented an Anchor-based vault smart contract with the following features:

  • PDA-based authority management for secure vault control
  • Safe token accounting with overflow protection
  • CPI integration with Orca Whirlpool via adapter pattern
  • Structured event emission for reliable indexer consumption
  • Production observability through feature-gated OpenTelemetry tracing
  • Solana-native patterns including proper account validation and compute optimization
  • Security-first design minimizing attack surfaces and preventing reentrancy
  • Comprehensive error handling and extensibility for multi-LP support

📁 View Solution →


PART 2 – Data Infrastructure + Low-Latency Indexer Architecture

Challenge Overview

Draft a high-level system architecture for a low-latency Solana data pipeline that:

  • Streams and processes real-time data relevant to vault rebalances (DEX state, pool ticks, orderbook snapshots, funding, prices)
  • Exposes index endpoints used both by internal quant dashboards and user-facing dashboards
  • Tolerates Solana's quirks
  • Supports backfilling and state reconstruction for strategies

Key Requirements:

  • Data model and snapshotting frequency
  • How you ensure latency, correctness, deduplication, and consistency
  • Failover strategies
  • Tradeoffs between using existing indexers vs running our own

Deliverable: 1-3 page mini-RFC with diagrams

Solution Summary

Designed a multi-tier indexing architecture with the following components:

  • Geyser plugins for low-latency state streaming (<100ms)
  • TimescaleDB for time-series storage
  • Redis cache layers for sub-second query responses
  • Slot-based checkpointing with Merkle tree validation for consistency
  • Deduplication via transaction signatures and slot numbers
  • Horizontal scaling through sharded account update processing
  • Circuit breakers for RPC failover
  • Custom indexers for fine-grained Orca-specific data structures
  • Incremental snapshots enabling state reconstruction at any slot for backtesting

📁 View Solution →


PART 3 – Execution Lifecycle + Strategy Ops

Challenge Overview

Describe how you would architect the strategy execution lifecycle for Arrakis on Solana:

  • How you schedule/trigger rebalances
  • How you manage signing infrastructure, multi-sig, and risk isolation
  • Transaction batching, priority fees, retrials, health checks
  • Observability and correctness verification
  • How you would run "dry-run simulations" before submitting live transactions

Deliverables:

  • Code snippet of a rebalance transaction bundle
  • Conflict resolution when state changes mid-execution
  • 1–2 page write-up

Solution Summary

Designed a robust execution pipeline with the following features:

  • Event-driven triggers via WebSocket slot subscriptions and threshold monitors
  • Multi-sig security using Squads Protocol with role-based access control
  • Versioned transactions with lookup tables for compute efficiency
  • Dynamic priority fees via percentile analysis of recent transactions
  • Exponential backoff retries with jitter to avoid thundering herd
  • Pre-flight simulations against forked state to validate execution paths
  • Optimistic locking with slot-based versioning for conflict resolution
  • OpenTelemetry instrumentation tracking latency, success rates, and slippage
  • Automatic re-simulation on state mismatches with graceful abort mechanisms

📁 View Solution →


PART 4 – Solana DEX & MM Landscape Forensics Research

Challenge Overview

Choose one USDC-SOL or USDC-BTC pool on Solana and perform a short forensic analysis:

  • How is liquidity provided?
  • Who are the market makers?
  • What are their on-chain behavior patterns?
  • How do execution flows look (Jupiter, Phoenix, Orca, Raydium, OpenBook)?
  • What opportunities or pitfalls exist for an Arrakis-style strategy?

Deliverable: 1-2 page research memo with charts, traces, or data from public indexers

Solution Summary

Analyzed the Orca USDC-SOL Concentrated Liquidity Pool (CLMM) with the following findings:

  • Liquidity concentration: Top 5 active wallets control 42.36% of 24-hour trading volume
  • Market maker behavior: Tight range provision (0.1% around spot), just-in-time liquidity, proactive rebalancing every 2-4 hours
  • Execution flows: Jupiter aggregator routes 25% of volume through Orca pools, with arbitrage loops between Orca/Raydium
  • Opportunities: Automated active management (15-25% APY potential), fee compounding, MEV capture/mitigation
  • Pitfalls: Impermanent loss amplification, transaction congestion risk, oracle dependency, protocol risk
  • Performance baseline: Orca SOL-USDC pool shows 30-day average APY of 10.89% (passive)

📁 View Solution →


PART 5 – BONUS: Engineering Delivery Framework & Organizational Plan

Overview

Designed a complete engineering delivery framework spanning strategic vision, organizational structure, phased execution roadmap, and operational excellence.

Key Components:

  1. Strategic Vision & Goals - Success metrics and market positioning
  2. Team Structure & Roles - Cross-functional squads (Protocol, Infrastructure, Frontend, DevOps)
  3. Development Phases - Milestone-driven sprints (MVP → Testnet → Mainnet Beta → Full Production)
  4. Technical Architecture - System components and integration points
  5. Security & Risk Management - Audit processes, incident response, and compliance
  6. Quality Assurance - Testing strategies and performance benchmarks
  7. DevOps & Infrastructure - CI/CD pipelines and monitoring systems
  8. Go-to-Market & Client Onboarding - User acquisition and onboarding workflows

This framework ensures coordinated execution across engineering teams while maintaining high quality standards and rapid iteration cycles.

📁 View Solution →


Copyright (c) 2025 Stanislav Toman

About

Arrakis Solana expansion technical challenge: (1) Anchor vault smart contract with Orca integration, (2) low-latency data infrastructure, (3) execution lifecycle architecture, (4) DEX liquidity forensics analysis. (5) Delivery framework and organization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages