Pre-Proposal: L1 <> L2 Migration Workflow

L2 Minting with custom bridge

Overview

This design tries to accomplish a full transtition of the Livepeer protocol to a layer-2 solution such that the canonical protocol and Livepeer token lives on a layer-2 solution.

This is a different paradigm than what we’ve seen so far from several protocols who have migrated to rollup solutions (e.g. Balanace, Uniswap, …). For these systems their canonical token contracts still live in Ethereum mainnet. When we consider this paradigm in terms of token balances it means that the supply of a derivative token on another layer will always be equal to what is locked in the token bridge to that layer from the Ethereum mainnet side. This leads us to the high-level workflow for the standard token bridges: funds are escrowed/released in the L1 bridge contract and minted/burnt on the L2 they are transferred to.

In the case of Livepeer however if the entire protocol moves to L2 and inflationairy minting also happens on L2 we have to basically reverse this paradigm. In this case we can consider Layer 1 Ethereum as just “a layer” to which funds can be transferred and spent. However the supply on L1 Ethereum for the derivative Livepeer token will never exceed what is locked to said layer on the L2 side.

L2 => L1 (Including rewards)

  1. User earns LPT rewards on L2 on top of his principal staked amount
  2. User unstakes and withdraws funds from the L2 BondingManager.
  3. User deposits funds into the L2 side of the custom token bridge
    3.1. Funds are transferred from User to the L2 token bridge
    3.2. Funds are escrowed in the L2 token bridge
    3.3. The L2 token bridge adds the amount deposited to the balance for the corresponding L2 token contract
    3.4. A finalizeDeposit message is created and sent into the message brokers
  4. When the message is relayed to L1, the L1 messenger will finalize the deposit on L1
  5. Derivate LivepeerToken' is minted for the user that initialised the deposit

L1 => L2

This workflow can not take place without first having moved funds from L2 to L1

  1. User calls withdraw() on the L1 Token bridge to initiate a transfer of L1 funds back to L2
  2. The amount to send across is burnt from the user’s balance
  3. A finalizeWithdraw message is created and sent into the message brokers
  4. When the message is relayed to L2, the L2 messenger will release escrowed funds to User

Assumptions

  • The initial migration to L2 is left out of scope
  • The current Livepeer token contract on mainnet will eventually become stale once all LPT has been migrated over to L2.
  • Going forward on Ethereum mainnet a new token contract LivepeerToken' will be used.
  • The Livepeer token contract on L2 will be the canonical token contract
  • The monetary policy and inflation is purely managed on L2 and based on the staked funds and total supply on L2 solely.

Pros

  • No usage of oracles
  • canonical protocol on a single chain
  • No changes to monetary policy required due

Cons

  • Monetary policy doesn’t live on the L1 which could be considered most secure, although optimistic roll-up security models come very close to mainnet today
  • Incompatibility with the standard token bridges (L2 tokens would be burnt rather than escrowed)
1 Like