Skip to content

Conversation

@chrismaree
Copy link
Member

@chrismaree chrismaree commented May 19, 2022

  • Adds untested haircut logic that can scale the exchangeRateCurrent by some haircut amount, in the event of protocol loss of funds.
  • Adds the ability to pause the addition/removal of liquidity. should be used in conjunction with haircutting to stop LPs from getting the wrong rate until the hair cut is done.

Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
function haircutReserves(address l1Token, int256 haircutAmount) public onlyOwner nonReentrant {
// Note that we do not call sync first in this method. The Owner should call this manually before haircutting.
// This is done in the event sync is reverting due to too low balanced in the contract relative to bond amount.
pooledTokens[l1Token].utilizedReserves += haircutAmount;
Copy link
Member

Choose a reason for hiding this comment

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

What if owner sets this amount too high? Does it break the contract permanently?

Signed-off-by: chrismaree <christopher.maree@gmail.com>
@chrismaree chrismaree merged commit b3f756f into master May 21, 2022
@chrismaree chrismaree deleted the chrismaree/proposed-haircut-solution branch May 21, 2022 21:13
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.

4 participants