An NDF is a forward contract where no physical currency delivery occurs — instead, the profit or
loss is cash-settled in a single settlement currency (USDC). NDFs are the standard instrument for
offshore FX hedging in traditional finance, widely used for emerging market currencies and
institutional cross-border exposure management.
What Is an FX Forward?
In traditional finance, an FX forward is a binding agreement between two parties to exchange a specific amount of one currency for another at a predetermined rate on a future date. Banks, corporations, and institutional traders use FX forwards to hedge currency exposure or speculate on exchange rate movements.FX forwards are the second most traded instrument in global foreign exchange markets, accounting for
over $1 trillion in daily turnover according to the Bank for International Settlements.
How NDFs Differ from Deliverable Forwards
The Nile Markets protocol creates non-deliverable FX forwards. Instead of exchanging EUR and USD at maturity, positions are cash-settled in USDC based on the difference between the entry price and the settlement price.Traditional Deliverable Forward
- Physical delivery of currencies at maturity
- Requires bank accounts in both currencies
- Counterparty credit risk (the other party might default)
- Minimum sizes typically $100,000+
- KYC/AML required, restricted access
- Opaque pricing, negotiated bilaterally
Nile Markets NDF
- Cash-settled in USDC — no currency delivery
- Only need a wallet with USDC
- Isolated margin model — risk capped at locked collateral
- Minimum notional of 1 USDC (configurable)
- Permissionless — anyone with a wallet can participate
- Transparent onchain pricing from Pyth oracle
The EUR/USD Forward Contract
Each position on Nile Markets represents a directional bet on the future EUR/USD exchange rate. When you open a position, the protocol records your entry strike price from the current oracle forward price for your chosen tenor. At maturity (or when you close early), your profit or loss is computed from the difference between your entry strike and the settlement price.Choose your parameters
Select a side (LONG or SHORT), a tenor (1 Day, 1 Week, or 1 Month), a notional size
(the face value of the contract in USDC), and your margin (the collateral you lock).
Position opens at the forward price
The protocol reads the current forward price for your chosen tenor from the oracle and locks it as
your entry strike. Your margin is transferred from your account to the position.
Monitor unrealized PnL
As the forward price moves, your unrealized PnL updates in real time. You can add margin, remove
excess margin, or close the position early at any point.
PnL Mechanics
The profit and loss calculation is straightforward and symmetric:PRICE_PRECISION is 1e18 (all prices use 18-decimal fixed-point representation) and notional
is denominated in raw USDC units (6 decimals).
Worked example: LONG position profit
Worked example: LONG position profit
A trader opens a LONG position with:The trader deposited 50 USDC in margin and earned 20 USDC — a 40% return on margin.
- Notional: 1,000 USDC (1,000,000,000 raw)
- Entry strike: 1.08000 (1,080,000,000,000,000,000 raw)
- Margin deposited: 50 USDC (5% of notional)
Worked example: SHORT position profit
Worked example: SHORT position profit
A trader opens a SHORT position with:The trader deposited 50 USDC in margin and earned 20 USDC — a 40% return on margin.
- Notional: 1,000 USDC (1,000,000,000 raw)
- Entry strike: 1.08000 (1,080,000,000,000,000,000 raw)
- Margin deposited: 50 USDC (5% of notional)
Zero-Sum Nature
The protocol operates as a zero-sum system. Every dollar a trader makes, the liquidity pool loses, and vice versa. There is no value creation or destruction in the PnL equation — only redistribution between traders and the pool.Fees (trading fees, liquidation penalties) are extracted separately from the zero-sum equation.
They are charged on top of PnL and distributed between the pool and the treasury. This means the
pool has a structural edge: it earns fees on every trade regardless of PnL outcome.
Cash Settlement
At maturity, positions are settled using the fixing price — the Pyth EUR/USD spot price recorded at 4:00 PM UTC on the maturity business day. No EUR tokens change hands. The settlement process computes PnL, distributes funds, and closes the position in a single atomic transaction.- Profitable settlement
- Loss settlement
- Bad debt settlement
If the position has positive PnL at settlement:
- The trader receives their locked margin back
- The trader receives their profit (paid from the pool)
- Settlement fees are deducted from the profit
- The position is marked as CLOSED with reason MATURED
Why Non-Deliverable?
Non-deliverable instruments have several advantages over their physically delivered counterparts for onchain implementation:- No multi-currency infrastructure — only USDC is needed. There is no need for onchain EUR tokens or cross-chain bridges.
- Atomic settlement — PnL is computed and distributed in a single transaction. No delivery coordination or settlement lag.
- Capital efficiency — traders only lock margin (a fraction of notional), not the full contract value. The pool provides the counterparty exposure.
- Composability — positions are standard smart contract state. They can be queried, monitored, and acted upon by any onchain or off-chain system.