Tokemak

Introduction

Liquidity in the crypto ecosystem is currently fractured across layer 1s, layer 2s and dexes. This fracture is growing exponentially as more and more projects come online. For example, Uniswap exists on Ethereum mainnet and Polygon. Uniswap is currently running versions 2 and 3. Sushiswap runs on mainnet, BSC, Arbitrum and more. Avalanche and Fantom have Ethereum compatibility which means they compete for the same pool of liquidity as well. More and more L2s and alternative L1s are coming online in search of liquidity and this is causing liquidity to fracture. As this combinatorial explosion happens, liquidity becomes harder and more expensive to source which creates a worse experience for liquidity providers (LPs) and end users.

Tokemak is a new protocol that “sits above” this combinatorial explosion. Tokemak aims to make a protocol which allows it’s users to direct liquidity to where it’s needed most. The protocol is designed in such a way that maximal greediness by the users of the protocol creates the optimal liquidity distribution across the entire ecosystem.

Traditional liquidity providing carries the risk of impermanent loss. While Tokemak doesn’t eliminate impermanent loss entirely, the protocol does provide mechanisms for reducing the impact of impermanent loss to LPs.

Note that as of the writing of this article Tokemak is in it’s “pre-liquidity deployment phase” and that any liquidity provided to the protocol does not get deployed. Actual liquidity deployment will launch sometime in 2022.

High Level Mechanics

There are two main actors in the Tokemak ecosystem: Liquidity Providers (LPs) and Liquidity Directors (LDs). At a high level, LPs provide assets which will then be routed to dexes like Uniswap or Sushiswap by LDs.

There are three main asset in the Tokemak ecosystem: Pair assets, Liquidity assets and TOKE. TOKE is the native token of the Tokemak protocol and is used to reward LPs and LDs. TOKE is also used as a governance token by LDs to decide where liquidity should be directed. Liquidity assets are assets which are looking for liquidity like FXS, FOX or AAVE. Pair assets are Ethereum and a variety of stablecoins like DAI, USDC and FRAX. When Tokemak directs, for example, FOX liquidity to Sushiswap on Arbitrum, FOX will be paired with one of the pair assets, such as USDC, to create or sustain a FOX:USDC pool.

Each asset gets deposited into what’s known as a reactor. Reactors combine pair and liquidity assets with Toke which is used to direct the liquidity of that asset and collateralize it (which will be explained later).

The above graphic visualizes how LPs, LDs, assets and dexes come together in Tokemak. To start, an LP provides ETH as a pair asset. The same LP or a different one provides AAVE as a liquidity asset. An LD provides TOKE (the green arrow) to the AAVE reactor. This LD decides that AAVE should be paired with ETH in Uniswap which causes the AAVE:ETH pool in Uniswap to be funded by Tokemak.

Protocol Properties

Cycles

Tokemak operates in cycles, some are weekly and others are daily. Weekly cycles start between 1:00-2:00pm UTC on Fridays. When an LP deposits assets (pair or liquidity assets) those assets do not get deployed until the start of the next weekly cycle. Similarly, if an LP wants to withdraw assets they must request to withdraw assets in one transaction which tells the protocol to not deploy those assets at the start of the next cycle. When the next cycle starts the user can then claim/withdraw the assets they requested.

LPs do not earn TOKE until their assets get deployed. This means that if an LP provides assets mid-cycle, they do not start earning TOKE until the beginning of the next cycle. The earned TOKE is not claimable until the following cycle. For example, if you provide ETH to the protocol halfway into cycle 3, your ETH will be deployed and start earning you TOKE at the beginning of cycle 4. The TOKE you earn cannot be claimed until the beginning of cycle 5.

Similarly, if you stake TOKE, it won’t be “active” until the start of the next cycle. Once your staked TOKE is active you get voting power within the protocol to direct liquidity. Your votes to direct liquidity take a week to activate as well. Unstaking TOKE requires two transactions as well: a request to unstake (which keeps your TOKE in the protocol until the current cycle completes) and an actual withdrawal (at the start of the following cycle).

tAssets

When an LP provides assets to a reactor they are given a tAsset in exchange at a 1:1 ratio. These tAssets can be later redeemed for the original asset at a 1:1 ratio. For example, if an LP provides 350 AAVE to the AAVE reactor, they will be given 350 tAAVE which can be later redeemed for 350 AAVE through the asset withdrawal process.

One benefit of issuing tAAVE to the LP is that the LP can then trade these tAssets creating a market for them. Owners of tAssets are entitled to reactor assets and earn TOKE.

System Reserve

The reactors in the Tokemak ecosystem rebalance at the end of each cycle. If, during rebalancing, for a given reactor, there are more LP assets than tAssets, the excess LP assets will be pulled into the system reserve. If there are fewer LP assets than tAssets, then the system reserve will be drawn to ensure the reactor is whole. The assets in the system reserve can be found at address 0x8b4334d4812C530574Bd4F2763FcD22dE94A969B.

System reserves are also built through C.o.R.E. events as well, described below.

Deployment Guardrails & Logic

The primary purpose of the following deployment guardrails is to reduce the risk of impermanent loss to LPs.

Guardrails

There are 3 guardrails that must be satisfied when deploying any liquidity:

  1. When deploying asset ABC, no more than 3x the amount of ABC in the reserve can be deployed. For example, if the system reserve has 150 ABC tokens then no more than 450 ABC tokens can be deployed (even if LPs have provided more than 450).
  2. There must be enough of the pair asset (eg ETH) and if there isn’t it’s distributed across all reactors pro rata.
  3. The USD value of TOKE staked in a given asset reactor must be at least 2/3rds the USD value of the given asset. For every $66 of TOKE in an asset reactor, $100 of the asset can be deployed.

The math for these guardrails can be found here. The 3x mentioned in guardrail 1 is known as the system reserve multiple and it will be explained in more detail below.

Logic

Impermanent loss is usually measured in USD. Liquidity providers to traditional AMMs may end up with fewer coins worth more USD than their original investment. Tokemak aims to keep LPs whole in terms of their original investment - if an LP deposits 100 ABC token, they should be able to withdraw 100 ABC token regardless of how it’s price changed.

Since Tokemak deploys liquidity to AMMs it needs to have a buffer to make LPs whole if they were to suffer impermanent loss. This is why guardrail 1 from above requires that no more than 3x the amount of an asset in reserve can be deployed. This guardrail ensures that the reserve can tolerate up to 100% relative price changes for a given pair of assets.

Section 1.2 from the Tokemak documentation shows how a 100% relative price change in an AMM results in a 29% deficit in the token that changed price. If the math of impermanent loss is confusing you can read this article on IL to learn more.

As long as 1/3rd (or 33%) of the deployed asset exists in the reserve, this scenario will not cause LPs to suffer impermanent loss because the protocol can draw assets from the reserve to make LPs whole.

If the system reserve isn’t enough to make LPs whole the TOKE will be used. First, TOKE rewards for the given cycle will be redirected towards making LPs whole. If that’s not enough, staked TOKE will be used. If a pair asset has suffered impermanent loss, TOKE will be pulled from multiple reactors. If an LP asset has suffered impermanent loss, only TOKE from that assets reactor will be used.

If using TOKE to make LPs whole still isn’t enough, the protocol will start using pair assets (ETH and stablecoins) and if that still isn’t enough other assets in the reserve will be used. This final step for making LPs whole is an emergency measure.

To recap, the following steps will be used to mitigate impermanent loss to LPs:

  1. Draw the LP asset from the system reserve

  2. Use TOKE

  3. Use assets in the system reserve

    1. Use Pair assets
    2. Use Liquidity assets

Voting

Holders of TOKE can gain LD voting power by staking their TOKE. Staked TOKE gives 1:1 voting power for liquidity directing. Remember that staking and unstaking of TOKE operate in cycles. Liquidity directing votes are gasless and use Polygon. You can find the architectural diagrams for the voting system here.

TOKE stakers also get voting rights in C.o.R.E. (explained in more detail below) which is also gasless.

Tokemak currently does not operate under a DAO model and thus does not give community members mechanisms to formally influence the future of the protocol. However, there is discussion around how to form and operate a DAO.

TOKE Rewards

30 million TOKE have been set aside to reward early participants in the Tokemak protocol. These rewards can be earned by:

  1. Providing Pair and Liquidity assets (being an LP)
  2. Participating in Liquidity Direction (being an LD)

It’s estimated that these 30 million tokens will be emitted over 104 weekly cycles but it may take longer if optimal reactor balancing doesn’t occur (explained in more detail below).

The protocol distributes 5600 TOKE per day to LPs providing liquidity assets, 2820 TOKE per day to LPs providing pair assets and 4900 TOKE per day to LDs. These numbers are determined by the core dev team.

TOKE distribution to LPs

The amount of LP TOKE rewards allocated to a given reactor (liquidity and pair reactors) is defined as follows:

Where LP_Asset_Percentage is the USD value of the LP asset in a given reactor divided by the total USD value of all LP assets. Similarly, Toke_Staked_Percentage is the number of TOKE voting for a given reactor divided by the total number of staked TOKE.

TOKE distribution to LDs

The amount of LD TOKE rewards allocated to a given reactor is defined as follows:

Reward Maximization

LP and LD rewards are maximized when LP_Asset_Percentage and Toke_Staked_Percentage are equal for each reactor. The protocol runs optimally when all participants in the ecosystem are maximally greedy. If each participant chases the highest TOKE rewards then the system will be in perfect balance and will reward each participant as much as possible.

As an example, suppose there are three reactors: ETH, AAVE and FOX with the following values:

The final two columns are calculated as follows (using the formulas from above).

If we sum all of the LP reward percentages we see that 95% of all available rewards will be distributed. This demonstrates the inefficiencies participants in the protocol would suffer if they deviate from optimal resource allocation. The same is true for LD rewards.

However, when each reactor is balanced as seen below all market participants maximize the rewards they get.

In this balanced table we can clearly see that the LP and LD rewards will add up to 1 which means all available rewards get distributed. I’ll leave the math for calculating the LP and LD rewards to the reader (tip: you can use the formulas below the previous table).

C.o.R.E

In order for a reactor for a liquidity asset (eg: AAVE or FOX) to “turn on” that asset must exist in the Tokemak reserve. Earlier we mentioned that Tokemak builds it’s reserve by moving asset surpluses into the reserve during reactor rebalancing at the end of each cycle. C.o.R.E (Collateralization of Reactors Event) is how Tokemak seeds it’s reserve with assets in order to turn on reactors. Remember that guardrail #1 requires that no more than 3x the amount of a given asset in the reserve can be deployed. If, for example, the reserve has 0 FOX tokens, then no FOX can be deployed because 0 * 3 = 0.

Tokemak holds C.o.R.E. events periodically and during these events TOKE holders vote (using the same voting mechanism described above) to let the core Tokemak team know which liquidity assets the community wants reactors for. Once the voting period ends the Tokemak team reaches out to the teams of the top 5 most voted assets to facilitate a TOKE <> ASSET swap. This seeds the Tokemak reserve with the asset and gives TOKE to the team behind the asset which enables them to direct liquidity.

More details of C.o.R.E. mechanics can be found in this medium post.

TOKE Value Accrual

At it’s core, the value of TOKE is proportional to the value of the assets controlled by the protocol. The larger the reserve and the more LP assets the protocol controls the higher the value of TOKE. This happens because TOKE is used to direct liquidity which is something that some subset of market participants will value. The more liquidity there is to direct, the higher the value of the mechanism (TOKE) which enables liquidity direction.

As a corollary, the more partnerships Tokemak can make with other protocols, the higher the value of TOKE. This is because each partnership builds the Tokemak reserve and enables even more liquidity direction. Each partner of Tokemak has an incentive to acquire and stake TOKE in order to direct liquidity for it’s own token - the Shapeshift DAO will want to have TOKE in order to direct the liquidity of FOX tokens within the Tokemak protocol.

TOKE has a capped supply of 100 million. The capped supply means that holders of TOKE won’t be inflated away and creates dynamics similar to that of Bitcoin. Holders of TOKE don’t have to worry about supply side dynamics and can just focus on demand side dynamics to become wealthier.

Tokemak has hinted at a DAO and presumably the DAO will be governed by TOKE holders which bolster the value accrual mechanism of TOKE.

Bear Case

Tokemak is a new project and hasn’t yet been tested by the market. Tokemak hasn’t launched it’s liquidity direction software and as early adopters we still can’t be sure it will work. As with all new projects execution risk applies - can the team achieve what they set out to achieve? One thing that isn’t clear to me is how the protocol will reliably build up it’s reserve during the weekly rebalances. Maybe there’s an elegant algorithm which will over time build the reserve but I personally have a hard time imagining how a mechanism like that can work reliably (maybe I haven’t thought about it deeply enough). It would be great if Tokemak could describe in more detail how and why they can build up their reserve during the weekly rebalances.

As with all web3 projects, standard smart contract risks apply. There’s always a risk of hacks and this will be especially important with regards to the treasury. If the treasury gets hacked then the liquidity direction power of the protocol will suffer.

Similarly, competitive risk also applies to Tokemak. There isn’t a direct competitor to the protocol right now but that doesn’t mean competitors won’t pop up. We saw a vampire attack by Sushiswap against Uniswap and something similar may happen with Tokemak.

The protocol is still highly centralized. It’s not clear how protocol parameters get updated. It seems like they are updated by the core devs. This is antithetical to the space especially with the explosion of DAOs.

The protocol has set aside 30M tokens to reward LPs and LDs. It’s not clear how users of the protocol will be rewarded once those 30M tokens run out.

Bull Case

I think there are more reason to be bullish on Tokemak than there are reasons to be bearish.

  1. Tokemak has already built a treasury worth $3 billion.
  2. Tokemak has an asset TVL of $1.1 billion (as reported by the dashboard).
  3. Tokemak is solving a real problem in DeFi - the problem of fractured liquidity.
  4. The protocol will be launching on more than just Ethereum mainnet (alternative L1s and ETH L2s are in the works).
  5. Tokemak has made early partnerships with flagship names in the industry like Sushi, Frax, Olympus, Shapeshift and Synthetix.
  6. The tokenomics of the protocol are sensible.
  7. The protocol operates more efficiently when participants are greedy - the protocol is well aligned with how markets operate and embraces greedy rationalism.
  8. Tokemak offers LPs a way of earning yield while reducing the risk of impermanent loss which will likely cause many LPs to migrate to the protocol when it launches.
  9. There is an excited community behind the protocol who will champion it.

Conclusion

Tokemak is solving the problem of fractured liquidity in the DeFi ecosystem. They do this by innovating the concept of a liquidity director and use a token, TOKE, to enable liquidity direction. The tokenomics of the protocol (and it’s token) are sound. Tokemak also offers LPs a mechanism to earn yield while also reducing the risk of impermanent loss. The protocol has built a reasonably well constructed focal point which will likely attract many users. The partnerships the protocol has made and it’s large treasury are strong positive signals of market adoption even though it hasn’t launched liquidity direction yet. The protocol still carries several risks the biggest one being execution risk. If Tokemak can successfully launch liquidity direction while continuing to build it’s reserve then the likelihood of mass adoption greatly increases.

Subscribe to Paymahn
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.