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

rico-core

v0.9.3-commit.18cf63c

Published

The Responsible Initial Coin Offering

Downloads

41

Readme

npm version CircleCI Slack Channel

This is a Beta version and may still contain bugs. We are not responsible for any losses caused by this version.

Table of Contents

Design Concept

RICO is a framework which forms a robust boilerplate for decentralized initial coin offerings (ICO). With RICO your ICO will be more responsible and be easier to set up and launch.

The problems with conventional ICO's

With a conventional ICO, the project owner can freely decide the process how tokens are generated. That is, the token design and holding ratio is decided by the project owner. After an initial issuance these tokens are sold to supporters at a certain price or exchanged for the total raised funds during the ICO.

RICO's approach

With RICO's approach the entire execution process of issuing tokens is strictly defined on the Ethereum Virtual Machine (EVM) and executed automatically. With RICO your ICO will be fully automatic and decentrilized. The decentrilized nature of an ICO created with RICO implements a true fair distribution system.

An ICO made with RICO is:

  • Decentralized
  • Autonomous
  • Fair
  • Mintable
  • Easy to use

Docs

Whitepaper

Tutorial

Dependencies

  • Node v9.0.0 (visit the website for installation)
  • Truffle v4.0.1
  • solidity-compiler v0.4.18
  • ganache-cli v6.0.3

Install dependencies:

$ npm install [email protected] -g 
$ npm install solidity-compiler -g
$ npm install [email protected] -g

(You can use ethereumjs-testrpc to test your RICO build.)

Installation & overview

Install rico-core and generate a new rico project.

$ npm install -g rico-core
$ rico new helloico

rico new folder-name will create a new folder in the current directory with a clean installation of the RICO framework.

RICO file structure

When we look in the new directory we'll see a lot of different contracts. Here is a quick overview of the most important files that make up RICO.

Contracts:

  • RICO.sol handles the minting of the Tokens of your ICO.
  • PoD.sol stands for "Proof of Donation". This handles all the donation logic during your ICO. This contract extends the other PoDs inside the PoDs folder.
  • PoDs/PublicSalePoD.sol handles the donations for the public sale.
  • PoDs/RICOStandardPoD.sol handles the Initial Deposit and rewarding the market makers.
  • PoDs/TokenMintPoD.sol handles a separate token allocation outside of the public sale.
  • PoDs/DutchAuctionPoD.sol handles the Dutch Auction ICO format.
  • Launcher.sol can deploy and initialize your ICO based on your own parameters.

Execution scripts:

  • KickStarter/deploy.js is your startpoint to set your ICO's parameters and send them to the Launcher.

RICO templates

The RICO framework makes it possible to easily kickstart your ICO with your own ICO requirements. Currently there are three templates available for generating an ICO boilerplate: standard ICO, simple ICO and Dutch Auction.

RICO Standard ICO

RICO Standard ICO utilizes the RICOStandardPoD.sol and PublicSalePoD.sol for your RICO. This method is our suggested method and integrates a Initial Deposit and offers functionality for rewarding market makers. The tokens the owner receives from the Initial Deposit are locked for a fixed period of a 180 days.

Simple ICO

A Simple ICO utilizes the TokenMintPoD.sol and PublicSalePoD.sol for your RICO. This method is more old school, having a separate allocation for the owner and offering the remainder of the tokens through a capped or uncapped public sale. The tokens the owner receives from the separate allocation can be locked for a fixed period which can be set freely.

Dutch Auction

A Dutch Auction utilizes the DutchAuctionPoD.sol for your RICO. This is a more advanced method. The template cannot be initialized via the Launcher contract. It can be initialized via the init.js script inside exec/DutchAuction, but you will need to deploy the DutchAuctionPoD contract manually.

Using RICO

RICO is really straightforward:

  1. Deploy RICO to the blockchain.
  2. Initialize your ICO with the Launcher contract.
  3. Mint tokens through the RICO contract.

Deploying the RICO contracts

You need to deploy three contracts to the network before you can initialize your ICO: RICO.sol, Launcher.sol and ContractManager.sol. We made it very easy by providing a truffle migration file to deploy these contracts. Please see the migrations/2_deploy_contracts.js.

Local Testnet deploy

First you need to open a local testnet by either (a) opening Ganache or (b) run ganache-cli. For ganache-cli we have already prepared the script inside the file called rpcrun.bash.

# (Mac only) make rpcrun executable
$ chmod +x rpcrun.bash
# run the script
$ ./rpcrun.bash

Then open a new Terminal window and cd into your RICO directory to migrate and deploy rico with truffle.

$ truffle migrate --reset --network testrpc

Now we need to obtain the address that RICO was deployed to. After the migration you should see these lines in your terminal:

Replacing RICO... ... 0x66b3f9a7ab2d993a0336a55c169372762a9e33b5298de468b83321f17a96964c RICO: 0x1c6f2526b0a5128b89ee0f921f8b8b794189f2ed Replacing Launcher... ... 0xb8d1c92c5b2d8522bb038bfc86a91e30a3e24a02ba9159c0910bac6cc18495ad Launcher: 0x39326f43557b33afdad3cec0d0272619c0d7ad9b

We will need the RICO and Launcher addresses as written above. Continue to Customize and initialize your ICO.

Testnet deploy (ropsten)

Caution: ropsten hit the Byzantium HardFork #1700000 you have to update geth to v1.7 and sync to the latest block.

$ npm install truffle-hdwallet-provider

The required contracts are already deployed on the ropsten network:

  • Launcher.sol address: 0x40c75eb39c3a06c50b9109d36b1e488d99aadf97 etherscan
  • RICO.sol address: 0x9e18e5bdb7f47631cf212b34a42cd54cfd713a6d etherscan

We will need the RICO and Launcher addresses as written above. Continue to Customize and initialize your ICO.

Mainnet deploy

We haven't deployed the RICO and Launcher contracts to the mainnet yet. Please use truffle console to migrate and deploy the contracts.

Customize and initialize your ICO

It's time to initialize your ICO with the deploy.js script in exec/KickStarter. Please check the contents and edit it to your own requirements.

# Your Mnemonic key will be saved as a process.env variable and is used in the truffle.js file. This wallet will be the project owner's wallet to be used during the ICO.
$ export MNEMONIC_KEY="your mnemonic key 12 words"
# Paste the correct contract address of the deployed RICO contract.
$ export RICO_ADDR=0x1c6f2526b0a5128b89ee0f921f8b8b794189f2ed
# Paste the correct contract address of the deployed Launcher contract.
$ export LAUNCHER_ADDR=0x39326f43557b33afdad3cec0d0272619c0d7ad9b
# Run the deploy.js script.
$ truffle exec exec/KickStarter/deploy.js --network testrpc

LICENSE

RICO is licensed under the GNU General Public License v3.0.