The protocol is deployed on Ethereum Sepolia testnet (M2 milestone). All tokens are test tokens with
no monetary value. Do not use real funds.
A global market, open onchain
Foreign exchange is the largest financial market in the world, with over $7 trillion traded daily, yet access remains limited and infrastructure largely unchanged for decades. Nile Markets brings FX trading onchain:Open participation
Anyone can take positions on global currency pairs
Programmable hedging
Smart-contract strategies for treasury and risk
Continuous liquidity
Shared pool acts as counterparty to every trade
Automated settlement
Positions settle onchain at maturity, no intermediary
Dated FX markets
Most crypto derivatives rely on perpetual futures. Nile Markets instead focuses on dated markets, where positions have a fixed maturity. Each market represents a forward contract on a currency pair, allowing users to lock in an exchange rate for settlement at a future date.Currency hedging
Currency hedging
Lock in a future rate to protect revenue or liabilities denominated in a foreign currency.
Interest-rate-differential yield
Interest-rate-differential yield
Capture the carry between two currencies by holding a forward to maturity.
Structured products
Structured products
Build bespoke payoffs by combining forwards with other onchain primitives.
Programmable treasury
Programmable treasury
Automate FX exposure management via scheduled or rule-based contract calls.
Pooled liquidity and clearing mechanics
All trades interact with a shared liquidity pool that acts as the protocol’s central counterparty. This architecture differs from order book exchanges where traders match directly with each other.Spreads rebalance the book
Tighter pricing attracts offsetting flow, wider pricing deters further concentration.
Programmable currency markets
Because markets live onchain, Nile Markets can serve as infrastructure for a new generation of financial applications — automated treasury hedging, structured yield vaults, currency-hedged investment products, and programmable FX strategies. By combining global currency markets with smart contracts, Nile Markets aims to make FX trading open, programmable, and accessible to anyone.Key Features
Non-Deliverable Forwards
Trade FX forward contracts on any supported currency pair, with multiple maturities: 1-day, 1-week, and 1-month. Positions
settle at the fixing price for the traded currency pair on the maturity date — no physical currency delivery required.
Zero-Sum Pool Model
Liquidity providers deposit USDC into an ERC-4626 vault that serves as the counterparty to every
trade. When traders profit, the pool pays. When traders lose, the pool gains. Fees are extracted
separately on every open, close, and settlement.
Isolated Margin
Each position’s risk is contained to its own locked margin. A liquidation on one position does not
affect other positions or free collateral held by the same trader. Bad debt is absorbed by the pool,
not by other traders.
Permissionless Settlement
Anyone can settle matured positions or liquidate underwater ones. The keeper service automates this,
but the smart contracts impose no restrictions on who may call settlement or liquidation functions.
Pyth Oracle Integration
Real-time FX spot prices for all supported currency pairs are sourced from Pyth Network. Forward prices are computed off-chain
using interest-rate parity and published onchain by the authorized publisher service, with
safeguard checks on price movement, staleness, and deviation.
Multiple Integration Paths
Access the protocol via TypeScript SDK, GraphQL subgraph, MCP server, x402 pay-per-call API,
CLI tool, or direct smart contract interaction. Built for both human developers and AI agents.
Who Is This For?
- Traders
- Liquidity Providers
- Developers
- AI Agents
Speculate on or hedge FX exchange rate movements across any supported currency pair using non-deliverable forward (NDF) contracts. Choose
your tenor (1D, 1W, 1M), side (LONG or SHORT), and leverage (up to 50x). Positions settle
automatically at maturity, or you can close early at the current forward price.
- Open positions with as little as 2% initial margin (default)
- Monitor real-time PnL as forward prices move
- Add or remove margin to manage risk
- Close positions early or let them settle at maturity
Current Status
The project follows a milestone-based roadmap:| Milestone | Status | Description |
|---|---|---|
| M0 (Dev Preview) | Complete | Local Anvil chain, mock oracle, manual admin operations |
| M1 (Internal Demo) | Complete | Sepolia testnet, Pyth integration, publisher service |
| M2 (External Testnet) | Current | Full features, keeper automation, subgraph, SDK |
| M3 (Mainnet Ready) | Planned | Professional audit, formal verification, production ops |
Next Steps
By Role
- Traders
- Liquidity Providers
- Developers
Non-Deliverable Forwards
What FX forwards are and how they work onchain
Trading Scenarios
Hedging, speculation, and carry trade examples
Margin Model
How margin, leverage, and liquidation work
Forwards vs Perpetuals
When forwards beat perps
Liquidation
How and when positions get liquidated
Fee Structure
Trading fees, liquidation penalties, oracle fees
Overview
How It Works
Understand the core trading loop, forward pricing, margin model, and settlement mechanics.
Architecture
Three-layer architecture: onchain contracts, off-chain services, and external infrastructure.
Quick Start
Get from zero to querying the protocol on Sepolia in 15 minutes.