Pages:
Author

Topic: Decentralized, Trust-less, Multi-Currency, Interest-bearing, Bank and Exchange (Read 3748 times)

hero member
Activity: 770
Merit: 566
fractally
It was an amazing idea, but Friday night I discovered the flaw with its economic model and as a result the crypto-Gold would never be able to track actual gold.

Imagine you were trying to make it work with crypto-art.   Only one painting exists, yet people could issue as many 'crypto-paintings' that were 'in theory' the same price as the one and only crypto-art... but of course they could not all purchase the crypto-art on the market.

sr. member
Activity: 350
Merit: 250
Amazing idea!!! Looking forward to see it running.

But I don't understand how fiat currencies will get to the system and where they will be stored??
hero member
Activity: 770
Merit: 566
fractally
I have taken the ideas in this thread to a whole new level and started a new thread to discuss them:

https://bitcointalksearch.org/topic/m.2259254

The primary difference is that I eliminated the need to post more collateral than the current exchange rate, eliminated the need to define a mortgage term, and eliminated the need for a fixed transaction fee.  The result is I removed all price fixing which as always fatal to economic systems.   I also eliminated entirely the potential for there to be 'insufficient backing' for crypto-Fiat.
hero member
Activity: 770
Merit: 566
fractally
A similar idea was previously posted in another thread and got warm welcome... probably because it was slightly better explained.  I am reposting this here because understanding nii236's idea as implemented via Open Trx, BitMessage, etc gets you 90% of the way to my idea which uses only the blockchain of a new crypto-currency.


I proposed something that was basically the same thing, but instead of cvTokens I proposed digital fiat which is issued when BTC is deposited into a pool.

https://bitcointalksearch.org/topic/a-proposed-method-to-facilitate-p2p-trading-between-fiat-and-cryptocurrencies-214431


Very cool, this is basically what I was proposing.  You 'deposit' BTC into a pool by 'mortgaging' it and it issues crypto-fiat.    Your idea used Open Trx and didn't allow for posting of additional collateral and thus downward deviations in the BTC price were directly reflected in the redeamability of the dUSD.   It also required people to use 2 systems: Open Trx + Bitcoin and Open Trx requires federated servers which don't require "trust-per-se" but they are still 'centralized' and potentially a legal liability.   I suppose an Open Trx server running behind BitMessage  would be a start.

So to implement my idea in your terms you would deposit your BTC in an OT server.  Then you would ask the OT server to mortgage your BTC for dUSD at 50% face value and you would end up paying interest for this privilege.  You must pay interest because you are effectively 'borrowing' USD from the network (society) AND there is risk of default and potential for your collateral to drop by 50%.    

Other people are willing to hold dUSD because it is paying them interest which makes up for the fact that there is still transaction friction between getting into and out of dUSD and the fact that they are exposed to some BTC risk.

Later when you want to pay off your mortgage you only get the collateral back that wasn't used to pay interest.  You would pay off your mortgage because the collateral is worth more than the dUSD and thus you are motivated to accept deposits from people.

I just implemented all of this directly into the blockchain.
hero member
Activity: 770
Merit: 566
fractally
One thing I found confusing is how a dscoin is supposed to represent crypto-USD. Your recent post helped explain it.
I am working on a revised more detailed white paper.  I am still sifting through this idea.

Your whitepaper never uses the term "mortgage". It is also not clear what happens if we try to simultaneously try to use DScoin to represent different currencies (even gold). Obviously, each currency would have its own dscoin exchange rate.
DScoin's do not represent different currencies, they BACK different fiat-coin outputs that are their own currencies sharing the same block chain.    My prior example shows how a mortgage trx would effectively be a 'coinbase' for a new crypto-USD output.

The rest of your post was derived from a misconception of how DScoins relate to other coins.  No baskets are ever even on the table.



hero member
Activity: 770
Merit: 566
fractally
I have been looking into how I would modify the block chain to support everything so here are some concrete changes:

1) Every INPUT / OUTPUT is given a UNIT attribute.
2) Every INPUT / OUTPUT is given one of the following states:
         a)  Balance     (positive, spendable)
         b)  Collateral   (the output is collateral, denominated in DS and tied to a matching Debt output)
         c)  Debt          (The output is 'negative' and tied to a matching collateral output)
3) To spend a collateral output, the same transaction must also provide an input to cancel part of the matching Debt.

4) The actual 'balance' at a Colateral, Debt, or Balance output depends upon the age of the output.   Each block that a Debt or Colateral ages the debt/colateral is reduced by  (1 / # blocks in N years).   Each block that a NON-DS output ages accumulates DS at a rate equal to   OUTPUT_USD / TOTAL USD  * TOTAL USD COLATERAL lost since since the output was created.     (need to determine how this would interact with chain splits / merging). 

5) A bid TRX would have the following
     - create an output that could be spent 2 ways... owner could sign it (canceling the bid)
        or the TRX that spends it contains at an output that pays X currency to address Y at exchange rate R and
        sends any change back to an output with the same conditions as this output.

6) To accept a bid anyone can post a TRX that takes the bid output as an INPUT and generates a compatible set of outputs.   Added requirement that the Bid must be the highest active bid for a particular currency unit.

7) For the purpose of calculating collateral, a 7 day exchange average price is used.  This will even out bid-ask spreads and prevent short-run price manipulation.
 
Cool To take out a mortgage the following TRX would be created:
     Inputs:
        1]   OutputHash, OutputIndex, Amount =  100 * USD_EXCHANGE_RATE * 2 DScoin -> collateral
     Outputs:
        0]   100 USDBalance  -> paid to address
        1]   100 * USD_EXCHANGE_RATE * 2    DScoin marked as USD Collateral tied to output 2
        2]   100 USDDebt tied to collateral in output 1



legendary
Activity: 1008
Merit: 1001
Let the chips fall where they may.
One thing I found confusing is how a dscoin is supposed to represent crypto-USD. Your recent post helped explain it.

Your whitepaper never uses the term "mortgage". It is also not clear what happens if we try to simultaneously try to use DScoin to represent different currencies (even gold). Obviously, each currency would have its own dscoin exchange rate.

Let's assume that loans in DScoin represent value approximately 50:50 in USD and Euros.
If we assume 2 USD buys 1 Euro, that means 2/3 of the DS coins represent USD, while 1/3 represents Euros.

Bob wants to lend $100 crypto-USD to Alice.
Your white-paper  says that bob should issue a -$100 USD bond (-100 DScoins) to himself and credit Alice with $100USD (100 DScoins).
How are these represented in the block-chain? How does the interest calculation differ for negative amounts?
How is rounding handled? (simply a technical problem, I believe)

Let's now assume a week passes and the US government defaults on their debt. The value of the USD drops in half relative to other currencies. Suddenly it is possible to buy 4 USD with 1 Euro. Since 2/3 of the DS coins represent USD, that pulls the value of DScoins down as well. However, the other 1/3 represents Euros, which tends to pull the price back up.
1/2*2/3+2/1*1/3=1/3+2/3=1
Since the value represented by DScoins in my example was evenly split, the final value of DScoins does not actually change (it normally would). However, 1 USD now only buys 0.67 DS coins, while one Euro now buys 2.67 DS coins. Now it gets weird:
Assuming no actual reference to USD value is stored in the block-chain, Bob's loan to Alice now looks like this:
Bob: -$150 USD
Alice: $150 USD
If Alice and bob were using Euros, they would have lost money due to the crash of the US Dollar.
Same example in Euros:
Bob: -50 Euro -> -37.50 Euro
Alice: 50 Euro -> 37.50 Euro

I am not sure if that behavior is intended, but DScoin may be able to serve as a basket currency if it is actually routinely used as an intermediate crypto-currency.

hero member
Activity: 770
Merit: 566
fractally
I had a private message suggesting that Scrypt would not be a good hash function... I agree and would change that.  I want to make it clear that I am looking for feedback on how to create the best system.

I was thinking of a system that was based on SHA256() *but* required 128 MB of ram and 'random access' to that ram to calculate the result.

Imagine allocating a 128 MB buffer, using the noonce as a seed to a random number generator to populate that buffer.  Then XOR the block header with every 80 bytes of that buffer.  Then perform a deterministic sequence derived from the random data to jump to 'random' locations in the buffer and accumulate a SHA256() hash.   The result would use too much ram, still be a SHA256() based number AND be deterministic.  It would not allow GPUs or ASICs to perform better than CPUs because the majority of the 'cost' is in the ram and not the CPU.  

I didn't want to use bitcoin's double SHA256 because it would allow the major bitcoin miners to instantly control the new currency and concentrate power too much.
hero member
Activity: 770
Merit: 566
fractally
As I have been refining my understanding of the relationship between crypto-USD and real USD it is important to recognize that 'price fixing' is impossible and that despite a close relationship the two currencies they will have entirely different market values.  This is like the difference in 'price' between a $100 bill in your pocket and a $100 credit with Mt. Gox.   It costs time and money to move $100 from Mt. Gox to a bill in your hand, therefore Mt.Gox USD has a different market value from paper $USD depending upon how many people want Mt.Gox credits vs physical Paper.  If more people want into Mt. Gox then Mt. Gox USD is worth more and this is how bit-instant make their money (playing on the price difference between Mt. Gox USD and real USD).

I will explain the price-volatility risk between crypto-USD and USD below.

The only time crypto-USD and USD have the same 'price' is where supply of depositors == demand for withdraws.  If there are more depositors than withdrawers then the exchange rate for crypto-USD will be such that you get MORE real USD than crypto-USD.   If withdrawers are in greater demand then the exchange rate will be some fraction of the crypto-USD face value.

Assuming it were always possible to redeem crypto-USD at face value because DShare's never fall by more than 50%, then crypto-USD is worth more than regular USD because crypto-USD pays interest while cash does not.  This interest payment is recognition of the fact that you are lending your USD to the network.  As a result there is financial incentive for people to 'issue' more crypto-USD by taking a mortgage on their DShares.   After all, they will receive $110 real USD for $100 of crypto-USD.  This will increase the supply of crypto-USD on the market until supply/demand equalize and $100 real used == $100 crypto-USD minus transaction costs.

Alternatively, if we assume that for some reason DShares fall by 50% (not after a bubble, but from its 1 year moving average) and as a result interest rates fall and for some reason people can get higher yields in a traditional Bank or CD then there could be a net out-flow of deposits.    This will cause the crypto-USD to only be redeemable at (say) $90.   This means that someone wanting crypto-USD could now buy it at a discount.  Guess who wants crypto-USD at a discount?  Those who have mortgages.   In this case people those who borrowed against their DShares will start buying back crypto-USD so long as it was profitable to do so.

The price difference between crypto-USD and regular-USD is effectively a market-discount or premium based on the net-present-value of the crypto-USD bonds given their interest rate.

What we can conclude from this set of incentives is that the 'supply' of crypto-USD will automatically expand and contract with demand and exchange rate.  Those who deposit crypto-USD are taking some risk due to interest rate fluctuations.  However, because prices are not solely based upon theoretical equations but have an emotional component.  The price would probably be sticky and the 'variation' between crypto-USD and real USD would quickly normalize such that the 'premium' or 'discount' would hover in a small range (+/- 5%) which is 'on par' with the cost of getting into or out of Mt. Gox. 

In effect, depositing $USD is giving credit to the network and expecting the network to maintain some amount of 'value'.  If the network were to completely crash then of course those with crypto-USD would be stuck holding the bag.   But what are the chances of that vs you bank deciding to do a bail-in or the IRS deciding to seize your funds?

 
hero member
Activity: 770
Merit: 566
fractally
There seems to be some kind of misconception of what I am attempting to explain.

1) for in-person exchange of $USD for crypto-$USD there is 0 chance of default (ever).   The contract with the 'network' is simple:
   -  We will credit the depositor's account with X worth of crypto-USD provided they give you X real USD and you take out a mortgage on your 'BTC aka DShare' worth 2X. 
   - the network has thus 'received' 2X worth of value and given out 1X worth of actual USD.   There is always the option to pay off the remaining balance on the mortgage and
      thereby recover your DShare's which are worth more than the mortgage, but it is not required.

2) if you do not want to do an in-person transaction (exchanging USD for crypto-USD) and instead you want to accept your USD via Dwolla then you would use something along the lines of https://en.bitcoin.it/wiki/User:Casascius/Escrow_scheme_draft    THis approach would be required for new users who have 0 crypto balance at all.

3) NashX works for anyone with a crypto balance that wants to transact with some small subset of that balance.
   - suppose Alice wants to Withdraw $100 real USD from bob who has $100 crypto-USD.   Alice and bob both sign a transaction that will 'destroy' $200 worth of their crypto-USD balances UNLESS they agree on the resulting exchange of $100 real USD for $100 crypto USD.   In this case one party risks $300 'USD' (by going first) and the other party risks $200 by going second.  The value of the transaction is only $100 therefore assuming Alice and Bob are rational there is no incentive for fraud.    However, if Bob is irrational then he will receive $100 and then 'risk' losing $200 on the assumption that Alice would rather lose $100 than $300.   The rational choice for Alice is to only lose $100, but if everyone in Alice's position refused to deal with 'terrorists' then Alice would lose $300 in this instance, but it would make Bobs operation a 'net-loss'.    Therefore, Bob would have to 'play the odds' on people 'defecting' from the 'no negotiation with terrorists' stance.  If enough people negotiate with terrorists then Bob could still make a small profit despite losses from those who refuse to negotiate.   In the end, though NashX provides an escrow-free alternative that is cheaper if it works and more expensive if Bob is a willing to commit financial suicide.  Factoring in the risk-of-fraud and the drastically reduce profitability Nash X is probably about as secure as in-person payments, particularly if combined with a web-of-trust.

The conclusion here is that there are 'cheap', 'decentralized' ways to do escrow necessary to convert USD to crypto-USD over the internet.  This combined with my system results in an entirely decentralized exchange and decentralized 'store' of fiat-balances.
 
sr. member
Activity: 387
Merit: 250
You have to somehow force someone to deposit more into the system if they have a negative balance.
Alternately, you could blacklist defaulters, and create some sort of insurance pool whereby those that lose money through default are compensated.  Perhaps a small 0.01% tax on transactions to help compensate for the occasional default?

From a regulatory standpoint, the result resembles a Hawala network of trust, and would be prohibited in the US:
http://www.treasury.gov/resource-center/terrorist-illicit-finance/Documents/FinCEN-Hawala-rpt.pdf
legendary
Activity: 2618
Merit: 1006
As far as I understand NashX, you offer a certain deposit that is used as collateral in case the price tanks and that's also high enough to ensure that one party stays honest.

e.g. I offer to put 10 BTC as collateral on the table to be able to get 5 BTC worth of USD tokens. In your scenario I might even have to pay interest on this loan(?).

If BTC stays above 50% of the value that it had when agreeing on this trade, it is smarter for me to repay the loan than to run with the USD, as I would have sold BTC under market value effectively.

I still see a few problems:
1) Who holds the collateral while the USD are still in limbo? NashX does this by being the platform provider, assuring the destruction of funds on request from the counter party. This is a serious third party risk.
2) As I understand it, you don't just want to trade, you want to issue redeemable USD IOUs on OpenTransactions. This can mean it takes much longer than a few minutes/hours/days until a deal is finally settled, as I can be able to transfer these debt tokens to other users. It seems there is interest built into your system to deal with this issue.
3) How do you prove fiat transactions/balances? I can only see a way to take crypto currencies as collateral, not fiat.

My guess is that all cryptoUSD are the same, so no matter who issued it, I can get any of these and redeem them, as long as the collateral for them is stored in a central location. This has the benefit that in case of a Bitcoin crash (and Bitcoin can crash!) this platform can redeem USD either on the OpenTransaction market or on other markets and even in a flash crash there will be little damage. On the other hand I don't really see how this can work decentralized, as I could issue my own cryptoDollars using my own BTC as collateral if it was free for me to do so.
hero member
Activity: 770
Merit: 566
fractally
I think that the understanding when you purchase crypto-USD is that you could take a hair cut if the exchange rate dropped by more than 50% AND there were no borrowers at the new exchange rate  AND as a result the interest rate fell below the market interest rate for USD.     The 'amount' of your hair cut would not be 50% but instead based upon the extent to which the interest rate was 'below' market rates.   

Given the current USD environment an interest rate of anything above 0 is fairly good.   If USD intrest rates rise due to inflation, then in theory DShares would rise in value and thus the crypto-USD interest rate would also follow.

So, I think the real answer is that:

1) assuming a robust market (USD/BTC) would probably be robust
2) Assuming the market doesn't fall by 50% from its 1 year moving average for long enough that interest rates fall below market rates...
3) Assuming there is actually demand for crypto-USD in and of itself.
 
There is very little chance of having to accept below face value to cash out.
If you have a light market, with a long-term down-trend in DShare price (unlikely?) then you might have liquidity issues with your balance in that currency.

But assuming there is a lot of demand for USD <-> crypto-USD liquidity should not be an issue.
hero member
Activity: 770
Merit: 566
fractally
I think the answer here is that while you can manipulate the 'exchange rate' the same as with you could on Mt. Gox given light volume.  It would not affect the ability to cash out the $USD deposit at face value *UNLESS* there was a complete lack of people wanting to convert real USD to crypto USD.   Why would demand for crypto-USD which yields at least some interest drop to a value below face value?

I suppose that would happen any time the number of people wanting to withdraw USD was greater than the number of people wanting to deposit USD.  But to accept less than face-value for an interest bearing USD would suggest that you have extreme time pressure or that the current interest rate paid on USD deposits is below market rates.  The interest rate could fall to below market rates by a sudden and long-term decline in the value of DShares used as collateral.  

However, every day new collateral is being put up at the new exchange rates and paying the higher DShare interest  which are averaged with the older lower DShare interest rates.   This should serve to keep interest rates very close to 'average'.  

The real issue I see here is that by defining a fixed-collateral (2x) and a fixed mortgage term (say 4 years) I am fixing the max interest rate that would be paid (Assuming DShares did not go up in value).    

Assuming you actually took $400 from someone, that someone now has a positive $USD balance.   They will only accept face value upon withdraw.   So they are looking for SOMEONE who will give them face value.   Now after giving you $400 you then 'crash the exchange rate' to DShares by 80%.    Anyone who had insufficient collateral to fully back their position would simply let their current position 'expire' forfeiting 100% of their collateral which would be paid to the holders of $USD.   As a result none of these individuals would never pay off those accounts.  And the network would keep their DShares.   Everything is 100% fair and legit regardless of exchange rate.


This leaves the network with a crypto-USD balance that will pay out a meager DShare interest until all colateral is exhausted at which point in time the interest rate reaches 0.   However, there is still an interest payment so someone else comes along and wishes to deposit USD so the individual with a positive USD balance can still withdraw to the individual wishing to make a deposit (despite the lower interest rate or complete lack of interest rate).

If there are no new depositors then clearly your money is stuck as crypto-USD earning 0 interest.   But if there are no new depositors then the entire exchange and currency system must be dead for some other reason.

vip
Activity: 1302
Merit: 1042
👻
Initial Condition:  
You own 200 BTC.

Last exchange of USD for BTC was $4 per BTC.

You wish to borrow $400 from the network, so you post 200 BTC collateral.

New Condition:
You own 200 BTC (locked)
You owe $400 USD  (but have $400 in paper USD)
You're right up to here, what happens from now is that you ignore your debt if it benefits you. If BTC goes to $4 + [price needed to compensate for interest you are paying] each, you do nothing, you pay the loan back automatically with interest but you make money in USD terms.

Now, if BTC goes to $1 each (illustrated by other players dumping BTCs OR from other mortgaged assets being force liquidated), you do nothing, you pay the loan automatically but only up to 200 BTC (which is worth $200 now) and you make $200 USD.

You have to somehow force someone to deposit more into the system if they have a negative balance.
hero member
Activity: 770
Merit: 566
fractally
Initial Condition:  
You own 200 BTC.

Last exchange of USD for BTC was $4 per BTC.

You wish to borrow $400 from the network, so you post 200 BTC collateral.

New Condition:
You own 200 BTC (locked)
You owe $400 USD  (but have $400 in paper USD)

Next step:  You have a 2nd account with ANOTHER 200 BTC in it and sell those 200 BTC for $400 USD (clearing out all the bids).  

New Condition:
Account A)  You own 200 BTC (locked)
Account A) You owe $400 USD   ( but have $400 in paper USD)
Account B) You own $400 USD

Now all of a sudden SOMEONE has 2000 BTC they are suddenly willing to sell for $1??? I guess that SOMEONE is you as well.

So now you use $400 in account B to buy 400 BTC from yourself?   To profit from this someone else would have to be willing to sell their BTC at 1 dollar simply because you cleaned out the bid?  

Something doesn't add up with your contrived example.  It could be me, so I would appreciate clarification.


vip
Activity: 1302
Merit: 1042
👻
Yes, it is, however that still opens it up to someone who pulls orderbook entries. Doesn't have to be pull, can simply buy into it yourself. It also makes low liquidity markets very difficult to get that currency / commodity.
hero member
Activity: 770
Merit: 566
fractally
I am attempting to understand your order book example.

But what I think you are saying is that if the order book is 'thin' relative to your balance then having a fixed collateral is not sufficient.  In fact, the required collateral would have to factor in the order book and depth of the market.

I would really like to understand your contrived order book and how this 'scam' would be pulled off.  This is exactly the kind of feedback I was hoping to get because all angles need to be addressed.

My question to you is this:  is there any way to foil your scam by changing collateral requirements based upon the existing order book and volume?
vip
Activity: 1302
Merit: 1042
👻
Also consider the case of someone who bought BTC at $0.05 and the BTC is now $120 and heading to $200.   You need $USD now but there is no way in the world you would want to actually sell your BTC.   So you mortgage some part of it.  If the BTC value goes up you can easily cover your short position.  If it goes down your losses are capped at 50%.

Note that the exchange rate variations only affect the interest rate paid on $USD balances, not their redemability at face value.
Yes, it would.

Let's say the BTC orderbook looks like this:

BID
100 @ $1 ea
20 @ $2 ea
40 @ $3 ea
40 @ $4 ea

ASK
20 @ $5 ea
30 @ $6 ea
80 @ $7 ea

LAST: 10 BTC @ $4

So okay, you want $400. You mortgage out 200 BTC. You withdraw your USD into cash and run away.

The orderbook will soon look like this:

BID

ASK
2000 @ $1 ea
1000 @ $2 ea
20 @ $5 ea
30 @ $6 ea
80 @ $7 ea

LAST: 100 BTC @ $1

You buy up 3000 BTC for $3000. Rinse and repeat. If you think this would be challenging to pull off, it would not be, I can place a bunch of my own orders and pull it.
hero member
Activity: 770
Merit: 566
fractally
But what if bitcoin crashes to $20 and I don't pay? If it's automatically liquidated, what if the orderbook is too thin and a large mortgage causes people who lent out (aka have a USD balance) to face a loss?

How does the network get the exchange rate? For example, currently credit cards are generally 8% above spot. You can't have one exchange rate for all payment services.

I think you should probably think this through, and write an actual white paper.

I did think this through and considered every possible currency movement.  The mortgage is at a defined exchange rate with defined payments that automatically pay it off by a fixed amount each block.  The receivers of USD know that what is actually backing that USD is 2x the value in BTC at TODAYS exchange rate.   They also know that no matter what that is the maximum payout on that mortgage. 

Now the fact that USD account balances are all fungible means that someone new coming into the system taking out a new loan at the $20 exchange rate it would be backed by 10 BTC instead of 2 BTC and would be paying interest payments to all holders of USD.   

You could still exchange your $USD balance for face value with someone with real $USD.   The only thing the change in exchange rate did was reduce the effective interest payment on all USD, but he payment would still be positive.
Pages:
Jump to: