-
Notifications
You must be signed in to change notification settings - Fork 187
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
Explain liquidation status better post-withdrawing rewards #1751
Conversation
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch & fix! Modifying this scruct does effects anything else as this specific implementation is the only place we use PostWithdrawLiquidationRewardsStatusTranslations
right?
As an aside, it looks like the output in the slack message has larger spaces between line items. This is due to my most recent PR that updated the slack transport and how is spreads objects. In this context I'm not a huge fan of this. what do you think?
I also don't like the large spaces between items, the entire message is too spread out now and takes up too much screen space. |
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Made a small change to this PR: I removed the post-withdraw messaging for Liquidation status == 1 because this is impossible. After the liquidator/sponsor/disputer successfully calls For reference:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Once a liquidation has expired and the liquidator has withdrawn rewards, the liquidation will be deleted because there are no rewards for other parties remaining. However, the liquidator bot incorrectly translates the ensuing state (state gets reset to 0 once a liquidation is deleted) as "Dispute Failed".
The subtlety here is that after calling
withdrawLiquidation()
on EITHER a failed-disputed-liquidation OR an expired-liquidation, the state will get set to 0:See this incorrect log message's "liquidation status" value for example:
![Screen Shot 2020-07-17 at 08 50 59](https://user-images.githubusercontent.com/9457025/87788775-eaefc900-c80b-11ea-9078-2db04496298e.png)
Corrected log message here:
![Screen Shot 2020-07-17 at 11 12 25](https://user-images.githubusercontent.com/9457025/87801983-84c07180-c81e-11ea-8372-0fc105690429.png)
Signed-off-by: Nick Pai npai.nyc@gmail.com