How we created the World's first smart contract Airdrop, and how it almost failed!

in #development7 years ago

How the ClusterTeam crew created a unique way of doing airdrops, by using an Ethereum Smart Contract.

Unlike most, we actually love to code and create things. No fast 'n dirty clones for us, we like to take things to another level. We recently brainstormed about a promo campaign for ClusterToken, our self mining contract with clusterized rewards.

Given the fact that ClusterToken is very unique, our campaign had to be similar: One of a kind!

Cluster LOGO

So we started writing code, and ended up with the world's first smart contract Airdrop on the Ethereum blockchain. Our small scale test on the main network started on 02 August '16 and ended on 09 August 2016.

250 Participants signed up during that time, even though the rewards were insufficient to cover the transaction fee, known as 'gas' on the Ethereum network. The workflow for signing up is amazingly simple:

  • Interact with our smart contract via MyEtherwallet or MIST

  • Call the 'registerAirdrop' function of our contract

  • Wait until the amount of needed participants is reached

  • Claim rewards by using the 'claimAirdrop' function on the smart contract

This process is so simple that it's hard for us to understand why nobody created such contract before. So many projects claiming to have +20 developers on the team, yet such as simple, transparent, hassle free system was never invented.

Houston, we have a problem

When the airdrop closed, and users started to claiming their rewards, a minor bug appeared in our code.

Upon registration, our smart contract detects if you have any ClusterToken ($CLRT) in your balance. If you have some, this means you're already an investor, and you should receive more rewards than regular users. Therefore, a bool called 'isInvestor' is set as true.

What we overlooked in our smart contract, was the fact that this check altered the global contract variable instead of the local variable in that function!

This means that once our first investor has claimed his rewards, the global variable got set at the reward rate that only investors would receive. So, all users that claimed their rewards afterwards got the reward rate reserved for investors only.

But, we foresaw such minor glitches. We've deposited enough ClusterTokens to cover the bonus rate to all 250 participants right from the start. As with all code, bugs can occur during the first releases, especially when all code is written from scratch instead of cloning some Github repo.

So why is all this so special?

We hope to inspire more devs to do something special instead of just cloning Git's. To attract users, to show them commitment and capabilities. To deploy working projects without asking for pre-ico, ico, name it whatever you want funds.

If the commitment and capabilities of developers drop to 0, so will the future of blockchain technology.

We must keep improving, and all contributions help to inspire other developers!

Keep motivation high and inspiration even higher!

cluster

Sort:  

Hi. I am a volunteer bot for @resteembot that upvoted you.
Your post was chosen at random, as part of the advertisment campaign for @resteembot.
@resteembot is meant to help minnows get noticed by re-steeming their posts


To use the bot, one must follow it for at least 3 hours, and then make a transaction where the memo is the url of the post.
If you want to learn more - read the introduction post of @resteembot.
If you want help spread the word - read the advertisment program post.


Steem ON!

Congratulations @clustertoken! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published your First Post
You got a First Vote
You made your First Vote

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.030
BTC 65709.71
ETH 2614.52
USDT 1.00
SBD 2.69