Shortly
Industry
BlockchainTechnologies
When you issue tokens, you need appropriate tools for their convenient distribution. Our client - Finance.Vote - faced such a problem. The way to solve the problem was dApp Bank.Vote, whose task is to conveniently perform "airdrops". The Bank.Vote make the company application portfolio complete helping build an ecosystem for Decentralized Autonomous Organizations (DAOs).
Scope of Work
One of the challenges when it comes to building blockchain solutions is the cost of application usage. When the owner of the token wants to share tokens with 5 or 10 addresses - there is no problem at all, but when it comes to sharing tokens with thousands or millions of addresses - the cost of such an operation may over cross the acceptable budget. Another important topic for our customers was building a front-end app, which will offer the same level of visibility and transparency guaranteed by blockchain solutions but will be equally performed as the standard (centralized) web application we all use every day. For both subjects, our team said "challenge accepted!". We made it!
The Result
The development of the distributed applications (even if the rules of programming remain the same) is completely different than in the case of "non-blockchain" apps. In the case of centralized applications, you need to pay attention to security, scalability, performance, memory consumption, CPU utilization, etc. In the case of the distributed applications, your main focus is on the safety of the smart contracts and the cost of the gas (especially utilized during deployment). To address topics related to the costs of the deployments and airdrop process, there was used a cryptography-specific algorithm called "Merkle trees”. In very simplified words this algorithm allows for verification if the particular element (here wallet address) belongs to a specific set of data based on the hash of the root element.
Thanks to such an approach, instead of publishing to the blockchain thousands of wallet addresses, we can publish a single (verifiable) hash and the whole tree store in another safe and immutable storage.
Moreover - to don't force the users to wait for the calculation of the whole tree each time, we precalculate the whole tree to reduce the time required for proof that a given hash belongs to the tree (significantly reduced time of confirmation). It was the first project where we used the MerkleTrees algorithm in production, but the cost savings exceeded both our and customer expectations.