https://github.com/maticnetwork/eip-1559-burn
https://github.com/maticnetwork/eip-1559-burn
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/maticnetwork/eip-1559-burn
- Owner: maticnetwork
- License: apache-2.0
- Created: 2021-10-05T12:39:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-16T17:13:02.000Z (over 4 years ago)
- Last Synced: 2025-01-03T08:21:56.816Z (over 1 year ago)
- Language: JavaScript
- Size: 328 KB
- Stars: 1
- Watchers: 23
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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).