Architecture
Last updated
Was this helpful?
Last updated
Was this helpful?
Here is the structure for WOOFi's Synthetic Proactive Market Making (sPMM) contract on Solana. This repository contains the Rust smart contract as well as the Typescript SDK (@woonetwork/WOOFi_Solana
) to interact with a deployed program.
A WooConfig is a config struct to record:
authority: Owner of the program
paused: Whether the program is paused
Woopool's admin authority
Wooracle's admin_authority
Collect fee authority
Guardian set authority
Pause program authority
A WooPool is a concentrated liquidity pool for a token.
Each WooPool account hosts the necessary information to deal with the accounting of the pool. It also hosts the PDAs to the vaults. Only the WOO sPMM program has the authority to withdraw from the vault.
A WooPool account is hashed by the WooConfig, token mint address and quote token mint address.
A WooOracle is an on-chain price feed in order to simulate the order book from centralized exchanges without sacrificing capital efficiency.
Fee rate settings stored in WooPool's fee_rate param can be updated by set_pool_fee_rate function by the admin.
This repository contains the Rust smart contract as well as the Typescript SDK (@woonetwork/WOOFi_Solana
) to interact with a deployed program.
Anchor 0.29.0
Solana 1.17.31
Rust 1.72.0
Set up a valid Solana keypair at the path specified in the wallet
in Anchor.toml
to do local testing with anchor test
flows.
$NODE_PATH
must be set to the node_modules
directory of your global installs. For example, using Node 18.20.4 installed through nvm
, the $NODE_PATH is the following:
Run "cargo test --lib" to run Rust unit tests
WooFi in Solana uses to check whether Woo oracle's price is valid.
Detailed explanations can be found on the
Install Anchor using instructions found .