Skip to content

Fix Reweight Rounding Errors#22

Merged
Joeysantoro merged 1 commit intoPOZ-Fixesfrom
POZ-Fix-Reweight-Rounding-Errors
Feb 6, 2021
Merged

Fix Reweight Rounding Errors#22
Joeysantoro merged 1 commit intoPOZ-Fixesfrom
POZ-Fix-Reweight-Rounding-Errors

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Feb 2, 2021

Resolves OpenZeppelin audit issue client reported 02

If a reweight happens when the protocol is the only LP, the dust left in Uniswap prevents accuracy when reweighting the peg. The error can be over 5% at times.

The proposed solution is to only withdraw 90% of the LP, leaving plenty of room for a granular peg reweighting. The rounding error is now within a few basis points as opposed to large single digit percentages.

@Joeysantoro Joeysantoro added the OZ Fix New A PR dedicated to fix an OpenZeppelin issue label Feb 6, 2021
@Joeysantoro Joeysantoro changed the base branch from POZ-Combined to POZ-Fixes February 6, 2021 19:55
@Joeysantoro Joeysantoro merged commit 7ea1712 into POZ-Fixes Feb 6, 2021
Joeysantoro added a commit that referenced this pull request Jul 9, 2021
Joeysantoro added a commit that referenced this pull request Jul 9, 2021
…Threshold

Tribe stabilizer FEI threshold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OZ Fix New A PR dedicated to fix an OpenZeppelin issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments