Git Product home page Git Product logo

launchpad-crowdsales's Introduction

launchpad-crowdsales

Subatrate pallet to raise funds on launchpad crowdsales

Module Overview

This pallet is used to raise funds on launchpad crowdsales. Teams and projects that are just getting started launching their products would need to raise funds and even sell their tokens to the public. They need community backed by token holders of their token, that is the crowd so that they could have a strong start. By creating a crowdfunding campaign that ends with their project Tokens getting sold to the public, they can raise funds and sell their tokens to the public.

We happen to be working on a similar product in Setheum, providing the High-End LaunchPad (HELP) Protocol to do just that for the projects building/deploying their tokens on Setheum as smartcontracts contracts.

Therefore, to raise funds ourselves, we are developing this pallet for the Substrate Community to benefit from it, and for us to raise funds from the Web3 Foundation General Grants Program.

The idea is to use the grant program to raise funds for deploying our dedicated Setheum Network nodes to go live.

There are four participants in a LaunchPad Crowdsales Protocol, the Campaign Creator, the Campaign Beneficiary, the Crowd/Contributors, and the Governance Council.

  • The Campaign Creator is the person who creates the campaign and the project.
  • The Campaign Beneficiary is the person who receives the funds raised.
  • The Crowd/Contributors are the people who contribute to the campaign.
  • The Governance Council is the people who manage the campaign and the protocol.

How the protocol Works

Screenshot from 2022-01-23 13-31-41 The HighEnd LaunchPad Protocol lets teams/projects/campaigns achieve two (2) major goals at once, it raises money, and and sell their tokens to the public. The protocol uses MultiCurrency to let the Campaign Creator choose which currency to raise/sell their tokens for. Therefore, Campaign Creator can choose to raise funds in any currency available on the chain.

There is a goal that is set by the Campaign Creator, the beneficiary of the fund and the Period (campaign period - amount of blocks a campaign should stay active) of the campaign and other information that describes the campaign.

The Lifecycle of a Campaign

A Launchpad Campaign has three stages in its lifecycle, they are as follows:

  1. Pre-Funding/Proposal Stage: The Campaign Creator creates the campaign and sets the Period/TimeCap and HardCap. In this stage, the Campaign Creator must submit the proposal to the Governance Council along with a SubmissionDeposit required by the protocol.

  2. Waiting Stage: The Campaign waits for the appropriate time to start the Campaign. The Protocol has a WaitingPeriod that is set on runtime, and all campaigns have to wait for that period to start.

  3. Funding/Active Stage: The Campaign can raise funds and sell their tokens to the public in this stage. If the goal is reached before the period to end the campaign, the campaign will be ended and the funds will be available for the public to claim and the raised funds for the Campaign Beneficiary or Creator to claim.

Campaign Ctegories

A Successful Launchpad Campaign

A successful Launchpad Campaign is one that has raised the goal and has sold their tokens to the public. Once the goal is reached, the Campaign is considered successful.

A Failed Launchpad Campaign

A failed Launchpad Campaign is one that has not raised the goal and has not sold their tokens to the public. Once the goal is not reached and the period to end the campaign has ended, the Campaign is considered failed and the campaign allocation of tokens is available for the Campaign Creator to claim refund and the raised funds are also available for the Crowd/Contributors/buyers to claim refunds all only before the RetirementPeriod of the campaign.

Getting Started

Commands to get started testing, building and running launchpad-crowdsales

Tests

To run the tests, run the following command:

make tests

Benchmarking

To run the benchmark, run the following commands:

make benchmark

Initialise Toolchain

To run the benchmark, run the following commands:

make init

Build

To run the benchmark, run the following commands:

make build

Run

To run the benchmark, run the following commands:

make run

License

Apache License Version 2.0

launchpad-crowdsales's People

Contributors

alfellati avatar dependabot[bot] avatar huang-lei1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

launchpad-crowdsales's Issues

Support pausing of campaigns by Council - `pause_campaign()`

Support pausing of campaigns by Council - pause_campaign();
This could be useful if the Campaign creators are found to be malicious while the campaign is Active.
When a Campaign is paused, what do we do with the funds? Do we just keep it in the StorageMap as a paused campaign for a period of time say PausedRetirementPeriod after which the paused campaign is retired and contributors are refunded while the SubmissionDeposit is slashed from the Campaign creators' locked-balance.
Something like this should be implemented, and also a cancel_campaign() could be useful to just completely cancel the campaign and refund contributors while slashing SubmissionDeposit.

Support `proposals_retirement_period` to remove rejected proposals

Support proposals_retirement_period to remove rejected proposals.
Don't just remove them on rejection. Give Campaign creators time to check out there old proposals and learn from their mistakes and use that as a boilerplate instead of starting another one from scratch

Add `MinContributors` to avoid malicious campaigns

One person could buy all the funds allocated to a campaign, this is not good for the community and the bootstrapping of the token on SetSwap DEX, therefore we must have a minimum number of contributors before a project is considered successful.
This parameter MinContributors is then used relative to the goal of the campaign to determine the max_contribution per contributor.
Formula: max_contribution = goal / MinContributors

For example, if we say that the MinContributors is 200 and a Campaign-A has a goal: Balance = 200_000, then the max_contribution = goal / MinContributors which in this example is 200_000 / 200 = 1_000, therefore each contributor is limited to contributing 1_000.

Remove `update_proposal`;

Do not let proposal origin update proposal to avoid misunderstanding and mallicious activities. Another proposal can be made anytime anyways.

Introduce `TimeCap`. Let `raised` exceed `goal` by introducing `time_cap` and `hard_cap`

With this upgrade, teams could have a goal (SoftCap), and a crowd_allocation that can be more than the value of their goal (SoftCap). This lets the team raise more than their goal by selling more, and their hard_cap = goal * token_price which is relative to their crowd_allocation / token_price;
The remaining_allocation will be returned to the campaign_creator when they claim the successful _campaign;

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.