MELACOIN BEP20 PRESALE, AIRDROP & TOKEN OFFERING WHY RECIPIENTS PAY GAS FEES
By: Melacoin Project
Tags: Cryptocurrency, Crypto, Bsc, Token

Melacoin project implements an airdrop via cryptographic IOUs that users relay to a smart contract to collect their tokens at Airdrop.melacoin.org, paying for their own transaction gas costs, instead of the issuer.

Minimum buy: 1,000,000 Mela tokens = 0.004BNB

www.airdrop.melacoin.org

Performing an airdrop the usual way can get costly and a bit difficult in technicalities, since it requires paying for gas costs to send the variable amount of Mela Bep20 tokens to a bunch of recipients. With Binance mainnet transaction costs being in the order of $0.20 to $1.56, implementing a massive airdrop can get rather expensive.

With the implemented Melacoin Airdrop scheme, the bulk of the cost is offloaded to the recipients of the airdrop.

To set up Melacoin Bep20 Airdrop, the issuer only needs to allow the Mela Bep20 contract to distribute tokens on their behalf, for example using token.approve(spacedrop, total_tokens_to_distribute) in the case of an Bep20 token.

Then, the airdrop issuer must send off-chain (e.g., via email, or on a public website) a signed message that is unique for each recipient. Then, recipients can then send these messages to the Melacoin BEP20 smart contract to retrieve their tokens via claimTokens().

These messages are cryptographic IOUs that include:

The token to be transferred.

A sender, recipient, and token amount.

A nonce (more on why this is necessary later).

The signature of the sender.

With these parameters, the smart contract can verify that in fact the sender did authorize this transaction, and execute a transaction on their behalf.

Melacoin Airdrop allows user claim and collect tokens multiple times (that is, calling claimTokens BEP20() with the same parameters more than once). Since a multi-phase airdrop could entail sending the same amount of tokens to the same address multiple times, we allow the sender to provide a different nonce each time, effectively working around this limitation.

Regarding costs. For the issuer, gas costs are reduced to setting up the spacedrop via calling approve() as explained above; Spacedrop is dramatically cheaper than a standard airdrop for the issuer. For recipients, the cost is comparable to a standard token transfer.

The aggregate cost for a Spacedrop, including gas paid by issuer and recipients, is slighly higher than in a standard airdrop, since in the latter several token transfers can be lumped together in a single transaction. That said, the total cost should be in the same order of magnitude.

Note that in Spacedrop recipients must actively collect the tokens they are granted. This may or may not be desirable. On one hand, the issuer can recover unclaimed tokens. Spacedrop does not help perform airdop spam, for better or worse. Finally, recipients must of course own some ether in order to pay for transaction costs. Again, this may not be desirable.

Interestingly, the Spacedrop contract has no owner and does not require redeploying to implement different airdrops. None of that is required, since all the necessary data is encoded in the IOUs that recipients relay to the smart contract. One deployment of the smart contract should be forever good.

Currently, the Spacedrop repository only includes the smart contract and basic tests. To dos are: a nice front-end to collect tokens, backend code to automate sending the info to recipients.

A word of caution: this code has not been extensively tested. Use at your own risk!