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

feat: atomically deposit vault collateral in lending market #1116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gregdhill
Copy link
Member

Closes #1072

@sander2
Copy link
Member

sander2 commented Jul 3, 2023

How is this supposed to work on the client side? The client should automatically pick up the new vault, but the bitcoin will stay in the old wallet, so there has to be some kind of migration there as well

@gregdhill
Copy link
Member Author

Good point @sander2, let's continue the discussion here interlay/interbtc-clients#484

Copy link
Member

@sander2 sander2 left a comment

Choose a reason for hiding this comment

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

Nice and clean PR, but I'd like to see a little bit more thorough testing. Specifically, it'd be good to verify the state changes made by the extrinsic

/// Preconditions:
/// - the Vault is not liquidated
/// - the Vault does not have `to_be_issued` or `to_be_redeemed` tokens
/// - a market exists for the underlying currency
Copy link
Member

Choose a reason for hiding this comment

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

  • there is enough collateral s.t. the qtoken vault is above the secure threshold

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.

Atomically lock vault collateral in lending market and re-lock as vault collateral
2 participants