Image for post
Image for post

Liquorice Gen: Initial Bonding Curve Offering (IBCO)

Veronica Coutts
Jun 4 · 7 min read

TLDR; Getting liquidity to launch a token is a non-trivial feat. Either you foot the bill and put up your personal funds as liquidity for your token, or you raise funding and use a part of that as the liquidity. There is, however, a different way. If you are unfamiliar with bonding curves, you can check out to get caught up.

allows a user to create a token bonded to a curve (aka a token bonding curve). The price of the token is determined by the curve, and the collateral being paid into the curve (to buy a token) is stored within the token contract.

Once the predetermined token threshold (and thus collateral threshold as the price is predetermined) is met, the token will then call the contract, and the collateral will be moved out of the token and into , along with some newly minted tokens. The price of the tokens in Uniswap will be the end price of the bonding curve, ensuring a level of continuity for investors.

What is Liquorice Gen

Over the course of the Hack Money hackathon, (’ amazing designer) and I built Liquorice Gen. We used only our wit, , some smart contracts, and (if you are curious as to how we pulled that off, you can read about it ).

In early-stage DeFi products there is a liquidity shortage. this is particularly pronounced at hackathons, where most DeFi products start. The products need to get funding before they can launch a product. The funding goes towards food on the table, liquidity for the token sale, and (hopefully) an audit of the smart contracts.

Let’s run through an example of the lifespan of a token created with Liquorice Gen.

Project walkthrough

If you would like to follow along you can find the , and the . This project is currently only available on desktop and the Rinkeby testnet.

Emilia creates an epic project at a hackathon. Her project needs a utility token (Awesome Token (AWT)). She wants to put her token on Uniswap and have the price set by the free market, but she does not have any cash (or Dai) to spare to seed the liquidity herself.

Emilia then finds Liquorice Gen, and decides to launch her token through it.

Image for post
Image for post

Design your Token

The first thing Emilia will do on Liquorice Gen is set the standard ERC20 information, like the name, symbol and collateral currency of her token. The collateral address in the field by default is the DAI address on the Rinkeby network.

Image for post
Image for post

Advanced Token Setup

Then Emilia will set the liquidity parameters.

Image for post
Image for post

The token threshold is for how many tokens Emilia wants to sell before the token should transition from the bonding curve to a Uniswap market. It is automatically scaled by 1e18 (the standard decimal accuracy for ERC20 tokens). In Liquorice Gen V1 no more tokens will be able to be minted after this transition is complete, so Emilia chooses a high number of tokens.

The minimum number of tokens will only be checked against once the token has expired (i.e not reached the token threshold before the timeout). The timeout is in months and automatically converted into a of now + your_time_in_months.

Curve Parameters

Now that Emilia has her transition threshold, she needs to set the parameters for the bonding curve. These parameters will control the tokens price. As Emilia chose to have a very high number of tokens as her threshold, she will set these parameters to be quite low, so that the tokens are not expensive and the threshold can be reached quickly.

Image for post
Image for post

Summary

Now Emilia selects the “Show Summary” button to calculate all her outputs.

Image for post
Image for post

And here is the summary:

Image for post
Image for post

Full Results

Image for post
Image for post
Image for post
Image for post

Here we can see the end price of the market, as well as how much collateral the bonding curve will need to accumulate before the market will transition. Emilia can see that her number is very high, and she is not sure if she will be able to reach it within her timeframe.

Note: The max token start price already has the 1e18 scaling for decimals removed. This means the last token sold on Emilia’s bonding curve will cost 990,005,000,000.00 in her chosen collateral token!

She has some options to fix this:

  1. Set her minimum and maximum threshold significantly lower
  2. Reduce the steepness of her curve as to make the token prices lower, with the biggest impact being the lowering of the exponential factor (a).

Emilia chooses to lower the number of tokens as well as reduce the steepness of the curve.

Image for post
Image for post

Now we can see that Emilia's token price and collected collateral is much lower.

Image for post
Image for post

Now that Emilia is happy with her token prices and collateral, she can make her AWT tokens by scrolling to the bottom and clicking shes ready!

Image for post
Image for post
Image for post
Image for post

Once Emilia has signed the transaction and it has mined, she will be presented with her tokens’ address.

During the hackathon we did not have time to create a front end for Emilia to sell her token on, so she will need to sort that out.

Below is Emilia’s AWT loaded onto Remix. As there is no Front end right now for the token, this is the easiest way to buy tokens.

Image for post
Image for post

Here we can see the price of a token changing after a buy and sell:

Getting the buy price for 100.000000000000000000 tokens:

Image for post
Image for post

This means that 100 tokens in the beginning of the curve will cost you:

(collateral) 20 000.000000000000002000

Buying some tokens:

Let's buy that 100 tokens. Don't forget to approve the contract as a spender if you are manually following along.

Image for post
Image for post

Getting the new buy price:

Image for post
Image for post

100 tokens will now cost you:

(collateral) 60 000.000000000000002000

Say Emilia impressed a crypto whale while presenting her hackathon. This whale makes their way to Emilia's token and buys the entire supply.

Image for post
Image for post
0 is the max collateral threshold that the whale is going to buy
Image for post
Image for post
The whale now buys the entire market

This buy will push AWT well over the threshold. The contract will only let the whale buy up until the threshold.

Once the whale's transaction has mined, we can see that the market has transitioned.

Image for post
Image for post
These boolean values represent the tokens transition status

We can get the address of the Uniswap pair from the events of the AWT contract.

Image for post
Image for post

Here we can see the tokens being moved into Uniswap V2, and creating a market.

Image for post
Image for post

In the events, we can see that the was created, and we can get its .

Here we can see the token on Unsiwap. We can see the start price being very close to the end price originally predicted by the Liquorice Gen dApp.

Image for post
Image for post
Liquorice Gen originally predicted 4 000 collateral tokens, on Uniswap its 3 980.06 collateral tokens

And, as below, the whale can sell some of their tokens on the Uniswap pair.

Image for post
Image for post

Of course, as the whale bought the entire supply, their selling of tokens will move the market. They also have the option of adding liquidity to the pool, which would decrease the movement of the price, as well as earning the whale interest in being a liquidity provider.

Conclusion

Liquorice Gen provides a novel and innovative way to get your token from 0 to hero, and onto Uniswap V2. We plan on building on this into the future and turning it into a real tool you can use to raise funding for your dApp!

Linum Labs Blog

At Linum Labs, we are a global team of developers…

Veronica Coutts

Written by

A blockchain believer & Ethereum developer. Trying to spread knowledge, peace and critical thinking.

Linum Labs Blog

At Linum Labs, we are a global team of developers, entrepreneurs, and change-makers, building decentralized systems in healthcare and identity.

Veronica Coutts

Written by

A blockchain believer & Ethereum developer. Trying to spread knowledge, peace and critical thinking.

Linum Labs Blog

At Linum Labs, we are a global team of developers, entrepreneurs, and change-makers, building decentralized systems in healthcare and identity.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store