Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Gotts Stable Coins

Gary Yu edited this page Jan 8, 2020 · 6 revisions

Recent Major Changes:

  • (8 Jan. 2020) Currency Pairs vs Trading Pairs
  • (31 Dec. 2019) Creation

Warning1

feedback & discussion zone

Abstract

This page mainly include 3 parts:

1. History

The concept of Gotts stable coins was started in early 2019 and was published at 12th Sep. 2019 until I announced Gotts project. The core idea of Gotts stable coins is the Transaction as the immediate conversion / issuance. When I figured out this idea, I was quite excited and wished Gotts will be the first practical non-collateralized stable coins.

At 30th Dec. 2019, @maxfreeman4 in https://t.me/gottstech asked

I gather it's kinda similar to the xhv idea?

This was the first time I heard xhv. After some quick searching, I found that Haven Protocol and I found that "mint and burn" process of Haven Protocol is almost same as my "Transaction as the immediate conversion / issuance" idea in Gotts. And the point is Haven Protocol was started in early 2018.

I'm happy to see that there's another project sharing the same core idea of Stable coins as Gotts, but to be honest I'm a little bit upset on the situation since Gotts is not the first to the core idea.

2. Comparing between Haven Protocol and Gotts Stable Coins

Same or Similar Parts

Haven Protocol Gotts Stable Coins
mint and burn transaction as immediate conversion / issuance
1 xUSD will always be redeemable for $1 worth of XHV for any stablecoin assets on Gotts chain, at any time, any amount of them can be converted to proper amount of Gotts coins which have the equal face value of those stablecoins
Pricing Oracles Price Feed Oracles
pricing records are embedded in every block header the price info integrated into block headers
Support xAG(Silver), xAU(Gold), xBTC(Bitcoin), xCAN, xCHF, xCNY, xEUR, xGBP, xNOK, xNZD, xUSD Support GoUS, GoEU, GoCN, GoJP, GoUK, GoCA, and maybe GoBTC,GoETH,GOLD
allowing user to simply swap xUSD for xBTC (or in the future xAU, xCNY, xEUR), removes the need for users to convert back to XHV when they desire exposure to market forces support the conversion between Gotts Stable Coins, no need to convert between them and Gotts coin, the chain native transaction can support these cross conversion directly among all these stablecoins.

Different Parts

Haven Protocol Gotts Stable Coins
Haven is built on top of Monero Gotts forked Grin but diverging into completely different direction on the Mimblewimble low level
Haven inherits all of Monero's privacy features, including ring signatures and Bulletproofs Gotts use modified Mimblewimble, with public value and removed Bulletproofs for great scalability
3rd party oracles, partnered with Zel in order to utilise Zelnodes for processing the pricing data Gotts native price feed oracles, with 10% of block reward going to them, and totally 100 price feed oracles listed as consensus
NA evidence and penalty of the fault price feed, blacklist
NA good robustness for price feeds by 15 out of 100 maximum available price feed oracles
Transaction Priority NA

3. Applications

As mentioned in Haven Protocol whitepaper, "Haven Loans is the first of Haven's decentralised finance functions which is expected to be completed mid 2020", "Haven Loans is a crypto loan system built on smart contracts which allows Haven holders to earn interest on their offshored assets".

Comparing to Haven Protocol, there's no such kind of decentralised finance functions defined in Gotts so far. Instead, Gotts mentioned "The price feed oracles need provide corresponding exchange prices, based on Foreign Exchange market info", meaning a blockchain Foreign Exchange market is one of the most important applications of Gotts stable coins.

Blockchain Decentralised Foreign Exchange Market

Let's start from a trivial and naive example, say there's a naive foreign exchange market which only has 212 USD plus 200 EUR, Alice holds 112 USD and Bob holds that 100 EUR, Carol holds 100 USD plus 100 EUR.

Say, at a moment T1, the EUR rate over USD is 112USD/100EUR. Alice expects a rising on the EUR, so she sells 112 USD and buys 100 EUR, therefore now Alice has 0 USD + 100 EUR. Bob buys that 112 USD and sells that 100 EUR, therefore now Bob has 112 USD + 0 EUR.

Come to another moment T2, say, the EUR indeed rises from 112USD/100EUR to 120USD/100EUR. Alice sells all her EUR, now Alice has 112 USD + 6.67 EUR; and Bob buys back EUR from Alice, but he only has 112 USD so only gets 93.33 EUR back, now he has 0 USD + 93.33 EUR.

At this win-lose game, Alice earns 6.67 EUR and bob loses 6.67 EUR at this round.

Let's summarize above procedure into a table:

Time Alice's Balance Bob's Balance Carol's Balance Exchange Rate
T0 $112 €100 $100 + €100 €100 = $112
T1 $0 + €100 $112 + €0 $100 + €100 €100 = $112
T2 $112 + €6.67 $0 + €93.33 $100 + €100 €100 = $120

Now let's switch to the Gotts "blockchain foreign exchange market", almost everything looks same as above, except Alice and Bob does not need each other for executing an exchange transaction. The procedure will change as:

Time Alice's Balance Bob's Balance Carol's Balance Exchange Rate
T0 $112 €100 $100 + €100 €100 = $112
T1 $0 + €100 $112 + €0 $100 + €100 €100 = $112
T2 $120 + €0 $0 + €93.33 $100 + €100 €100 = $120

Please note the difference at moment T2: Alice is always able to sell all her GoUS in Gotts "blockchain foreign exchange market". At this win-lose game, it's still clear that Alice wins $8 and Bob loses €6.67, and notes that $8 = €6.67 at this moment.

Furtherly, actually Bob's involvement is not mandatory at all in a "blockchain foreign exchange market", the above procedure may be changed as:

Time Alice's Balance Bob's Balance Carol's Balance Exchange Rate
T0 $112 €100 $100 + €100 €100 = $112
T1 $0 + €100 €100 $100 + €100 €100 = $112
T2 $120 €100 $100 + €100 €100 = $120

This is the true blockchain decentralisation magic: looks like there is an invisible "central" working there, to process each user's exchanging request.

But in this win-lose game, this looks very weird, obviously Alice earns $8 at this round, but why no one loses $8 here?

It will be clear if looking into the whole "monetary" supply of the system:

Time Alice's Balance Bob's Balance Carol's Balance Exchange Rate M0 in $ M0 in €
T0 $112 + €0 €100 $100 + €100 €100 = $112 $436 €389.28
T1 $0 + €100 €100 $100 + €100 €100 = $112 $436 €389.28
T2 $120 + €0 €100 $100 + €100 €100 = $120 $460 €383.33

Meaning when EUR rising over USD, the total USD "monetary" supply is rising also (M0 change from $436 to $460). Alice "earns" $8, but Carol "loses" $7.14 which should be "earned" if she also sold all her $100 at moment T1. Or in other words, the total EUR "monetary" supply is losing (M0 change from €389.28 to €383.33), Carol's purchasing power in EUR point of view has decreased by €5.95.

Therefore, to answer that question of who wins who loses, at moment T2:

  • Total $ supply increased by $24, including $8 earned by Alice, and $16 "earned" by Bob and Carol.
  • Identically, total € supply decreased by €5.95, Carol "loses" this €5.95.

Conclusion:

  • $/€ ↗ ≡ Total $ ↗ ≡ Total € ↘

Read as EUR(€) rising(↗) over USD($) is identical to total USD($) monetary supply rising(↗), and identical to total EUR(€) monetary supply losing(↘). People who holds EUR(€) win and people who holds USD($) lose.

4. Currency Pairs vs Trading Pairs

Definitions

A currency pair is the quotation of two different currencies, with the value of one currency being quoted against the other. The first listed currency of a currency pair is called the base currency, and the second currency is called the quote currency.

The currency pairs are written as XXX/YYY or simply XXXYYY, where XXX is the base currency and YYY is the quote currency. Samples of these formats are USD/CNY, EUR/USD, USD/JPY, USDCNY, EURUSD, and USDJPY.

For example, the quotation USD/CNY = 6.9454 means that one U.S. dollar is exchanged for 6.9454 Chinese Yuan. In this case, USD is the base currency and CNY is the quote currency. We use the term price pair to describe this quotation.

The term trading pair describes a trade between one type of currency and another. Samples of the “trading pair” are USD/CNY, EUR/USD, USD/JPY, and BTC/USD.

Existing Issues

In Gotts system which support free conversions among a few of currencies such as USD, EUR, CNY, JPY, GBP, CAD and BTC & ETH, the trading pairs are any two of them. Let's list all supported trading pairs into a table:

(Trading Pair) USD EUR CNY JPY GBP CAD BTC ETH
USD \ EUR/USD CNY/USD JPY/USD GBP/USD CAD/USD BTC/USD ETH/USD
EUR USD/EUR \ CNY/EUR JPY/EUR GBP/EUR CAD/EUR BTC/EUR ETH/EUR
CNY USD/CNY EUR/CNY \ JPY/CNY GBP/CNY CAD/CNY BTC/CNY ETH/CNY
JPY USD/JPY EUR/JPY CNY/JPY \ GBP/JPY CAD/JPY BTC/JPY ETH/JPY
GBP USD/GBP EUR/GBP CNY/GBP JPY/GBP \ CAD/GBP BTC/GBP ETH/GBP
CAD USD/CAD EUR/CAD CNY/CAD JPY/CAD GBP/CAD \ BTC/CAD ETH/CAD
BTC USD/BTC EUR/BTC CNY/BTC JPY/BTC GBP/BTC CAD/BTC \ ETH/BTC
ETH USD/ETH EUR/ETH CNY/ETH JPY/ETH GBP/ETH CAD/ETH BTC/ETC \

A naive solution, to support all above trading pairs, is to integrate all corresponding price pairs into block header. For example, a practical price pair among USD, CNY and JPY may be as follows:

(Price Pair) USD EUR CNY JPY GBP CAD BTC ETH
USD
EUR
CNY 6.9369
JPY 108.43 15.64
GBP
CAD
BTC
ETH

The problem is that this will be a major defect if we provides the price pairs like this, because 108.43/15.64 ~= 6.9329 < 6.9369.

If someone executes a series of loop conversions in this order: CNY -> JPY -> USD -> CNY, he/she will get a considerable amount profit, but which is obviously an unreasonable inflation in the system.

Solution

The solution to fix above issue is using the base price pairs. For example, we can define 7 "base price pairs" in Gotts system:

  • USD/EUR = a
  • USD/CNY = b
  • USD/JPY = c
  • USD/GBP = d
  • USD/CAD = e
  • BTC/USD = f
  • ETH/USD = g

Therefore, the price pairs in Gotts system will be as follows:

(Price Pair) USD EUR CNY JPY GBP CAD BTC ETH
USD \ 1/a 1/b 1/c 1/d 1/e 1/f 1/g
EUR a \ a/b a/c a/d a/e a/f a/g
CNY b b/a \ b/c b/d b/e b/f b/g
JPY c c/a c/b \ c/d c/e c/f c/g
GBP d d/a d/b d/c \ d/e d/f d/g
CAD e e/a e/b e/c e/d \ e/f e/g
BTC f f/a f/b f/c f/d f/e \ f/g
ETH g g/a g/b g/c g/d g/e g/f \

Another good return of this fix solution is that we will have much smaller price feeder data than the full price pairs (7 vs 56), saving 87.5% data.