Eagle Finance.
Eagle Finance is a full-stack decentralized exchange and automated market maker deployed natively on the Massa blockchain. Built to leverage Massa's parallel block DAG architecture and autonomous smart contracts, the platform couples audited constant-product liquidity pools with an asynchronous Rust indexing pipeline that processes gRPC block streams through Redis Streams into TimescaleDB, serving sub-second routing and high-resolution financial charts.
- Role
- Protocol & Backend Engineer · Dar Blockchain
- Domain
- Massa blockchain · Automated Market Maker (AMM) · gRPC streaming · Real-time indexing · High-frequency analytics
System at a glance
What the system does
Constant-product AMM & flash loans
gRPC parallel-block event streaming
TimescaleDB OHLCV & market analytics
Exact U256 multi-hop swap routing
Architecture flow
From intent to verified state.
- 01
Traders interact with Massa smart contracts for swaps, liquidity provisioning, and flash loans via Web3 wallets.
- 02
The custom rust-massa-web3 SDK maintains persistent gRPC streaming subscriptions to Massa node execution feeds.
- 03
A high-throughput Rust event ingestor decodes binary contract events and publishes normalized messages to Redis Streams.
- 04
TimescaleDB consumers aggregate real-time liquidity and generate OHLCV candlestick rollups across multiple intervals.
- 05
An Actix Web API executes graph-based multi-hop swap discovery in U256 arithmetic and delivers low-latency market data.
01 / Smart contracts
Audited AMM smart contracts on Massa's parallel runtime
Engineered in AssemblyScript for Massa's WASM engine with strict invariants and uncollateralized lending mechanics.
Factory and pool architecture
Pairs are deployed through an autonomous factory contract maintaining registry state and reserve ratios, implementing constant-product x * y = k invariant enforcement with automated fee collection.
Flash-loan execution
Enables uncollateralized single-transaction borrowing with strict reentrancy protection and mandatory fee return validation before execution completion.
Native AssemblyScript & WASM arithmetic
Contracts are optimized for Massa's WASM engine using as-bignum for 256-bit unsigned integer calculations, preventing overflow and rounding vulnerabilities.
02 / Node connectivity
rust-massa-web3: Open-source gRPC client and serialization
A high-performance Rust client layer providing strongly typed access to Massa node interfaces.
Tonic gRPC client
High-performance asynchronous gRPC transport with automated reconnection, channel pooling, and typed streaming event subscriptions across Massa node instances.
Binary serialization & cryptography
Implements custom wire serialization matching Massa's byte format, including Ed25519 signature verification, public key derivation, and transaction payload construction.
Open-source ecosystem foundation
Engineered as a reusable, open-source Rust SDK that enables backend services and automated trading bots to interact reliably with the Massa blockchain.
03 / Ingestion pipeline
Parallel DAG event streaming with Redis Streams
Decoupling fast consensus event production from durable database ingestion.
DAG-aware event handling
Massa's parallel thread architecture produces simultaneous blocks; the ingestor de-duplicates and orders cross-thread contract executions deterministically.
Decoupled event buffering
Redis Streams act as a backpressure-resistant message broker between the fast blockchain node stream and database write operations.
State reconciliation & recovery
Checkpoint mechanisms record processed block slots, enabling immediate resume and zero event loss after service restarts or network re-organizations.
04 / Market analytics
TimescaleDB hypertables and multi-hop routing
Transforming raw trade events into real-time analytics and optimal execution paths.
Continuous OHLCV aggregates
Trades trigger hypertable inserts that continuously compute 1m, 5m, 15m, 1h, and 1d candlestick snapshots and volume rollups without blocking live queries.
Exact U256 graph routing
Traverses pool graphs to discover optimal swap paths across multiple token hops while factoring in price impact, slippage tolerances, and pool fee tiers.
Sub-second Actix Web API
Exposes cached liquidity depth, token prices, and historical performance metrics with microsecond query caching and interactive OpenAPI documentation.