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

New BSIP discussion: Backing a Market Pegged Asset with multiple assets as collateral #100

Open
grctest opened this issue Aug 23, 2018 · 11 comments

Comments

@grctest
Copy link
Contributor

grctest commented Aug 23, 2018

Title: Backing an MPA with multiple assets
Authors: CM
Status: Draft
Type: Protocol
Discussion: https://bitsharestalk.org/index.php?topic=26948.msg321465#msg321465
Replaces: N/A
Superseded-By: N/A
Worker: TBA

Abstract

Enable configuring multiple assets as backing collateral for an MPA.

Motivation

Currently you can only configure one asset (BTS, UIA or MPA) as the backing collateral for an MPA, so if you want to back an USD MPA with a BTC UIA then you need to do this on an individual gateway basis which would result in many identical purpose MPA.

Current smartcoin supply is dwarfed by the marketcap of USDT, we need to think of ways of increasing supply of MPA such as multi-asset backing to attract shorters from other cryptocurrencies.

Rational

  • If multi-asset backed MPA is successful in generating a large supply then its use on the BTS DEX would provide fees to the reserve pool and attract a lot of new users to the BTS DEX.
  • Settling the MPA for an index of crypto assets would be a relatively simple method of exchanging FIAT into an instant crypto portfolio.

Specifications

Example JSON configuration of an MPA backed by multiple assets:

{
  "reference_asset": {
    "name": "USD",
    "amount": 1,
    "feed_price": bitUSD.median_feed_price
  },
  "allowed_backing": {
    "BTC": {
      "allowed_tokens": [{"name": "<gateway(s)>.BTC", "mcr": 200}, {"name": "bitBTC", "mcr": 200}],  
      "feed_price": (reference_asset["feed_price"]/bitBTC.median_feed_price)
    },
    "ETH": {
      "allowed_tokens": [{"name": "<gateway(s)>.ETH", "mcr": 200}, {"name": "bitETH", "mcr": 200}],  
      "feed_price": (reference_asset["feed_price"]/bitETH.median_feed_price)
    },
    "USD": {
      "allowed_tokens": [{"name": "<gateway(s)>.USD", "mcr": 200}, {"name": "bitUSD", "mcr": 100}],  
      "feed_price": (reference_asset["feed_price"]/bitUSD.median_feed_price)
    },
    "BTS": {
      "allowed_tokens": [{"name": "BTS", "mcr": 175}],
      "feed_price": (1/reference_asset["feed_price"])
    }
  }
}

Discussion

  • How to set feed price of backing collateral?
    • Via internal BTS DEX price references of similar assets?
    • Price feed updates which provides both the 'reference_asset.feed_price' and the 'allowed_backing.ticker.feed_price' values?
  • Should different allowed tokens have different minimum collateral ratios? Currently this is included in the specification example under 'mcr' within each 'allowed_tokens'.
  • Should we account for market fees and withdrawal fees in UIA collateral valuation?
  • How to perform a force settlement of MPA in return for multiple backing assets?
    • Who would be the least collateralized position in a forced settlement?
      • Determined on an individual backing asset basis? (Least BTC position despite highest USD position triggers force settlement including BTC+USD?)
      • Deterined as the minimum total backing collateral value?
    • Could the user have a preference in what they're paid out, even if it means delays?
  • Could you remove an asset as backing collateral if there is 0 of the asset being used as backing collateral?
  • Could you add new backing collateral assets once supply > 1, or would it be finalized?

Summary for Shareholders

  • Proposal for introducing additional (optional) backing collateral assets.
  • Could result in more fees for reserve pool, if successful.
  • Likely would require mandatory network upgrade.
  • Would potentially require a worker proposal to complete, if outside the scope of the bitshares-core dev team.

Copyright

MIT licensed.

See Also

https://steemit.com/bitshares/@cm-steem/draft-bsip-backing-an-mpa-with-multiple-assets
https://whaleshares.io/bitshares/@customminer/draft-bsip-backing-an-mpa-with-multiple-assets

@abitmore
Copy link
Member

Margin calls?

@grctest
Copy link
Contributor Author

grctest commented Aug 24, 2018

Margin calls?

Good point, I covered force settlement from the perspective of the shorter & settler, but didn't cover the margin call mechanism.

The example JSON suggested different levels of MCR for different backing assets, but assuming it's set to 200% (configurable by asset owner) then once a shorter has fallen below the minimum collateral ratio the backing collateral would have to be traded against the MPA to buy back their debt from the open market.

If you have a basket of multiple assets you're using as backing collateral, which backing asset would you be forced to sell to buy back your debt?

If your debt is $50 and you've got $10 in 5 different collateral assets then you'd have to sell across 5 markets, however if you had $5000 in BTC backing, and $10 in LTC backing, would you still be forced to sell the $10 from LTC and $40 from BTC or aught it go for most valuable individual backing collateral?

Horrible pseudocode for selling most collateralized positions first.

if (backing_collateral.length > 1) {
  descending_value_collateral_list = descending_value_sort(backing_collateral_list);

  if (descending_value_collateral_list[0] >= outstanding_debt) {
    // highest value collateral is sufficient
    sell(backing_collateral_list[0], outstanding_debt);
  } else if (sum(descending_value_collateral_list[0:1]) > outstanding_debt) {
    // sell first and second highest value backing collateral
    sell(backing_collateral_list[0:1], outstanding_debt);
  } else {
    // Check further backing assets, attempt to sell batch
    // If the sum of backing assets < outstanding_debt then global settle
  }
} else {
  if (backing_collateral[0] >= outstanding_debt) {
    // highest value collateral is sufficient
    sell(backing_collateral[0], outstanding_debt);
  } else {
    // global settlement
  }
}

Could alternatively sort by ascending order to sell off least valuable collateral first? That would go in line with the least collateralized position rule in force settlement.

What do you think, @abitmore ?

@bangzi1001
Copy link

This BSIP is good to attract a lot of investors from other coins but the prerequisite is we need to have Atomic Swap / Side Chain first.

@bitcrab
Copy link
Contributor

bitcrab commented Sep 18, 2018

I don't think this will make big sense, MPA is defined as trustless asset, but the value of a UIA always depend on the credit of the issuer so is not a good back collateral.

@grctest
Copy link
Contributor Author

grctest commented Sep 24, 2018

@bangzi1001 AFAIK a major concern with current ACCT proposals are that such deposited assets aren't divisible, so if it was used as collateral an user couldn't settle $1 into $1 of ACCT BTC (rather only the whole deposited BTC 'chunk' could be claimed).

If you could claim such backing collateral in a divisible manner then that'd be far more ideal and would qualify the MPA an L1 as opposed to L0 (since UIA backing has no proven collateral on blockchain like BTS).

I don't agree with limiting multi-asset MPAs to atomic-swapped/side-chained assets, there are alternative use cases that may prevent, besides, UIAs are allowed as backing assets for MPA.

@grctest
Copy link
Contributor Author

grctest commented Sep 28, 2018

@bitcrab:

I don't think this will make big sense, MPA is defined as trustless asset, but the value of a UIA always depend on the credit of the issuer so is not a good back collateral.

Using UIA as an MPA's backing collateral has always been possible via the CLI & it's now possible via the UI so we'll probably see UIA backed MPA being created in the near future. This BSIP isn't on the topic of allowing UIA as backing collateral (since it's possible already), but rather allowing multiple assets as a single MPA's backing collateral (e.g. an index backed by all smartcoins, an USD settle-able into a portfolio of assets, USD backed by multiple gateway's EBAs, etc).

There is certainly risk associated with using UIA|EBA (not sidechained|atomic) as the backing collateral for an MPA (Layer 0) - you have to trust that the gateway's backing collateral actually exists and that it won't be issued fraudulently by a malicious actor. An asset owner could limit their EBA selection to those with auditable backing collateral, or simply limit backing asset selection to BTS|L1-MPA which don't have these risks.

On the matter of requiring 'absolute trust' in centralized entities, it's pretty clear given the marketcap of competitor stablecoins (such as Tether) and the large quantity of new centralized stablecoin projects (USDC) that users are willing to take such centralization risks given that their alternative scenario is potentially sustaining large losses holding crypto during a large downtrend.

Perhaps if UIA are used for an multi-asset MPA then there should be the ability to rate limit issuance and potentially block further issuance with a specific UIA (in the case of an gateway being hacked). If you're concerned about users misunderstanding the an MPA's collateral layer, then that's something that could be solved in the UI, no?

@matle85
Copy link

matle85 commented Apr 18, 2019

I think this would be great but there probably needs to be some sort of 'accreditation'/check before a gateway is included - maybe the gateways should also have to report the BTC wallet(s) they are using on chain so that they can be checked? Could even have a deposit type scheme which is forfeited if they're found not to have the backing.

All getting a bit more involved to coordinate but I'm a big fan of us having more liquidity through integrated assets.

@grctest
Copy link
Contributor Author

grctest commented May 3, 2019

I think this would be great but there probably needs to be some sort of 'accreditation'/check before a gateway is included

This would be at the discretion of the MPA creator/owner - they could configure whatever combination of verified/unverified uia/mpa/eba for their multi asset MPA.

@shulthz
Copy link

shulthz commented Nov 14, 2019

I think this should be the main development direction!

We maybe need to solve:

  1. Multi-signature wallet;
    Atomic Swap / Side Chain i can‘t see the process,Cosmos or Polkadot?cooperate with them?
  2. If we solve the Multi-signature wallet, we can design the Primary market New BSIP: Design a Primary market which can map the orders of the Gateway market #245
  3. Margin calls and Blackswan problem, will happen 1 bitusd ≠1 bitusd.

@litepresence
Copy link

I see a specific use case along this line that controls some of the potential complications.

I would like to create the MPA AAAA.XRP that is backed by BTS or MPA's AAAA.USD or AAAA.BTC.

A single party would be the owner of both the loaned instrument and the backing instrument. That same party would provide price feeds for both as MPA.

In this use case I would like to be able to provide price feed to AAAA.XRP in dictionary format for each of the 3 backing instruments of AAAA.XRP.

When user borrows AAAA.XRP he would then choose ONE backing instrument and all settlement / margin call related issues would associate to that one instrument.

A user could separately create a second or third loan contract - unrelated to the first - for AAAA.XRP but with one of the other backing instruments. That settlement would be associated only with that backing.

Does this tight use case resolve some of the concerns mentioned?

@abitmore
Copy link
Member

abitmore commented Feb 15, 2020

In general a BitAsset that is backed by multiple assets would have better liquidity.

The use case that @litepresence described makes some sense. Currently we have to create 3 different BitAssets for the use case, each with a different symbol and backing asset, that's a mess when trading the 3 tokens with other assets.

The more realistic issue for BitShares is the ecosystem. Not like Ethereum which has lots of native tokens being traded in the market, there aren't many native tokens in the BitShares ecosystem -- only the core token and a few BitAssets backed directly or indirectly by it which rely on a strong core token, all others are trust-based (but nowadays people even hesitate to use gateways). The reason is BitShares is not (yet) a smart contract platform. That's why all the comments lead to cross-chain things.

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

No branches or pull requests

7 participants