npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@traderjoe-xyz/rocket-joe

v1.0.0

Published

A launch platform for bootstrapping protocol-owned liquidity

Downloads

17

Readme

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