Inspiration
The TRX price increase over the last months and the high energy demand had the consequence of rendering very expensive sending tokens to many users. Small community projects without large resource backing do not have the capability to make large token distribution campaigns.
What it does
Tron SEA is a framework for developers trying to simplify and make more affordable handling large airdrop or rewarding campaign. Tron SEA provides the building blocks to integrate Merkle tree distribution strategy into any Tron based project, greatly reducing the complexity and the cost on the builder by requiring user involvement in the claim action.
Merkle trees were invented in 1979 by Ralph Merkle. The tree is a mathematical way to link all the leaves, to the tree top, the root. This allows to efficiently determine if a particular leaf belongs to a specific tree, using only a subset of all the information contained in the tree, the so called “proof”. Once a leaf has been validated to be belonging to the tree, a specific action can be executed safely.
In the blockchain field, the most common use of Merkle trees is to distribute rewards or airdrops (e.g. in Tron it’s used to distribute JustLend rewards) to a large number of users, without actually doing the transfer. The users have to take action directly (paying the TX fees) to claim the tokens, interacting with a smart contract that, together with the Merkle proof, ensures that only allowed users are claiming the correct amount of tokens.
How we built it
Tron SEA is build on Tron using Solidity using TronIDE as deployment platform. The backend is written in php and uses the IEXBase TronAPI library.
Challenges we ran into
There are several Merkle tree code bases available on the web, but none specifically targeted to Tron blockchain and using php as the backend language. We made the effort of handling Tron specific address coding and creating from scratch the Merkle tree creation and proof generation algorithms in php.
Accomplishments that we're proud of
Merkle tree generation and proof creation work as expected, likewise the smart contracts deployed on chain.
What we learned
Even if some code technique is known and somewhat explained in literature, putting together a working product still requires time and effort to solve all the integration issues that always arise.
What's next for Tron SEA - Safe and Efficient Airdrops framework
After mainnet deployment we'll create a real rewarding campaign airdropping a selcted Tron OG community token to users willing to participate in a real world demo of the Tron SEA framework.


Log in or sign up for Devpost to join the conversation.