Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 16, 2024
Merged

Conversation

simonDos
Copy link
Contributor

@simonDos simonDos commented May 8, 2024

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
Copy link

sonarcloud bot commented May 8, 2024

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
Copy link

sonarcloud bot commented Jun 16, 2024

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
2 checks passed
Copy link

@web3security web3security left a comment

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);
Copy link

@web3security web3security Jun 19, 2024

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