Code Monkey home page Code Monkey logo

solana-reserve-contract's Introduction

solana reserve protocol

similar to OlympusDAO but without most bells and whistles

introduction

A reserve protocol issues a token that is backed by the value of its treasury.

Participants get to mint the reserve asset by exchanging an asset the treasury wants for it. It’ll usually be exchangeable at a rate that is close to the current market price of the token. The exchange rate goes down over time and jumps back up every time somebody mints some. Usually, the payout is vested linearly over some amount of time.

Participants also get to stake their reserve tokens for a staked reserve token. Over time, the protocol distributes the profit it makes from people minting (the minting exchange rate is always higher than the amount of reserve tokens paid out) to people that staked. This is controlled by a configured percentage of total risk free value accumulated to distribute per day. This means that, if people stop minting, there will be a point where there is not more profit to distribute. But if minting keeps happening, there will be rewards to give to staking participants.

developing

The smart contracts are built using project serum's Anchor framework.

All you need should need is anchor test to develop.

deploying

Deploying to devnet for the first time:

solana-keygen new -o ~/owner.json
solana-keygen new -o ~/program.json
solana airdrop 2 -u d -k ~/owner.json
anchor build # update "declare_id!" to match ~/program.json
solana program deploy -u d -k ~/owner.json --program-id ~/program.json target/deploy/reserve.so

license

MIT

solana-reserve-contract's People

Contributors

kiasaki avatar

Stargazers

believe-in-crypto avatar Liang avatar

Watchers

 avatar

Forkers

tiger0105

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.