Teleport From Layer 2 With Maker's DAI

Skip the Queue With DAI Fast Withdrawals on Arbitrum and Optimism

Article by Florian Strauf Edited by Frank America


Do you ever drive to the pump and see the gas prices are up once again, and sigh? It may even make you rethink that road trip or consider taking the bus to work. High gas prices don’t only impact drivers however, but influence other arenas. Gas prices can cause shoppers to purchase online instead of driving to the mall, or stay home for Netflix instead of going to the movie theatre. In the 70s and 80s, gas prices rising led to more fuel efficient cars, a trend that continues today with the demand for electric Teslas, and other fuel efficient vehicles. The flight industry experienced a similar workaround with the Airbus A380 aircraft which launched 14 years ago as the biggest commercial aircraft. Today it has been retired by many airlines due to its high fuel consumption and resulting operating costs. Airlines are shifting instead to more fuel efficient alternatives like the Boeing 787

Ethereum is no different. Gas prices are high and have been so since DeFi really picked up in 2020. Long enough for protocols and developers to reconsider their approaches and avoid the high cost of transacting. Applications like Uniswap, optimised their protocol to use less gas, others migrated to alternative chains such as Solana or Avalanche or entirely off-chain to process transactions. The off-chain alternative, Ethereum layer 2, has become a very popular workaround to high gas fees. Layer 2 achieves lower gas fees by running transactions off-chain, but summarising the transaction data back on-chain. Many transactions can take place outside of the high gas price layer 1 environment and only updates of states (like wallet balances) are sent back to layer 1 without losing any of the actual information.

Intro to layer 1, layer 2 and bridges

Ideally, the technical details of layer 1 and layer 2 are hidden from the user and applications can just be run more or less normally. Take Optimism, a popular layer 2 solution for Ethereum. Once users have brought their tokens to layer 2, they have access to a lot of the same applications they know from layer 1. A prime example is synthetic asset investing application, Synthetix, which runs on Optimism and can be used in the same way on layer 2 as on layer 1 minus gas fees.

The mechanism that brings tokens from layer 1 to layer 2 is called a bridge. It involves a smart contract on layer 1 locking up tokens and a corresponding contract on layer 2, responsible for minting the equivalent number of the locked tokens on layer 2. Tokens can be transferred between wallets on layer 2 and wallet balances are regularly sent to layer 1 giving it the security of the main chain. The image below shows how tokens are locked and unlocked when moving between layers.

The main reason why users move to layer 2 is lower gas fees and faster transactions. DeFi users want DeFi to be frictionless like the internet. Parts of this great new technology however, still make it feel like the internet in the 90’s. Withdrawing tokens from layer 2 back to layer 1 can take anywhere from 30 min up to 10 hours. In some cases even 7 days.

Zero Knowledge Proofs — 30 min to 10 hours

Zero knowledge rollups use cryptography, requiring a lot of compute power, to prove that the new layer 2 state committed to layer 1 is a result of a valid computation. This batch execution of valid transactions enables a fast off-ramp back to layer 1 — users will be able to withdraw tokens to layer 1 as soon as the layer 2 state is committed. It is not instantaneous though as proving and committing the state to layer 1 can take anything between 30 min and 10 hours with current implementations.

Optimistic Rollups (One week)

Optimistic rollups assume that the state committed to layer 2 is valid without supplying validity proof (therefore optimistic) and leave a 7 day period for anyone to submit a potential fraud proof if the state is found to be invalid. This 7-day fraud proof window results in a 7-day delay for users wanting to bridge their layer 2 tokens back to layer 1.

An additional annoyance for users is the painful process of moving from one layer 2 to another. The desired application might only exist on Arbitrum and in order to move funds from Arbitrum to Optimism, they would need to be withdrawn from Arbitrum to layer 1 and then bridged back up to Optimism on layer 2.

While layer 2 saves users a lot of gas and scales the whole ecosystem, some parts still lack usability.

Transfer slow, Teleport fast!

The 7 day wait for transfers impacts any token that is moved between optimistic layer 2 solutions and layer 1, including DAI. DAI is a USD pegged stablecoin issued by MakerDAO (Maker). To mint DAI, collateral needs to be posted as backing. To ensure stability, the amount that needs to be deposited to mint 1 DAI must be worth more than 1 DAI. It is overcollateralized. The assets that are used as collateral are ETH, USDC, wrapped BTC and a bunch of others. All assets reside on-chain, making DAI a decentralised stablecoin.

Stablecoins are important. A huge chunk of liquidity (about $60 billion in daily trading volume) in the web3 world comes from stablecoins. MakerDAO knows very well what is happening in the Ethereum ecosystem and is discussing and developing a series of proposals (Maker Teleport, Fast Withdrawals and Maker Multichain Strategy) to ensure great usability of their DAI stablecoin on layer 2. The proposals include improvements MakerDAO is implementing to address two of the prevailing issues around usability with DAI and layer 2: Layer 2 withdrawals and bridging assets from layer 2 (Arbitrum) to layer 2 (Optimism).

The Maker Teleport

Teleportation is the hypothetical transfer of matter or energy from one point to another without traversing the physical space between them

- Wikipedia

Teleportation, should it work, would remove the limitation of travelling at the speed of light since it would create a shortcut between otherwise very far apart locations. The recent boom in layer 2 solutions has led to many different layer 2s, each with their own specialisation and applications. When moving tokens between layer 2 environments, users currently have to withdraw them to layer 1 to then bridge them to the target layer 2 environment. Every transaction on layer 1 is expensive and users will want to avoid them — that’s why they use layer 2 in the first place. A shortcut, such as teleportation, would be handy.

Maker’s Protocol Engineering Core Unit is building upon its multichain strategy by introducing DAI Teleport — the ability for almost instant teleportation of DAI between supported Layer 2s + Ethereum.

- MakerDAO Teleport proposal

The Maker Teleport is available on Arbitrum and Optimism and the Maker team is looking for projects to integrate the Teleport to (a grant scheme has been established — see details below). With teleport a user with DAI on Arbitrum can transfer to Optimism almost instantly, without moving tokens to layer 1, and avoiding a lot of fees. Teleport can do more than just that though. There are plans to extend to more layer 2 environments, enable fast withdrawals from optimistic rollup solutions (details in the section below) and even thoughts about opening up to other layer 1 blockchains (forum post here) to enable multi-chain DAI usage.

The diagram above illustrates the mechanics of the Teleport function in 3 simple steps, with the example of Arbitrum and Optimism L2s. The core of the solution is the Maker Oracle Feed, which monitors the burning of tokens on the source layer 2 and attests the process to the destination layer 2 where the equivalent amount of tokens is minted.

The Maker Oracle is the same oracle that provides price feeds within the Maker ecosystem but has been extended to expose the attestation of teleport usage off chain, so that they can be used within other layer 2 solutions in the future.

MakerDAO plans to have the full Teleport featureset running sometime in Q1 2023. Today, the Maker Teleport is deployed and ready to be integrated with the Fast Withdrawals feature, which allows L2 to L1 teleportation. It’s deployed on Arbitrum, Optimism and StarkNet.

Fast withdrawals with Optimism

As indicated earlier, Optimism, and optimistic rollups in general, have one limitation. The limitation is due to the fraud proof mechanism which leaves 7 days for participants to hand in a proof that the states are fraudulent. Here is how Vitalik describes it:

The security of an optimistic rollup depends on the idea that if someone publishes an invalid batch into the rollup, anyone else who was keeping up with the chain and detected the fraud can publish a fraud proof, proving to the contract that that batch is invalid and should be reverted.

- Vitalik Buterin

For a user this leads to an annoying seven day wait when funds are withdrawn back to layer 1.

Luckily, parts of the Teleport infrastructure can be used to allow near-instant withdrawals of DAI. The concept is the same as above. The oracle monitors burning of tokens on layer 2 and confirms this information, so that new DAI can be minted for the user on layer 1. In a bit more detail and similar to the schematic above, the process looks like this:

High Gas Prices Affect Everything

In the same way that high fuel prices have led to the development of alternative solutions like fuel efficient hybrid vehicles, high gas prices have led to scaling solutions like layer 2 rollups. MakerDAO, through its ability to freely mint DAI, takes its unique position in the ecosystem to make these alternative solutions more user friendly, creating the fastest transferable stablecoin. There are no liquidity constraints to how much DAI can be moved through the Teleport and not having to wait 7 days for a withdrawal from an optimistic rollup such as Arbtirum or Optimism will certainly be well received and used by the whole Ethereum community. From the MakerDAO forum proposal:

This is a game changer not only for the Maker protocol, but the Ethereum ecosystem at large as we can finally offer a fast, trustless, decentralized off-ramp for optimistic rollups.

The even bigger game changer will be layer 2 to layer 2 transfers without having to use an offramp at all. Moving between the supported layer 2 ecosystems with low gas cost and wait times will make using the Ethereum ecosystem feel much more like using the internet today: Frictionless. Easy to use systems have always helped to drive adoption and MakerDAOs fast withdrawals, teleport and its multi-chain strategy are a big step towards a frictionless environment.

Activate DAI teleportation for your users:

With the Fast Withdrawals enabled, you can now integrate the Maker Teleport into your own UI and offer the benefits of almost instant L2 -> L1 transfers to your own users. MakerDAO is now offering 3 grants for builders who are looking to implement the feature. You can use this link to apply to the grant scheme if you’d like to try teleportation.

Grant 1: Earn 5 000 DAI

Grant 2: Earn 3 000 DAI

Grant 3: Earn 2 000 DAI

Gas may be expensive and cause us to make decisions about travel, or how we commute to work. The same is true in the world of ethereum, of layers, and bridges. MakerDAO is taking up the mantle of creating frictionless experiences around gas, and withdrawal times in the world of layer 2s. Perhaps you can take that vacation, now, anon?


Author Bio

Florian Strauf is a technical writer exploring and visualising the tokenomics of various web3 projects.


BanklessDAO is an education and media engine dedicated to helping individuals achieve financial independence.


Disclaimer: this isn’t investment advice. This article has been written for informational and educational purposes only and it reflects my personal experience and current views, which are subject to change.

Bankless Publishing is always accepting submissions for publication. We’d love to read your work, so please submit your article here!

More Like This

DAI, a Different Stablecoin by JakenStake

MakerDAO Let’s Money Grow on Trees by Kalex

MakerDAOs Paradigm Bending Bridging Solution Begins on Starknet by Jake and Stake

Loading...
highlight
Collect this post to permanently own it.
IndyPen CryptoMedia logo
Subscribe to IndyPen CryptoMedia and never miss a post.
#announcements#dai#dao#defi#featured#makerdao#nft#web3