Git Product home page Git Product logo

eip-1559-burn's Introduction

EIP 1559 Burn

These contracts are for implementing the EIP-1559 burn mechanism on the Polygon mainnet and Mumbai testnet. It uses Polygon Plasma implementations to batch-transfer and batch-burn MATIC ERC-20 tokens on the Ethereum mainnet and Goerli testnet, respectively.

How does it work?

The same contract is deployed on both chains at the same address. This can be done using CREATE by having the same nonce on an EOA, or using the Deployer contract to deploy deterministically using CREATE2.

  • Deposit native gas token (MRC20) to the contract on the chain child
  • Call the contract's withdraw() function to trigger a withdrawal to the root chain (the withdrawal is performed in the contract's context)
  • Submit the withdraw() transaction proof to the contract on the root chain, on the initiateExit() function with the appropriate plasma predicate
  • Wait for the exit period (7 days for mainnet)
  • Call the exit() function with enough gas (> 370k) and the contract will perform the exit for the tokens and transfer them to 0x...dead (MATIC ERC-20 is not burnable).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.