Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the SpecialAllocations structure #767

Closed
lumtis opened this issue May 6, 2022 · 0 comments · Fixed by #786
Closed

Create the SpecialAllocations structure #767

lumtis opened this issue May 6, 2022 · 0 comments · Fixed by #786
Assignees
Labels
campaign Related to campaign module
Milestone

Comments

@lumtis
Copy link
Contributor

lumtis commented May 6, 2022

Special allocation is a generic solution to represent shares of the campaign that are allocated for a specific purpose interpreted off-chain.

This solution allows to have accounts with a token balance in a custom initial genesis for the chain and having them tracked by the allocated shares of the campaign.

The client must manually verify the initial genesis of the chain is valid depending on the special allocation of the campaign.

Each campaign can have special allocations for the mainnet.

Two different special allocations identified:

  • GenesisDistribution: coins distributed in genesis accounts in a custom initial genesis
  • ClaimableAirdrop: coins that can be claimed as airdrop from a claim module

SpecialAllocations

Proposed structure:

type SpecialAllocations struct {
	GenesisDistribution  Shares
	ClaimableAirdrop      Shares
}

The type should implement TotalShares to get the total shares for special allocations

// SpecialAllocation implements a totalShares methods to return total shares of special allocation
func (as SpecialAllocations) TotalShares() Shares {
	return as.ClaimableAirdrop + as.GenesisDistribution
}

Store

We must determine if SpecialAllocations should have its own entry in the store:

SpecialAllocations: [campaignID] -> SpecialAllocations

Or if the type can be embedded in campaigns

type Campaign struct {
  ...
  SpecialAllocations SpecialAllocations
  ...
}

IMO the type is not large and could be embedded in the campaign

@lumtis lumtis added the campaign Related to campaign module label May 6, 2022
@lumtis lumtis added this to the Milestone B milestone May 9, 2022
@lumtis lumtis self-assigned this May 10, 2022
@lumtis lumtis linked a pull request May 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
campaign Related to campaign module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant