⚠️ WARNING: This code has not yet been audited. Use at your own risk.
Automated market makers (AMMs) have revolutionized spot markets by bootstrapping liquidity without relying on external price feeds. As the token economy expands, this mechanism has proven invaluable. Yet, no equivalent solution exists for derivatives. Bootstrapping liquidity for derivative markets without established prices is a fundamentally harder problem. As a result, derivative markets are limited to a small subset of tokens. Numo changes this. By leveraging the novelty of AMMs, Numo enables derivative exposure on any token—without requiring a counterparty or oracles.
Numo enables the synethetic exposure of forwards for cross-border lending, payments, and exchange. With Numo, users can lock in an exchange rate for a specific time. The replication of a forward is a combination of long calls and short puts.
- ✅ Any derivative exposure
- 🌍 Globally accessible
- 🤝 No reliance on counterparties
- 🛠️ Customizability
Numo is a Uniswap V4 hook that inherits OpenZeppelin's BaseCustomCurve
contract from their uniswap-hooks
library. Thus enabling Numo to interact with the V4 poolmanager for optimal routing and inherit much of their battle tested code without needing use the concentrated liquidity logic. Instead of calling beforeSwap
directly, Numo.sol implements its custom curve in _getUnspecifiedAmount
to support the replication of derivatives. Each call and put is repersented as a ERC-6909
token.
The trading curve in Numo determines the price and behavior of the AMM. Unlike a traditional AMM like in Uniswap V2, Numo implements a log-normal curve to adjust prices dynamically based on volatility (σ), strike (K), and time to maturity (τ). It allows users to swap assets at implied vol-adjusted prices, mimicking an options market.The formula:
Implemented in computeTradingFunction(...)
with the following parameters:
- Reserve balances
reserveX
,reserveY
- Liquidity
totalLiquidity
- Strike price
strike
- Implied volatility
sigma
- Time to maturity
tau
The smart contract suite is inspired by Primitive's RMM implementation and the replicating market makers paper that first proved that any synethic derivative expsoure can be constructed using AMMs without needing a liquid options market.
Requires forge to be installed already.
forge install
forge test -vvv
forge coverage --report lcov
cmd + shift + p -> Coverage Gutters: Display Coverage
forge snapshot --gas-report
forge snapshot --diff
git submodule update --init --recursive
Network | Factory Address |
---|---|
Unichain Sepolia | 0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1 |