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

qToken Vaults #1174

Closed
nud3l opened this issue Aug 14, 2023 · 0 comments
Closed

qToken Vaults #1174

nud3l opened this issue Aug 14, 2023 · 0 comments
Labels

Comments

@nud3l
Copy link
Member

nud3l commented Aug 14, 2023

Abstract

Use the interest-bearing lending tokens as vault collateral.

Motivation

Locking collateral in the BTC bridge incurs an opportunity cost for vaults. Opportunity cost can be offset by combining protocols. Here, we suggest using supplied tokens to the lending protocol (qTokens) not used as collateral to be eligible as vault collateral.

Specification

  • Vaults CAN lock the underlying token (e.g., DOT, USDT) in the lending protocol
  • Vaults MUST receive the claim on the underlying token into their free balance as a qToken (LendToken type)
  • Governance MUST define adequate thresholds and ceilings for the qTokens
  • Vaults CAN lock the qToken in the vault registry as collateral.
  • Vaults MUST NOT be able to lock the qToken as collateral in both the bridge and the lending protocol.
  • Users CAN issue iBTC with a vault that has locked qToken collateral
  • Users MUST receive qTokens from the Vault in case of failed redeems
  • Liquidators MUST receive qTokens when the vault is liquidated

Extensions

Atomically swap underlying for qToken as vault collateral

With the introduction of the lending market and adding qTokens as collateral to the bridge, vaults can, e.g., lock DOT in the lending market, obtain qDOT tokens and then use the qDOT as bridge collateral.

However, to move their existing DOT locked as bridge collateral (that is used to back BTC), vaults would have to do self-replace requests:

  • Withdraw free DOT from the bridge
  • Convert DOT to qDOT and lock qDOT as bridge collateral
  • Replace a portion of the DOT collateral with the newly locked qDOT including a Bitcoin transaction
  • Repeat step 1 to 3 until entire DOT vault is moved to the qDOT vault

Instead of doing the multiple steps above, allow vaults that have DOT collateral locked and reserved by users to automatically replace the collateral with a qToken, i.e., allow vaults to replace their DOT vault with a qDOT vault or a USDT with a qUSDT vault.

In a single atomic transaction:

  • Unlock 100% of DOT from bridge collateral
  • Lock 100% of DOT in lending protocol and obtain qDOT
  • Lock 100% of qDOT as bridge collateral

One would not need a Bitcoin transaction as it would not be a replace request.

Issue: #1072

Reference Implementation

Implementation: #737

Security Considerations

The qToken collateral requires adequate thresholds. In this analysis, we propose the following values for DOT and USDT:

Asset Liquidation Threshold Premium Redeem Threshold Secure Collateral Threshold
qDOT 125% 140% 155%
qUSDT 135% 145% 155%
@nud3l nud3l added the roadmap label Aug 14, 2023
@nud3l nud3l added this to Backlog Aug 14, 2023
@github-project-automation github-project-automation bot moved this to New 🆕 in Backlog Aug 14, 2023
@nud3l nud3l closed this as completed Aug 14, 2023
@github-project-automation github-project-automation bot moved this from New 🆕 to Done ✅ in Backlog Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant