#solana #airdrop #token #saber

merkle-distributor

A Solana program for distributing tokens according to a Merkle root

11 releases

0.3.5 Jun 10, 2022
0.3.4 Jun 10, 2022
0.3.3 Apr 19, 2022
0.3.0 Feb 28, 2022
0.2.2 Oct 15, 2021

#6 in #saber

Download history 24/week @ 2023-10-28 16/week @ 2023-11-04 4/week @ 2023-11-11 5/week @ 2023-11-18 28/week @ 2023-11-25 24/week @ 2023-12-02 6/week @ 2023-12-09 15/week @ 2023-12-16 26/week @ 2023-12-23 2/week @ 2023-12-30 3/week @ 2024-01-06 7/week @ 2024-01-13 21/week @ 2024-01-20 25/week @ 2024-01-27 2/week @ 2024-02-03 39/week @ 2024-02-10

90 downloads per month

GPL-3.0 license

16KB
219 lines

merkle-distributor

Crates.io License Build Status Contributors

A program for distributing tokens efficiently via uploading a Merkle root.

This program is largely based off of Uniswap's Merkle Distributor.

Rationale

Although Solana has low fees for executing transactions, it requires staking tokens to pay for storage costs, also known as "rent". These rent costs can add up when sending tokens to thousands or tens of thousands of wallets, making it economically unreasonable to distribute tokens to everyone.

The Merkle distributor, pioneered by Uniswap, solves this issue by deriving a 256-bit "root hash" from a tree of balances. This puts the gas cost on the claimer. Solana has the additional advantage of being able to reclaim rent from closed token accounts, so the net cost to the user should be around 0.000010 SOL (at the time of writing).

The Merkle distributor is also significantly easier to manage from an operations perspective, since one does not need to send a transaction to each individual address that may be redeeming tokens.

License

The Merkle distributor program and SDK is distributed under the GPL v3.0 license.

Dependencies

~25–36MB
~579K SLoC