⚠️ WARNING: This code has not yet been audited. Use at your own risk.
Numo is a dynamic, automated market maker that provides continuous liquidity to onchain FX markets. Numo's specialized curve can offer more efficient exchange of FX and market make a variety of derivative products such as futures, forwards, and exotic option instruments without oracles.
Try it out! Send money from one currency to another at the best rates possible and instantly with numo.cash.
- ✅ Any FX pair
- 🌍 Globally accessible
- 🤝 Instant settlement
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.
A log-normal curve is beter suited for FX over hyperbolic curves implemented by Uniswap as FX exchange rates exhbit log-normal behavior. Instead of overriding beforeSwap
completey, Numo uses _getUnspecifiedAmount
to implement the curve defined as:
where:
-
$\Phi^{-1}$ is the inverse Gaussian cumulative distribution function (CDF). -
$L$ represents the total liquidity of the pool. -
$x$ and$y$ represent the reserves scaled by liquidity. -
$\mu$ , the mean and$\sigma$ , the width define the distribution of liquidity.
As liquidity
The smart contract suite is inspired by Primitive's Log-Normal DFMM implementation and the replicating market makers paper that first showed the relationship between liquidity and the trading curve of an AMM.
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 |
---|---|
Base | 0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1 |