“I think everyone would feel better if we had some flan.” — Ross Geller

Limbo Dev Update part 1 of 2: The Flan Genesis Event

Limbo is the upcoming yield farming dapp created with the prime intention of raising liquidity for tokens to be traded on Behodler. A motivation for Limbo can be found here.

This is the third instalment in a series of dev updates surrounding Limbo. See part 1 and part 2.

Sustainable yield farming

Yield farming and reward staking in general can be implemented in one of two ways: the inflation model or the closed loop model. The inflation model involves an ongoing giveaway of protocol tokens as an incentive to stake another desired token such as a liquidity pool (LP) token. This can be thought of as a continuous airdrop. The value of the protocol token is undermined by ongoing inflation but the hope by project creators is that the reward seekers will pool enough liquidity to offset the inflation. The inflationary model is often labelled unsustainable because either the protocol token runs out (in the case of a fixed pool) or the token inflates to the point of undermining the staking rewards, eventually triggering an exit by staked users in search of greener farms. An APY of 1000% in protocol tokens might work out to a negative return when priced in stablecoins.

A closed loop farm, by contrast, acquires its yield from protocol revenue redirected into farming. Here, there’s often an existing underlying dapp such as an automated market maker (AMM) which collects fee revenue. This is then either directly given to farmers who stake liquidity or is used to purchase the protocol token which is then given to farmers.

While a great deal of rug pulls and scam tokens are launched under the inflationary model, some very legitimate projects have started with this model in order to bootstrap liquidity and then later moved across to a closed loop structure. The most well known example is Sushi which started as a pure inflationary farm with no value creation offered in order to draw in Uniswap liquidity. Once a threshold was reached, an AMM was initiated and all of the staked Uniswap liquidity was migrated to Sushiswap liquidity. At that point, Sushi enabled a protocol fee on trades and since then has used the fee revenue to pay for yield farming activities, closing the loop on incentives.

Sushi and Pancake demonstrate an important but subtle point about inflation. A token that is continuously minted in order to reward stakers does not make a protocol inflationary. If $10 of Sushi is minted as a reward but $12 is directed from the protocol revenue to buying Sushi then the protocol is closed loop and the token will rise in value. We see this with the price of Ether where the linear minting of Ether is overwhelmed by the exponential growth of the Ethereum economy.

Limbo falls under the closed loop umbrella and specifically the one that makes use of an continuously minted reward token, Flan. When first outlined, the question of how Flan would get its initial value was not clear and adopting the bootstrapping approach through inflation was considered. However, unlike protocols that release a yield farm in the hopes of creating a dapp, Limbo already has a supporting dapp with liquidity in the form of Behodler. As such, Flan can be immediately bootstrapped with real value, backed by Behodler which means staking on Limbo from day 1 will be closed loop. This bootstrapping event is known as the Flan Genesis Event. This article addresses 3 main points:

  1. The Flan Genesis Event.
  2. How Flan retains its value: compound liquidity and the unlimited APY(numerical examples).
  3. Flan’s price targeting mechanism and new Limbo features (tokenomics).

In building out the Genesis Event, I discovered something quite wonderful about Flan’s price so stick around to the end. One of the most exciting implications of Limbo is that in time, it will be able to sustainably offer the highest APY on mainnet for tokens that usually receive very low returns.

Genesis Event

When a token is listed for trading on Behodler, the value added to the AMM has to equal the average value of existing tokens. Right now the average locked value per token on Behodler is around $10000. So if we were to add a dollar stablecoin, we’d need to add 10000 units in order for the price on Behodler to reflect $1. If we added more, the price would be below $1 and if we added less, the price would be higher. At that point, anyone could arbitrage the price to parity. However, if we create a token from thin air and list it on Behodler, it has no existing value and so the market has no way of knowing if it is correctly priced. Suppose I create a new token called ToDai4(2DAI) and listed it on Behodler. I then add 5000 2DAI to Behodler. Do we know whether 5000 2DAI is worth $10000? No. But we also don’t know it isn’t. So by listing 2DAI in this way, we’ve declared its starting price at $2. In this scenario, traders have no ability to arbitrage 2DAI’s price with AMMs since it doesn’t exist anywhere else. Suppose that we mint a total of 10000 2DAI. We add 5000 to Behodler and generate SCX. We then use that SCX and pair (some of) it with the other 5000 2DAI on Uniswap in a ratio that gives it the price of $2. We now have two AMMs each listing 2DAI at $2. Again there’s no reason to think this price is incorrect. If the creator of 2DAI later takes actions to underpin the $2 such as making 2DAI redeemable for two Dai then the price is correct.

So using this approach to bootstrapping a token’s price on Behodler is a three step process:

  1. Declare the value using Behodler
  2. Provide a support to the declaration using Uniswap and the SCX generated from step 1.
  3. Create a credible mechanism to support the declared price.

This is the Flan genesis event in a nutshell. An initial price for Flan will be declared. This price can be calculated with a formula. Most importantly the formula can be codified into a smart contract. Limbo’s migration mechanism will ask the question ‘Is Flan’s price equal to the price implied by the formula?’ If Flan is lower than the formula price, the generated SCX from migration will be used to push Flan’s price back up to parity. If it is too high, Flan will be minted. The mechanism used to adjust the price will be price tilting of the Uniswap (or Sushiswap) token pair of Flan/SCX. In a previous update, it was mentioned that the SCX would be used to buy Flan but price tilting achieves the same price result but with far more net liquidity added to the market.

Sustainable Flan: APY targeting.

The easiest way to think about this is through a numerical example.To keep this analysis simple, assume the price we want for Flan is 1 Dai. We assume Behodler has 10000 Dai and the current price of SCX is $400. For the genesis event, we’ll mint 20000 Flan and seed Behodler with 10000 which will generate just under 600 SCX. We’ll then pair the other 10000 Flan with 25 SCX on Uniswap and burn the remaining SCX.

We now initialise Limbo with an inaugural pool of Aave. This pool is for migrating to Behodler and so we set a threshold of how much Aave we need to raise in order to kick off a successful migration. Since the average bonded token value is $10000, we need to set the threshold to $10000 of Aave. Aave’s current price is $325 so we need to raise 31 Aave.

Next we need to figure out an APY. More specifically, we need to figure out how much Flan to offer per second in order to imply an APY. Suppose we set the Flan Per Second (fps) for the Aave pool to 1. The first person to stake Aave will receive the entire 1 Flan every second. If this user stakes $10 worth of Aave, the implied APY is 1x60x60x365/10 = 315,360,000%. Suppose a second person arrives with $40 of staked Aave. The first staker now receives 1/5th of the original fps while the new staker receives the remaining 4/5ths. For the first staker, their APY has fallen to 63,072,000%. So as stakers join, the APY for existing stakers falls as the proceeds are shared with more users. Taken to its extreme, eventually we reach a point where just shy of 31 Aave is staked. This brings the total to just under $10000. The initial staker of $10 now receives an APY of 10/10000x315,360,000% = 315,360% APY. For this pool, the minimum APY per dollar of Aave staked is 31,536% and this occurs when the pool has just less than the required quantity to trigger migration.

This metric of minimum APY is something unique to Limbo. Other farms have no upper limit on how much input token can be staked and so the APY can rightly fall to almost zero. With Limbo, we can program in a worst case scenario so that when you see a minimum APY, you’re guaranteed of getting higher than that so long as the pool is active.

Limbo has a function for APY targeting so that the community calibrating Limbo does not have to figure out what a given fps implies. Suppose in our example of Aave, we wish to target a minimum APY of 20%. This implies an fps of (0.2x10000)/365/24/60/60 = 0.00006342. Limbo will figure that out so long as you supply the 20% figure.

Price Impact

In order to calculate sustainability, we need to know how the Flan price will be affected by a given rate of fps. In the case of the Aave example, we’ve calculated an fps of 0.00006342. Suppose we believe that the Aave pool will raise enough liquidity in a month in order to migrate to Behodler. We then only need to mint 0.00006342×60×60×24×30 =164.38464. However, that’s only $164.38. The stakers have handed over $10000 in Aave and have only reveived $164.38 in Flan. Not the best deal. For this reason, Limbo has a feature known as a crossover bonus which is designed to compensate the stakers so that they either break even or make a profit staking Aave. The bonus is divided in proportion to quantity staked. For instance, suppose the crossover bonus is 1000 Flan. If you stake 1 Aave out of a pool total of 31 then you receive (1/31x1000=)32.25 flan. The crossover bonus is composed of a two parts: a lump sum and a per second change in the lump sum. The per second change can be positive. In this case we could set a crossover bonus initially low and as the pool runs, the bonus would grow. Or we could set the crossover bonus to be very high and give it a negative change per second so that the reward gradually falls. Both offer different incentive advantages.

For the purposes of this pool, we’ll set the crossover bonus to 10000 Flan. We’ll then set the change in bonus to -0.00006342 flan per second so that it perfectly offsets you staking rewards. This means that if you stake $10 of Aave and wait to the end, you will receive $10 of Flan in compensation.

So in this scenario, we know that whatever happens, we’re minting an additional 10000 Flan to be given to stakers.

Let’s now assume that the stakers dump their flan the moment they receive it. Currently there are two AMMs with Flan: Behodler and Uniswap. If stakers dump the entire 10000 on one, the price will be out of sync and arbitrage traders will buy on the low priced one and sell onto the high priced. So the only way this is dumped is through equal measures on both Behodler and Uniswap, implying that the quantity on each will be 15000 Flan. Looking at Uniswap, the Flan dumped onto Uniswap will be in return for SCX so that the Uniswap pair after this process will have more Flan than before and less SCX. Plugging the numbers into Uniswap’s constant product curve formula, reserves on Uniswap will change from:

Before: 10000 Flan and 25 SCX

After: 15000 Flan and 16.68 SCX

The new price of Flan will now be 16.68/15000 = 0.001112223334446 SCX. Since SCX is worth 400 Dai, this implies the new Flan price will be 0.45 Dai.

Migration Boost: Price tilting Flan back up to 1 Dai

This isn’t the end of the story. At the point of migration of Aave to Behodler, 593 SCX is generated. Recall that the nature of SCX implies that in order to not inflate the price of SCX, we need to burn most of this and only keep a quantity known as the rectangle of fairness. In this example, we keep 25 SCX since at $400, it is equal in value to $10000 and we burn the rest.

If we simply add the 25 SCX to Uniswap, the new Flan price will be (16.68+25)/15000 = 0.002778667 SCX = 1.11 Dai which overshoots the target price. This is good news since it means that with the migration of Aave we can easily reverse the effects of Flan inflation. If we left it at this, the stakers wouldn’t only receive their full value in flan but in fact would receive an 11% return on the provided Aave.

However, since we’re targeting parity with Dai in this fictional example, we use this opportunity to mint more Flan and pair it with the extra 25 SCX. $1 of SCX is 0.0025 so we need the price of Flan to be worth 0.0025 SCX. Our final reserve for Flan must be 16672 because (25 +16.68)/0.0025 = 16672. So we need to mint (16672–15000=) 1672 Flan and send it to Uniswap with 25 SCX created from migration.

Compounded Liquidity

The result of our initial migration is more liquidity on Uniswap and an unaffected Flan price. To see why, imagine we list another token after Aave and again dished out 10000 Flan to stakers. And assume they dump 5000 Flan on Uniswap as before. If we plug those numbers into the Uniswap equations, we end up with a final price for Flan at 0.5922 Dai. Recall after the Aave listing, Flan fell to 0.45 Dai. This shows that each successive migration deepens liquidity.

We can use this deeper liquidity of Flan to offer more pools concurrently or we can raise the APY on existing pools or some combination of the two. If we increased the number of migration pools, we’d accelerate this process of liquidity deepening as we’ll have more frequent migrations. And if we raise the APY, we’ll draw in more users and cross the threshold on existing pools quicker. Either way, each migration plants the seeds of success for future migrations.

The depth of liquidity for Flan increases so that over time, those receiving Flan rewards will be able to sell them without creating a price impact. This in turn will discourage holders of Flan from dumping in the first place, giving each successive migration even more power to raise liquidity. This is how the loop is closed on Limbo and how Flan will become one of the most liquid tokens on Ethereum.

Credibility

Modern central banks tend to set targets which they work towards achieving such as a band of acceptable inflation rates or a foreign currency. Indeed, many central banks simply pick a liquid foreign currency (usually the US dollar) and set monetary policy around establishing parity of their own currency with that of the dollar. At first they have to expend great resources cajoling the market into pricing their currency on par with the dollar. But if they’re successful, market participants begin to expect the currency to match the dollar. If the currency temporarily dips below $1, arbitrage traders buy it up in the expectation that the central bank will reestablish the target successfully. However, this becomes a self fulfilling prophecy as the act of buying it cheaply is what gets it back to its target. At this point, we say that the central bank has credibly established a link to the dollar because they no longer even have to maintain it.

With each successive migration, Flan’s return to parity with its price target will establish credibility such that when Flan rises above or falls below its intended price target, traders will reestablish parity in order to profit from the inevitable return to parity. Eventually, like Dai, Flan will become synonymous with its target.

Choosing the perfect price target: creating a synthetic LP token

One of the most obvious targets would be the price of Dai. However, in the white paper, I argued that the price of SCX represents the price of marginal liquidity which is different from how Uniswap LP tokens are priced. For an LP token, the price is simply the total supply of the token divided by the aggregate value of tokens in the pair. For instance, suppose we have an LP token of USDT/USDC with a total supply of 10000. In it there are 2000 USDT and 2000 USDC. This makes the price (10000/4000=) $2.5.

What if we were to price SCX as though it were an LP token? The current value of reserves for the average token on Behodler is $10000. There are currently 12 tokens on Behodler, taking aggregate liquidity to $120000. The current SCX total supply is 7,328. Pricing SCX as an LP token then is 120000/7328 = $16.38.

If holders of Behodler had a way to hold an LP version of SCX, they could then choose their exposure to Behodler based on whether they want access to the cutting edge of marginal liquidity (SCX) or an average representation of locked value.

Since this price can be calculated algorithmically, we can set it as the target for Flan on each migration.

Using the power of Limbo, we can now make Flan Behodler’s global synthetic LP token. If you ever wish to redeem your liquidity on Behodler in a manner similar to how LP tokens release a proportionate value of liquidity from Uniswap, you need only sell Flan.

Flan’s value is strongly influenced by how many bonding curves exist on Behodler (breadth of liquidity) whereas the primary driver of Scarcity’s value is strongly influenced by the value of average liquidity per token (depth of liquidity).

Traders now have a way of exposing themselves to both the depth and breadth of Behodler liquidity through choosing to hold Flan or Scarcity. In addition, those wishing to “redeem” their liquidity using the familiar mechanics of an LP token can now do so by simply selling Flan.

Implication of Flan depth: perpetual pools

As Flan liquidity deepens, we become less reliant on migration pools to maintain the peg for the same reason that a central bank can take its foot off the pedal once credibility is established. This allows us to create perpetual pools where migration is never offered but stakers simply receive an ongoing reward in Flan. Perpetual pools are only possible once we’ve had at least a few successful migrations so that the Flan liquidity depth is sufficient.

The 3 most obvious candidates for perpetual pools are SCX, EYE and Flan. each offers an ecosystem benefit. For locking up SCX, we encourage minting and holding of SCX, increasing liquidity on Behodler and indirectly bolstering the value of Flan for future migrations. For EYE, we strengthen the governance of Behodler if we can raise the price of EYE because doing so raised the cost of attacking the governance structures. And by locking Flan, we allow the migration price tilting mechanics to focus more on liquidity growth, bolstering the whole of Limbo.

An alternate take on perpetual pools is the dapp Bonfire. Here, a contract receives an ongoing stream of Flan which accumulates. Holders of EYE or SCX can send in either in return for the total accumulated Flan. The received EYE and SCX is then burnt. Bonfire is a sustainable automated buy back and burn dapp.

Coming up

Now that we know how SCX can be used to support the value of Flan, we’re ready to understand how Flan will support both the value of SCX and EYE. This is covered in the next part of this two part update. Here, the long term vision of Pyrotokens in closing the incentive loop and helping to supercharge Behodler’s liquidity growth will finally be revealed.

Summary of features added to Limbo since last update:

  1. Exogenous price targeting of Flan (Flan’s monetary policy)
  2. Protocol reward token buyback-and-burn: when a token that earns rewards such as Curve LP is staked, Limbo accumulates Curve rewards. A function exists now that automatically buys Flan with the accumulated Curve and burns the Flan. The person who calls this function receives 1% of the Flan bought. In this way, stakers gain value without requiring any gas intensive compounding strategies. This allows us to tokenize other yield farms and redirect their rewards into Flan. For instance, if we tokenize a staked token on Sushi’s Onsen and then list that token on Limbo, the Sushi rewards will accumulate on Limbo which can then be used to buy and burn Flan.
  3. APY targeting: unlike the ubiquitous Masterchef.sol which allocates a portion of new yield as a percentage of a fixed ongoing supply growth, Limbo allows us to now directly set the minimum APY on a migration pool.
  4. Genesis event preparation.
  5. Altered migration and hardcoded rectangle of fairness (bonus points if you know why the rectangle is hardcoded).
APY target logic

--

--

--

Behodler DEX is a next-generation liquidity protocol that using omnischedule token bonding curves.

Recommended from Medium

Australian Senate Crypto Report — Recommendation 1: Licensing for DCEs

Australian Senate Crypto Report - Recommendation 1: Licensing for DCEs

The first drop is going live!

Introducing ASVA NFT Marketplace powering cross-chain NFT Trades

SingularityDAO Launchpad

Getting Started with Ethereum Smart Contract Development

US Government calls for more industry input

US Government calls for more industry input

UrbanHero’s one of a kind reward system! Disrupting the crypto gaming scene.

Dogecoin API and its usage

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Justin Goro

Justin Goro

Creator of WeiDai and 92 times emperor of Tsuranuanni

More from Medium

WBLN Liquidity Pool Statement

Token Economy (Token Matrix) — 2

ZUNA is a community driven DeFi Token.

ARTHESIS & Trinity Acceleration partnership