Skip to content

PIP-26: Transition from MATIC to POL Validator Rewards - #60

Merged
simonDos merged 1 commit into
devfrom
send-pol
Jun 16, 2024
Merged

simonDos merged 1 commit into
devfrom
send-pol

Conversation

@simonDos

@simonDos simonDos commented May 8, 2024 •

Copy link
Copy Markdown
Contributor

We will no longer need to convert POL to MATIC before sending it there.

This PR changes that, so that now POL will be directly sent to the StakeManager.
The StakeManager is fine with receiving POL and will switch to using only POL internally soon.

@simonDos
simonDos requested a review from a team as a code owner May 8, 2024 09:52
@sonarqubecloud

sonarqubecloud Bot commented May 8, 2024

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@simonDos simonDos changed the title send POL to StakeManager PIP-26: send POL to StakeManager Jun 13, 2024
@simonDos simonDos changed the title PIP-26: send POL to StakeManager PIP-26: Transition from MATIC to POL Validator Rewards Jun 13, 2024
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@simonDos
simonDos merged commit bcc1ce0 into dev Jun 16, 2024

@web3security web3security left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do encourage to have a review and agreement on the transition phase especially wrt the comment provided.

// backconvert POL to MATIC before sending to StakeManager
migration.unmigrateTo(stakeManager, stakeManagerAmt);

_token.safeTransfer(stakeManager, stakeManagerAmt);

@web3security web3security Jun 19, 2024 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Despite this will solve potential issues while unmigrating during minting (if migration contract does not have enough MATIC) it will eventually create an issue with regard to rewards allocation at the StakeManager contract due to the transition period where both MATIC and POL will be allocated actually producing a situation where users might claim MATIC for their POL.

Here is a script that is being used to keep track of MATIC surplus along the way just to understand the different states that MATIC and POL will have in case that help: https://github.com/Polypheral/rewards-toolkit/blob/main/scripts/stakingDashboardV2.js#L24

@simonDos
simonDos deleted the send-pol branch June 26, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants