Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Plasma bridge update - #497

Merged
simonDos merged 10 commits into
stagefrom
plasma-bridge-update
Dec 15, 2023
Merged

simonDos merged 10 commits into
stagefrom
plasma-bridge-update

Conversation

@simonDos

Copy link
Copy Markdown
Contributor

Plasma Bridge Modifications

The plasma bridge will be modified to bridge POL for users trying to bridge MATIC after the upgrade.

The following changes will be made:

Changes Implementation
1. The entire MATIC balance held by the bridge will be converted to POL. This also has the added benefit that there is a sufficient amount of MATIC for unmigration for the StakeManager rewards. A publicly callable function to trigger the conversion has been written for this.
2. When depositing MATIC, automatically convert it to POL on L1 and bridge MATIC

A convenience functionality has been added in _createDepositBlock, which automatically converts MATIC to POL when a user tries to bridge MATIC.

3. When depositing POL, bridge MATIC as well Is caught in the _createDepositBlock as well, changing the token address to MATIC before syncState
4. When bridging MATIC back to L1 (withdrawing), always pay out POL Additional functionality in transferAssets to pay out POL instead of MATIC

Internally, the MATIC address will still be used for all POL bridging operations, as the behaviour of the native token on the PoS side will not be modified and thus can keep operating as usual.

💡 Action items (for deployment):

  1. call updateContractMap on the Registry to add
    “matic”, “pol” and “polygonMigration”
  2. call mapToken on the Registry to map POL to native MATIC
  3. deploy new DepositManager version and update proxy
  4. call migrateMatic on the new DepositManager, migrating all MATIC

@simonDos
simonDos requested review from dev1644 and gretzke and removed request for gretzke December 15, 2023 10:18
@simonDos
simonDos merged commit fce9020 into stage Dec 15, 2023
@simonDos
simonDos deleted the plasma-bridge-update branch December 15, 2023 15:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants