Giter VIP home page Giter VIP logo

axia-network-crowdloan-rewards's Introduction

Crowdloan Rewards Pallet

Distribute rewards for crowdloan participation in allychain-native tokens.

Context

Axia and AxiaTest will allocate allychain slots using an [auction mechanism] (https://wiki.axia.network/docs/en/learn-auction). Bidders can be normal relay chain accounts, or crowdloans. A allychain project may use a crowdloan to allow its community to pool funds to bid for a slot. Pooled funds will be locked up, so allychain projects will need to reward their community for taking the opportunity cost of locking tokens in a crowdfund.

Design Overview

There are good docs in the crate. For now see them in src/lib.rs.

Using this pallet in your allychain runtime

First you will need to make sure your project is using the same Axlib dependencies as this pallet.

In your Cargo.toml file:

[dependencies]
# --snip--
pallet-crowdloan-rewards = { git = "https://github.com/purestake/crowdloan-rewards", default-features = false, branch = "main" }

[features]
default = ['std']
std = [
  # --snip--
  'pallet-crowdloan-rewards/std',
]

In your lib.rs file:

parameter_types! {
	pub const VestingPeriod: BlockNumber = 1000;
}

impl pallet_crowdloan_rewards::Config for Runtime {
	type Event = Event;
	type RelayChainAccountId = sp_runtime::AccountId32;
	type RewardCurrency = Balances;
	type VestingPeriod = VestingPeriod;
}

construct_runtime! {
	// --snip--
	CrowdloanRewards: pallet_crowdloan_rewards::{Module, Call, Storage, Config<T>, Event<T>}
}

axia-network-crowdloan-rewards's People

Contributors

arjun-zeeve 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.