Skip to content

margined-protocol/power

Repository files navigation

Power

Continuous Integration codecov

This repo contains Margined Power Perpetuals a decentralized power perps protocol to be deployed on Osmosis.

Contracts

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

Background

Get started

Environment Setup

Pre-Requisites

  • Rust v1.69.*
  • wasm32-unknown-unknown target
  • Docker

Instructions

rustup default stable
rustup target add wasm32-unknown-unknown
  • Make sure Docker is installed

Build

Clone this repository and build the source code:

git clone [email protected]:margined-protocol/power.git
cd power
cargo build

Unit / Integration Tests

To run the tests after installing pre-requisites do the following:

Compile contracts:

./build_release.sh

Run the tests:

cargo test