Repository navigation
Conversation
|
|
web3security
left a comment
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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




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.