I am doing a project where I create a token and try to airdrop it to as many people as possible. The challenge is to figure out the most cost-effective way to do so.
I had two options:
Create a "Token Vault" type smart contract, send tokens to it and pass an array of addresses and balances to some function.
Just create a new function in my token code before deployment that will be similar to approve(), but has an array of addresses as input. And just let people perform transferFrom() afterward.
As you can tell, both of these options are quite similar and my main concern is that both of them require me to pass an array of addresses. As I understand, if I want to pass an array of 1000 addresses it will cost me 21000 gas + 1000 SSTORE operations (20000 gas id _spender is not in mapping) totaling at 20021000 gas (if it is indeed possible to pass 1000 at once and not in separate batches). Calculating the cost for this very moment gives us 0.02 ETH or 16.297$, but that is only because the price of gas is at 1 wei atm.
Well, imagine if I perform a successful Airdrop campaign to thousands of people and the network is going to be congested because of another CryptoKitties leaving us with an average price of gas between 20 and 30 wei for weeks. Yeah, the price of deploying such contract will skyrocket to around 0.5 ETH.
It is not a commercial project, so doing crowdsale (which would cost me very little compared to what I am planning to do) is out of the question. The main goal of the project is to make regular non-tech/crypto savvy people familiar with Ethereum platform and make them do simple stuff for the first time: like creating a wallet, buying ETH, interacting with smart contracts, etc...
You might ask, why in this case don't I create a mintable token that people can mint for themselves, effectively costing me 0 eth after I deploy my token contract? Well, I believe that in order to reach many people the token should have some form of hypothetical value, otherwise, nobody would go through the struggle of even setting up a wallet and loading it with ETH. And when tokens are freely mintable, even if there is a limit of tokens per address, it will not stop some people from abusing it by creating multiple accounts and accumulating large sums for themselves. In other words, I want to have an ability to regulate total supply, so that people are not able to abuse the Airdrop process and render the token worthless (which it is anyway, but at least it might have some speculative value that will motivate people to go through the whole process).
I believe that there should be a way to do this without expensive arrays of addresses. However, since I have zero to none programming experience, it is not so obvious. Maybe there is a way to use some unique codes that I can distribute between people, which they will have to enter in order to unlock their airdrop tokens? But I will have to do it in such a way that doesn't require me to pass an array of such codes to be remembered in the contract. And, for example, those codes will satisfy some mathematical function but would be super hard or impossible to generate for anyone but me.
I would appreciate your input guys! Thank you for reading and sorry for such a long post!
Looking the best cost-effective way of distributing tokens fairly without having to pass an array of addresses to the token contract.