paint-brush
How to Launch a Token With Instant Liquidity [Coders Needed]by@twkaiser
1,341 reads
1,341 reads

How to Launch a Token With Instant Liquidity [Coders Needed]

by Tobias W. KaiserNovember 6th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Initial DEX Offerings (IDOs) have gained recognition as a way to launch fungible tokens. But they still leave a lot of room for improvement. ILS method creates some interesting economic properties. The launch team sets aside a portion of their token supply, specifically for creating a permanently locked liquidity pool. Half of this portion is then put into a smart contract for investors to bid on during the Initial Liquidity Swap (ILP) period, by locking in a different token to create a. different token. The resulting LP tokens are then sent to a burn address.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How to Launch a Token With Instant Liquidity [Coders Needed]
Tobias W. Kaiser HackerNoon profile picture



Since the uprising of DeFi in the of Summer 2020, novel distribution methods for fungible crypto tokens have been created, but they still leave a lot of room for improvement.


In this article, I would like to present a simple method for conducting a fair token launch that instantly and permanently locks up a large portion of the token supply in an AMM.

Motivation


Since the summer of 2020, Initial DEX Offerings (IDOs) have gained recognition as a way to launch fungible tokens.


One of the most promising approaches towards fair IDOs is Liquidity Bootstrapping Pools (LBPs), but there are still several flaws with this approach.


LBPs are a very complicated method for launching a token that depends on a lot of parameters to be set correctly by the project team.


Most importantly, the team members need to have an idea of the eventual valuation of their token.


Furthermore, it is only a slight advancement from the original ICO model that has proven disastrous for many crypto projects and investors in 2017 and 2018.


The launch team still gets to own all the proceeds of the sale, which creates all sorts of misaligned incentives like the ability to do a rug pull the token’s liquidity, or just take off with the IDO proceeds.


IDOs are also a regulatory problem since the SEC and other regulators might classify the token as a security.


On the investor side, the launch team cannot control whether token holders will actually stake the tokens into an AMM, so additional incentives (“liquidity mining”) are needed for the token to actually keep its liquidity.


At the same time, a highly volatile project token creates a disincentive for liquidity provision due to impermanent loss.


I believe that many of these problems could be solved more easily and to a more satisfactory degree using what I like to call an Initial Liquidity Swap.

What is an Initial Liquidity Swap?


Simply put, the launch team sets aside a portion of their token supply, specifically for creating a permanently locked liquidity pool.


Half of this portion is then put into a smart contract for investors to bid on during the Initial Liquidity Swap (ILS) period, by locking in a different token to create a liquidity pair.


This reference token can either be a layer 1 protocol token (e.g. ETH, BNB, TEZ), a DEX token (e.g. UNI, SUSHI, CAKE), or a stablecoin (e.g. USDT, USDC, DAI).


At any time during the ILS period, bidders can either stake more of the reference token or withdraw some or all of their reference tokens again.


Once the ILS period closes, deposits and withdrawals get frozen and bidders can withdraw the project token from the smart contract, which is distributed proportionately to all bidders, based on how much each bidder has deposited during the ILS period.


Finally, the token is listed on a DEX with the other half of whatever percentage of the token supply was set aside for the ILS as one side of the trading pair, and the ILS proceeds in the smart contract as the other side.


The resulting LP tokens are then sent to a burn address, thus locking the liquidity permanently in the AMM.

Economic Outcomes of an ILS


The ILS method creates some interesting economic properties.


First of all: price discovery. The initial trading price of the token is determined by the total amount of the reference token staked during the ILS period.


Most standard AMMs assume that the tokens on both sides of any trading pair are equivalent. Thus, the more reference tokens are staked during the ILS, the higher the initial trading price.


In other words, the initial valuation of the token is not determined by the launch team, but by the free market.


Secondly, a large amount of the initial token pool is locked away permanently as liquidity. This does not prevent you from creating more incentives for people to contribute liquidity of course. You can use this method for whatever token model you like.


For example, you can use all of your initial token supply in the ILS and then have a recurring emission to fund your development and any other incentives (e.g. liquidity mining) you want to have in your project.


You can also conduct a retroactive airdrop, splitting your token supply between past users and contributors, a fund for development, and the ILS. Or you can even have a hybrid of both, or any other kind of tokenomic model that you can think of.


Thirdly, this method makes the launch completely fair. The ILS bidders receive an amount of project tokens that are worth exactly the same as the reference tokens they have staked. Hence the term Initial Liquidity Swap: the bidders are not investors hoping to acquire a token that hopefully rises in value once it is listed, they simply swap the reference token for project tokens at the project token’s first known trading price.


This also makes a huge difference regulatory-wise. For instance, the SEC uses the infamous Howey test in order to determine if a crypto token is a security or not.


The Howey test states that it’s a security if there is an “investment of money in a common enterprise with a reasonable expectation of profits to be derived from the efforts of others” (source: Investopedia).


Bidding on an ILS is therefore not an investment in a security, since bidders cannot reasonably expect to turn a profit from the transaction. They could just as well buy the project token the very second it is listed on a DEX and they would pay exactly the same price as they would have paid during the ILS period.


Of course, it is debatable whether the project token can still be classified as a security, since people can buy the token on a DEX, hoping that the token value will rise later on, but this is the same for all tokens, no matter how they have been created and launched. The ILS itself fails the Howey test with flying colors.


Alternatively, one might consider adding another incentive to the ILS, in order to get people to make their bids earlier in the ILS period and thus help with price discovery, but then the Howey test might not fail.

Technical Implementation

Unfortunately, I can’t code for sh*t, so I’ll just roughly sketch out the smart contract functions that are necessary for an ILS.


Note that this is likely not secure for an implementation, as there might be some dependencies that can lead to a failure and loss of funds, for instance, if someone has already listed the token. So if you want to implement this, please be a little more sophisticated than me right now.


Let ETH be the reference token and PRJ the project token, at the conclusion of the ILS, there will be a set of bidders B1...Bi who have each staked a bid b1...bi worth of ETH and who can withdraw a sum of p1...pi worth of PRJ.


Functions


start_ils(): An amount p worth of PRJ is deposited in the smart contract with a pre-specified end time t that needs to be some point in the future.


deposit_bid(): A bidder B wants to deposit an amount bd worth of ETH. If t has already been passed, the transaction fails. Otherwise, B’s balance b in the smart contract is updated as b = b + bd.


withdraw_bid(): A bidder B wants to withdraw an amount bw worth of ETH. If t has already been passed or the bidder’s balance b < bw, the function call fails. Otherwise, bw is sent to the bidder’s address and his balance is updated as b = b - bw.


list_token(): If t has not passed yet, the function call fails. Otherwise, a token pair ETH/PRJ is created on a pre-specified DEX with the sum of all bids Σb and p/2 as amounts to be added to the liquidity pool. The LP tokens received are then sent to the 0x0...000 address.


withdraw_token(): If t has not passed yet, the function call fails. Otherwise, the function caller’s balance b is looked up and b/Σb * p/2 worth of PRJ tokens sent to the caller’s address. The caller’s balance is then zeroed, or some other measure is taken to prevent him from withdrawing PRJ tokens again.

Outlook

As I said before, I can’t code for sh*t, but I’d really like to see how this plays out in the DeFi realm. I’m thinking about a platform where people can create their own ILS and thus launch their own DAOs, DeFi projects, or whatever. I also have a project in mind that I’d like to use as a test case, but that’s a story for a different article.


So, I’m looking for a few talented humans who can actually code. If you feel a calling to help me implement this, I have set up a Discord channel. Alternatively, you can also write me a DM on Twitter.