0

What is best practice to send ERC20-compliant tokens to bounty participants? There could be from 1 to N participants. Also there will be some table with list of users/addresses/tokens/etc. Should I pass all this data to my crowdsale contract for transferring tokens to users while finalizing the ico?

1

Concerning the first point, which is What is best practice to send ERC20-compliant tokens to bounty participants? There could be from 1 to N participants. :

The usual pattern is the sending pattern, where the bounty organizer sends the tokens to the participants. Now, cost-wise for you, it would be cheaper to go with the withdrawal pattern. It means you credit the N addresses of x1,..,xn tokens and these addresses will have to call a function to get their tokens.

Should I pass all this data to my crowdsale contract for transferring tokens to users while finalizing the ico?

If you want to do everything in your contract, including the bounty distribution, then you don't have much choice but to write the data in storage, but keep in mind it's costly and that if you can avoid it, it's better, for the whole network.

| improve this answer | |
  • Thank you! Where do you store the list+addresses? Onchain? Does the lookup for the address need to loop over all? Gas would be super high ofc. Otherwise, can make an oracle lookup the address, and return an amount. But how much gas? I've heard a merkle tree proof something can be used, costing only pennies to withdraw. Can you specify how your solution would be done? Thank you so much! – mylord Feb 26 '19 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.