DistributedCollective / DistributedCollective/Sovryn-smart-contracts

add: deposit collateral - allow users to hold in the currency of the loan

Open
#346 1 comment 0 reactions 1 assignee View on GitHub

@smbsp is already working on this.

Since Jul 29, 2021.

enhancement high priority
Dominant language
JavaScript
Stars
132
Forks
57
PR merge metrics
No merged PRs in 30d

Description

the users' collateral for a margin trade is currently always held in the collateral currency
we need to allow collateral to be held in the currency of the loan
e.g. go rBTC long (trade on iSUSD loan token) but have your collateral held in sUSD (now it is converted to the collateral token - rBTC)
this leads to changing the leverage computation
now, it's clear that the collateral will be converted to rBTC, so if i go rBTC long 3x, i just need to borrow 2x the amount i'm providing, because my collateral is in rBTC (counting towards the position size)
and the collateral would not count towards the position size if the collateral held in the loan token currency - sUSD in the provided example

that's the way many exchanges have it, so some users are used to it
also they're liquidated less quickly
because their collateral doesn't decrease in value if the market is moving against them

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.