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

Ability for vault observers to know liquidated vs closed #4539

Closed
turadg opened this issue Feb 12, 2022 · 3 comments · Fixed by #4640
Closed

Ability for vault observers to know liquidated vs closed #4539

turadg opened this issue Feb 12, 2022 · 3 comments · Fixed by #4640
Assignees
Labels
enhancement New feature or request restival to be done before RUN Protocol Purple Team festival UI
Milestone

Comments

@turadg
Copy link
Member

turadg commented Feb 12, 2022

What is the Problem Being Solved?

The vault's notification stream has a liquidated flag that can be used to determine whether a vault was liquidated, but it currently is state === CLOSED. A user will want the ability to distinguish between vaults closed by them vs by liquidation.

That used to be achieved by getLiquidationPromise() from the vault, but #4527 removed it because,

  • it was much harder to implement in the redesign
  • it created a second stream for notifications from the vault
  • it wasn't used anywhere yet so handling that use case could be deferred (to this ticket)

Description of the Design

Tentatively: add fourth vault state 'LIQUIDATED' and change the name of CLOSED to distinguish.

Security Considerations

--

Test Plan

--

@Chris-Hibbert
Copy link
Contributor

Chris-Hibbert commented Feb 14, 2022

so you want closedByUser and liquidated as distinct states?

@turadg
Copy link
Member Author

turadg commented Feb 14, 2022

so you want closedByUser and liquidated as distinct states?

yes, that would suffice for this issue. Full enumeration is being considered in another ticket #3712 (comment)

@Tartuffo Tartuffo added UI restival to be done before RUN Protocol Purple Team festival labels Feb 14, 2022
@dtribble
Copy link
Member

From #3712
I think that we need to record whether the vault was closed normally or via liquidation. Also it will have a transferring state. So I think the states are:

ACTIVE - vault is in use and can be changed
LIQUIDATING - vault is being liquidated by the vault manager, and cannot be changed by the user
CLOSED - vault was closed by the user and all assets have been paid out
LIQUIDATED - vault was closed by the manager and ... what's up with the assets?
TRANSFER - vault is converted to user state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request restival to be done before RUN Protocol Purple Team festival UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants