Distribution Pallet allows users to easily and securely distribute fungible tokens to users in an open and transparent way.
Creators will create a new distribution (id) in the pallet, which will register a unique stash_account(id) used for collecting funds and distributing tokens.
The Creator / any token holder should fund this stash account.
Then two different forms of distribution can be used to move tokens from the stash account to users:
Direct Distribution
Creator of distribution can directly put entries of the accounts and amounts they want to distribute.
Crowdfund Distribution
Creator configures a crowdfund for the min/max amount they want to raise, ending on a certain relay chain block.
Users can permissionlessly contribute to the crowdfund using only the native token.
There are configurable min/max contribution amounts.
After the contribution ending block, or if the contribution max has been reached, users can then start to claim their tokens.
Users are automatically assigned a percentage of tokens relative to the amount they contributed, and the total amount contributed.
Once all tokens have been distributed, the crowdfund creator can claim their raised funds.
Closes #5
Distribution Pallet allows users to easily and securely distribute fungible tokens to users in an open and transparent way.
Creators will create a new distribution (id) in the pallet, which will register a unique
stash_account(id)
used for collecting funds and distributing tokens.The Creator / any token holder should fund this stash account.
Then two different forms of distribution can be used to move tokens from the stash account to users: