Plasm Lockdrop Introduction

Aleksandr Krupenkin
5 min readNov 21, 2019

--

Photo by Benjamin Bortels on Unsplash

A single ETH transaction to our lockdrop contracts allows you to claim your token. Any account can perform this from a hardware or software wallet (e.g. Trezor, Metamask, and more). Moreover, any ETH holder can participate.

Lockdrop is a method of token distribution. This method involves participants locking an existing token with value (like ETH) for a certain duration. As soon as the lock has been confirmed, new tokens are issued and sent to the locker.

Overview

The Multi-lockdrops for Plasm Network will have three periods:

  1. Ethereum
  2. Ethereum + Bitcoin
  3. Ethereum + Bitcoin + {EOS* and potentially Polkadot(DOT)}

*Update: unfortunately EOS lockdrop isn’t planned for implementation in near future.

The first period will be finished before the Plasm mainnet launch. The total number of tokens to be issued at the first lockdrop is 500,000,000 PLM.

We defined the following parameters.

IssueRate to decide the number of tokens at the second and the third lockdrop.

Locked_eth is the total amount of locked ETH tokens.

DollarRate is an exchange rate Dollar from ETH.

Days is the number of locked days.

The lock duration can be chosen from 100 days to 1,000 days. The duration is what decides the IssueRate via the following formula:

Furthermore, the number of tokens to be issued is determined by the IssueRate.

Where 1/20 of the total amount tokens are developing costs, n is the number of users that participate in the lockdrop, IssueRate_i is the IssueRate of user_i. (These are 150,000,000 PLM) and α_1 is the number of tokens per IssueRate by the first lockdrop.

According to this equation α_2 and α_3, which are the second and third lockdrop parameters, could be decided. These are defined in the following ratio:

The following formula is the number of tokens that users can receive:

First Lockdrop (Ethereum)

The first lockdrop will be finished before the mainnet launch. This is means that this lockdrop result could be used as part of the mainnet genesis block. For example, Alice locked 2 ETH for 30 days and Bob locked 1 ETH for 100 days. In this case genesis block of mainnet after launch will contain records to allocate 48 PLM for Alice and 100 PLM for Bob accounts.

Here is the table for the lockdrop issue rates for each duration:

  • 30 days is 24x
  • 100 days is 100x
  • 300 days is 360x
  • 1000 days is 1600x

Smart contract

This is the repository for our Locikdrop smart contracts, inspired by Edgeware’s smart contracts: https://github.com/stakedtechnologies/ethereum-lockdrop.

Thelockdrop consist of two independent smart contracts:

  • Lock

The first contract is pretty small. It has only one goal: receive funds from creation and give the ability to withdraw it at a certain timestamp. The address of the withdrawer account and the timestamp is provided in the constructor arguments.

  • Lockdrop

The second contract is used as a signaling entry point for ETH lockers. This contract contains the method “lock” that used for locking ETH and signal of interest to getting PLM tokens:

function lock(uint256 _days) payable

This is a payable method. The argument for this method represents the duration for the ETH lock contract being created, starting from the time in which this method was called. For the additional requirements, this method will only accept calls from Externally Owned Accounts, this is to assure that the sender owns the account’s private key.

When a transaction call is fulfilled, the following event will be emitted:

event Locked(uint256 indexed eth, uint256 indexed duration, address lock);

This event record contains the number of locked funds, duration in days and address of the lock contract.

Genesis generation

By keeping a list that records all the Locked events, we can plan the number PLMs to distributed to ETH lockers.

In the above formula, F denotes the rate from ETH to PLM balance operator, described in the “Overview” section above.

Generator tool

The process for collecting locked events and balances list preparation can be automated. So allow me to introduce a tiny lockdrop JavaScript library.

This library has two functions:

getLocks: (address, fromBlock, toBlock) =>

This function collects “Locked” events emitted by contract from the given address, within the given range of blocks.

getBalances: locks =>

This function simply implements the equation for preparing the aforementioned balance distribution.

Finally, this tool is located at the root of the ethereum-lockdrop repository. This comes with a CLI for generating the genesis balances list.

The first lockdrop user scenario

  1. Through using a DApp or directly send user “lock” transaction.
  2. Lockdrop contract emits the “Locked” event.
  3. Lockdrop contract has finished.
  4. StakeTechnologies retrieves the genesis balances list using the generator tool.
  5. StakeTechnologies launch Plasm mainnet with generates balances.
  6. User import Ethereum private key into Plasm wallet.
  7. Through using a wallet, the User sees that PLM was added on their balance from the lock.
  8. The user unlocks ETH when the locking period has finished.
  9. Profit! (literally)

Conclusion

This article discussed the token distribution scheme for Plasm Network. Compared to the traditional ICO, the lockdrop approach has fewer risks and looks promising for a new utility token launch.

Finally, we split our lockdrops several epochs away so that other users from different networks can participate in our token distribution scheme.

--

--