Skip to content

numocash/numo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Numo 🟩

Fuzz Testing npm version

A cryptocurrency designed to be stable.

Numo (NDR) is backed by a basket of FX pairs with its volatility offset by the premium earned from selling options on the underlying liquidity. The economic design of Numo draws it's inspiration from the IMF Special Drawing Rights (SDR) and the replicating market makers paper that shows virtually any option strategy can be constructed using CFMMs.

The smart contract suite for Numo is contained in this repository. It implements the RMM-01 invariant, concieved by the wonderful @primitivefinance team, as a Uniswap V4 hook.

Set up

requires foundry

forge install
forge test
Updating to v4 dependencies
forge install v4-core

Local Development (Anvil)

Other than writing unit tests (recommended!), you can only deploy & test hooks on anvil

# start anvil, a local EVM chain
anvil

# in a new terminal
forge script script/Anvil.s.sol \
    --rpc-url http://localhost:8545 \
    --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
    --broadcast

Testnets

NOTE: 11/21/2023, the Goerli deployment is out of sync with the latest v4. It is recommend to use local testing instead

For testing on Goerli Testnet the Uniswap Foundation team has deployed a slimmed down version of the V4 contract (due to current contract size limits) on the network.

The relevant addresses for testing on Goerli are the ones below

POOL_MANAGER = 0x0
POOL_MODIFY_POSITION_TEST = 0x0
SWAP_ROUTER = 0x0

Update the following command with your own private key:

forge script script/00_Counter.s.sol \
--rpc-url https://rpc.ankr.com/eth_goerli \
--private-key [your_private_key_on_goerli_here] \
--broadcast

Deploying your own Tokens For Testing

Because V4 is still in testing mode, most networks don't have liquidity pools live on V4 testnets. We recommend launching your own test tokens and expirementing with them that. We've included in the templace a Mock UNI and Mock USDC contract for easier testing. You can deploy the contracts and when you do you'll have 1 million mock tokens to test with for each contract. See deployment commands below

forge create script/mocks/mUNI.sol:MockUNI \
--rpc-url [your_rpc_url_here] \
--private-key [your_private_key_on_goerli_here]
forge create script/mocks/mUSDC.sol:MockUSDC \
--rpc-url [your_rpc_url_here] \
--private-key [your_private_key_on_goerli_here]