This repo contains Margined Power Perpetuals a decentralized power perps protocol to be deployed on Osmosis.
Contract | Reference | Description |
---|---|---|
Power | doc | The controller contract that enables user's to open and close power perpetual positions |
Staking | doc | Token holders stake $MRG into the staking contract which then mints $stakedMRG to which fees are distributed |
Fee Collector | doc | Fee collector accrues the fees generated by protocol to be redistributed to $MRG token holders |
Query | doc | Pass-through contract to make testing easier |
- Rust v1.69.*
wasm32-unknown-unknown
target- Docker
- Install
rustup
via https://rustup.rs/ - Run the following:
rustup default stable
rustup target add wasm32-unknown-unknown
- Make sure Docker is installed
Clone this repository and build the source code:
git clone [email protected]:margined-protocol/power.git
cd power
cargo build
To run the tests after installing pre-requisites do the following:
Compile contracts:
./build_release.sh
Run the tests:
cargo test