Giter Club home page Giter Club logo

rocket-joe's Introduction

Actions Status

Rocket Joe

Rocket Joe is a token launch platform where participants bid to provide liquidity for newly issued tokens. The platform enables price discovery and token distribution over a period of time before tokens are issued to public market, while discouraging front-running by bots. In addition, it improves liquidity sustainability by allowing issuing protocols to acquire its own token liquidity.

Full whitepaper available here.

How It Works

  • User stakes JOE into the RocketJoeStaking contract to earn rJOE.
  • LaunchEvent is created with a fixed amount of tokens to be issued.
  • Users can deposit AVAX and rJOE into the LaunchEvent contract. The amount of rJOE needed to deposit a certain amount of AVAX is dictated by the parameter rJoePerAvax, which may vary from launch event to launch event.
  • Users can also withdraw AVAX (if they think the price of TOKEN/AVAX is too high), but a withdrawal penalty may be incurred depending on which phase the launch event is at:
Phase One Phase Two Phase Three
0-24 hrs 24-48 hrs 48-72 hrs Additional 0-7 days
0% penalty 0-50% penalty (linear increasing) 20% penalty LPs are locked + bonus incentives received
  • Phase One:
    • 0-24 hrs: Users can deposit and withdraw AVAX without any penalty.
    • 24-72 hrs: Users can continue to deposit and withdraw AVAX, but must incur a withdrawal penalty that increases linearly from 0-50% (the maximum is configurable).
  • Phase Two: Users can only withdraw AVAX with a 20% penalty (this parameter is also configurable).
  • Phase Three: Initial liquidity is seeded, but the LP tokens are locked for an additional 0-7 days. As an incentive for locking, participants receive a bonus percentage of tokens once phase three starts. After this phase, both user and issuer are free to claim their LP tokens.

Contracts

Rocket Joe contract flow

RocketJoeToken

An infinite supply ERC20 token that is an allocation credit for users to participate in a Launch Event. The amount of rJOE required to deposit an amount of AVAX into a launch event is dictated by rJoePerAvax, which is set manually on RocketJoeFactory. Once AVAX is deposited, rJOE is burned.

RocketJoeStaking

A MasterChef-style staking contract in which users stake JOE to earn rJOE.

RocketJoeFactory

Creates individual LaunchEvent contracts. Also sets rJoePerAvax.

LaunchEvent

Contract in which price discovery and token distribution takes place. Issuer deposits the issued tokens and users deposit and/or withdraw AVAX during a 72 hour period. The final amount of AVAX at the end of this period dictates the TOKEN/AVAX price which will be used to the seed initial liquidity on the Trader Joe.

Installation

The first things you need to do are cloning this repository and installing its dependencies:

git clone https://github.com/traderjoe-xyz/rocket-joe.git
cd rocket-joe
yarn

Testing

To run the tests run:

make test

There is a pending bug with solidity-coverage. To get around this bug, you must manually edit node_modules/solidity-coverage/plugins/hardhat.plugin.js according to these edits.

Then to run coverage:

make coverage

The coverage report will then be found in coverage/.

Deployment

Rinkeby

To deploy to the rinkeby network you need to set appropriate environment variables. The file .env.example contains examples of the variables you need to set. For convenience you can copy this file to a file name .env and use a tool like direnv to automatically load it.

You could then deploy to rinkeby by using hardhat-deploy with this command yarn hardhat deploy --network rinkeby.

After the deploy is complete you should commit the deployments directory to this repo.

Verifying contracts

To verify the contracts on rinkeby you will need an etherscan API key, see .env.example. To verify a contract on you will need the deployed contracts address, run

yarn hardhat verify --network rinkeby "${contract_address}"

License

MIT

rocket-joe's People

Contributors

0xmurloc avatar 0xnivek avatar cryptofish7 avatar jummy123 avatar lint-action avatar louismemyself avatar louispzt avatar

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.