Hacker News new | comments | show | ask | jobs | submit login
Show HN: Collateralized Debt Agreements Using Smart Contracts and Virtual Cats (dharma.io)
97 points by nahollander 8 months ago | hide | past | web | favorite | 57 comments



I have looking deeply into lending smart contract protocols - dharma, ethlend, salt, paypie, etc. My biggest complaint is all of them are so-called 'blockchain' products but not only can they be done better without blockchain, but that despite their product being all about decentralization, none of these projects are decentralised!


In theory, they can be done just fine without blockchains, but in practice, it doesn't always work out that well, especially when the borrowers don't have much money. Matt Taibbi's recent book The Divide described all sorts of abuses, in which loans are sold and resold, the loans' owners swear they have records they don't actually have, courts trust them because they don't have the resources to check, and borrowers lose to default judgements because they weren't properly served, and in some cases didn't owe the money in the first place or had already paid it off.

Whereas if the loan and payment data were on a public blockchain (with personal details hashed), records wouldn't get lost and courts could easily verify them.

You could argue that we should reform our centralized systems, but that's hard to actually do, which is sorta the point of removing the need to trust them in the first place.

http://www.blunderingcode.com/ethereum-credit-cards/


This is an interesting point, until now I thought blockchains were only useful for decentralisers, which in turn were only useful for people who wanted something like censorship resistance.

But here is a different use-case -- keep records well. Traditional systems are actually pretty bad because of the incentives. My bank statements for example are often very confusing, and online data only goes back 18 months, because the bank has little incentive to do better.

And that is in a relatively benign market. Title deeds, and the kind of loan documentation you are talking about create positive incentives for abuse.


While some important records are public, many are not. It isn't obvious that all debtors want the details of their debt made world-readable, for instance.


Right, which is why in the article I linked, I describe a system that stores only the hash of the debtor's personal data on chain. A lender with the preimage can still use that to prove its case.

For stronger privacy we'd need ring signatures or zksnarks, so a person can't be identified by the flow of payments, but those technologies exist on various blockchains already.


you can use zeroknowledge proofs for things you don't want to reveal. it's called zk-snarks


Yes but I can also imagine all kinds of problems coming from keeping private keys. Stolen, lost, hacked (see Estonian id card)(well all right, secp256k1 is much less susceptible to it than RSA).


Every time blockchain has had a hype cycle over the years I start thinking of ideas to build on it. Then I realize all of my ideas would just be simpler, better, and more monetizable (minus Ponzi hype) if I just built them on traditional technologies.


I think the problem here is that you're attacking the wrong part of the problem. Otherwise, why did you even get excited by the original idea being built on the blockchain, to begin with?

Imagine if you thought that it would be a great idea to create decentralized payment system on the internet where people can accept and make payments in a peer to peer manner.

Except, this is 2001. There is no such thing as a blockchain. You face the problem of double spend, and soon enough, you come to the realization that you could create a peer to peer accept/send online payment system much better if it is centralized.

Thus, Paypal is born.

But does that mean a blockchain based decentralized payment system was completely useless? Not really, it is clearly demonstrated by the popularity of bitcoin in a world with capital controls, WikiLeaks payment sanctions etc.

The real reason behind this effect is that the tech world is excited about decentralization, but it doesn't fully understand that there are a lot of missing components required to create say "a censorship-resistant online forum" or "decentralized blah blah service".

On the top of that, nobody except for the people who are being actively censored or prevented from doing things by the centralized institutions truly need the decentralization.

Most SV technologists would be really excited by the idea of a decentralized, censorship proof forum. Except, you will only attract the alt-right (as of now) to it. Why? Because the non-alt-right is perfectly fine with the censorship, as it favors them currently.


> Not really, it is clearly demonstrated by the popularity of bitcoin in a world with capital controls, WikiLeaks payment sanctions etc.

Everyone I know that is remotely interested in Bitcoin is interested because it may increase in value, it's not popular at all as a payment mechanism outside of illegal circles.

> Most SV technologists would be really excited by the idea of a decentralized, censorship proof forum

Is this really exciting? It sounds like a formula for a cesspool. It seems to me that the challenge in getting anything interesting to happen there is not in the technology, but in the design of the service. There are already tons of places where you can discuss anything that's not actually illegal, including being alt-right. It's just that they're seedy, so nobody normal goes there.


That's usually the issue I have when selecting a technology before knowing what problem I want to solve.


Blockchain is not going to make some traditional company rich. Its going to be used to build things like a decentralized, public web of trust that can be used for open, public uber & airbnb clones.


> Its going to be used to build things like a decentralized, public web of trust that can be used for open, public uber & airbnb clones.

It's already trivial to build those clones without blockchain if users give up a small amount of trust, and that amount of trust is basically irrelevant to the overhelming majority of users. And the advantages of non-blockchain development, in return, are huge.


All those things are laughably far away from being actually useful business ideas.


can you provide an example for how uber & airbnb clones be built on blockchain? What would you store, how would it help?


@kang -- while I don't disagree that there's no shortage of snake oil and hand-waving in the blockchain industry ("Blockchain for X! Huzzah!"), I do disagree with your point about whether there is an efficiency gain to be had from representing debt agreements on a blockchain. The primary benefits are:

1. An ability to trustlessly hold and release digital collateral on an entirely peer-to-peer basis. This entirely removes the necessity for a whole class of middlemen that seek rent for existing lending agreements. 2. An ability to trade one's ownership in a loan as a cryptographic token -- again, something that necessitates various paying agents / clearing houses / intermediaries in the traditional capital markets ecosystem.

Re: decentralization -- that's a fair point. Right now, Dharma is functionally a centralized code base controlled by a centralized set of contributors. In the future, however, we hope to transition to a decentralized governance model so that the protocol can serve as a piece of common, shared public infrastructure -- unfortunately, we don't have robust enough decentralized governance models quite yet in the crypto community.


#2 is actually useful.

Now just waiting for the smart contract that bundles a bunch of your tokens and sells structured tranche tokens :)


Both the points and your third point about a centralized system being able to decentralize itself - I am saying all of them are impossible (given current knowledge - unless you have secret protocols...).


For points 1 and 2, it's no secret :) See for yourself: https://whitepaper.dharma.io

For point ,: you're correct in that we (as in the crypto community in general) have yet to come up with good on-chain governance mechanisms, so its likely that robust decentralized governance systems are at least a few years away.


The 'underwriter' in dharma protocol is essentially current day middleman. You contradicted yourself by saying "trustlessly" in point 1 and then admitting to point 3. Point 2 is unenforceable without current legal system.


Debt agreements aren't required to be underwritten in every instance -- it's an entirely optional addition. If you want to see an example of a debt agreement in which there is no underwriter or middleman and collateral is trustlessly secured -- well, it's linked as OP :)


Oh this is interesting. In India, debt agreements have to be underwritten. Moreover, this right is a hard-to-get license that is granted by the central bank - Reserve Bank of India. Not sure what the regulations are in other countries.

Underwriting is a heavily regulated process in most countries with licensing requirements. You could claim that you do not underwrite yourself,so don't fall under regulatory purview. Interestingly your model will fall under the P2P regulations of India and China - where there are specific models where the marketplace does not underwrite, but risk is assumed by lender. Or - you have to make sure that the underwriters are regulated entities.

P.S. I run a lending startup in India. We primarily look at the Blockchain as a means to solve the credit history problem in India.


I'm not really a fan of crypto landing platforms, but one thing many forget about cryptocurrencies is that they do have one intrinsic value = extreme liquidity.

How fast can you get lending users to put $100 million to a billion into your non-blockchain platform? Maybe 5 years, with VC money for marketing?

Now compare that with how fast you can do it with a blockchain crypto platform. And it's still very early days = "small" amounts of money being put into crypto compared to what it's going to be 5 years from now.


> How fast can you get lending users to put $100 million to a billion into your non-blockchain platform?

Do you mean a stock sale? Once it's passed all SEC certifications and so on for going public and done your IPO, a company can do that in as simply as filing a form with the SEC and directing the sale of the stocks.


I don't understand how you would have self-executing loan contracts and a permissionless platform for trading of debt instruments without blockchains. I see this as an ideal use of the blockchain.


Hey HN! We're the team behind Dharma protocol, building the infrastructure for the tokenized debt agreements on the Ethereum blockchain. In this code school, we teach you how to build a loan collateralized by a CryptoKitty. We hope you enjoy! If you're interested in learning more visit us at dharma.io or join our chat.


This is a clever idea. I've long been skeptical of debt on blockchains b/c there aren't good means of enforcing repayment without resorting to trusted irl/off-chain components, and then why bother doing it on chain in the first place.

But collateralizing with digital assets created on-chain is a really interesting approach, obvious in hindsight, but perhaps requiring the prerequisite of real implementation of unique collectible digital assets that retain value. Collateral can be cryptographically locked up and payment enforced in the event of default, all trustlessly. Are you guys the first to do this or are there any others doing this too?


Your first point is well taken - without some sort of identity layer on the blockchain to create either social or reputational accountability, unsecured loans probably will not flourish.

Regarding you second comment, what's cool is that we can collateralize not just collectibles, but any ERC20 token as well, which makes the protocol substantially more attractive.


The MakerDAO system (which I contribute to) issues a token called dai against Ethereum token collateral. The dai token is meant to have low volatility measured against fiat money.

There's roughly 9 million USD worth of outstanding dai tokens at the moment, all representing a form of debt to the MakerDAO system with ETH as collateral.

The first version uses only ETH as collateral, with a high degree of overcollateralization. The next version is supposed to use different collateral types.

One interesting type of collateral is tokenized gold, as will be issued by the Digix project.


Couldn't you just collateralize with blockchain tokens themselves? Why do you need on-chain "unique collectible digital assets that retain value"?


Probably because collateralizing with the thing your borrowing is kind of pointless, yeah?


I agree, but isn't the point of borrowing against collateral that you have some utility from the collateral (e.g. a car you drive, a house you live in, part of a business you own) while you carry the loan?

If these crypto "assets" like Kitties are rather unfungible for crypto "coins", then I suppose it would make sense, but then I'd be confused why the lender would accept the collateral.


>but isn't the point of borrowing against collateral that you have some utility from the collateral (e.g. a car you drive, a house you live in, part of a business you own) while you carry the loan?

Close, you can abstract "utility" one layer higher to "demand", or more accurately demand relative to supply. The thing you collateralize needs to be in demand by enough people to ensure it remains valuable over at least the life of the loan, but realistically much longer (so the lender is assured it will always be perceived by the market to have current and future value over any period during which the lender may need to reposses and resell the collateral). Utility gives things value which gives them demand, but it's really the demand that matters. There must always be a ready buyer for the collateral. Scarcity, like with Cryptokitties, gives things value too (rationally or not, but welcome to the human race).


Borrowing against collateral means the lender has something to seize if you fail to pay them back. The more valuable the collateral, the more money the lender will recover when they repossess and sell the collateral. This likelihood of recovery (if you default!) may make them willing to lend you more money, or give you a better interest rate.


Oh yeah. I guess I assumed the thing being borrowed was off-chain (dollars, e.g.). My mistake.


I'm on the Dharma team with Nadav, and happy to shed some insight here.

So we think a really interesting use case in the short term is margin lending of crypto assets. Say you have 10 ETH and want to short-sell a different ERC20 token. You could lock up your ETH as collateral in a loan denominated in the other token, and then sell those tokens. If those tokens depreciate in value vs. ETH, when you buy back the tokens you'll have made a profit.


Interesting, so something like:

I get a loan for 20 magic bean coins, secured with 1 eth when the exchange rate is 20 magic bean coins for 1 eth. (Do I have to pay interest on this? Do I forfeit it at some point? Iiuc Dharma seems to be just a framework for setting up these schemes, so this might be controllable by the person creating the eth-mbc loans?)

Then I sell my 20 magic beanstalk coins for 1 eth.

A week later, magic beans have massively depreciated because there was a critical vulnerability discovered, code-named GIANTS and now I can get 40 magic bean stalks for 1 eth.

So I sell 0.5 eth for 20 bean stalks, and use that to pay off my loan?


Yeah that's essentially right. The only modification I'd make is in your last step, what'd you need to do is buy back the magic bean coins (because you owe them to someone else). So you you wouldn't "sell 0.5 eth for 20 bean stalks", you'd buy 20 bean satlks for 0.5 ETH. You'd then pay back the loan, at which time your 1 ETH of collateral would be released back to you. Now you'd have 0.5 ETH in profit from selling magic bean coins high and buying low, as well as your original 1 ETH.

Regarding your parenthetical questions: 1) yes, you'd pay interest on this. you'd negotiate this interest rate with the person lending you the magic bean coins 2) yes, there are a couple scenarios where you'd forfeit your collateral: a) if you were wrong, and the price of magic bean coins appreciated beyond the value of your collateral; b) if even if you were right and the price depreciates you forget to pay back the loan 3) that's correct, Dharma is just the protocol for the creation of the loans, so the terms of the loan would be determined by the constituent parties (the borrower, lender, and underwriter)


I was thinking the other day about a service called Verifier that could be implemented with something like this.

Verifier would allow a person to take a token of some sort from a website, and send some eth to the Verifier. Now the service knows that the person has put in some stake, and can grant them an account (this is as a sort of abuse protection).

If the person wants they can take their money back, but the website can find this out and cancel the person's account.


I have question on this tutorial - How are you ensuring the value part of the equation. Lets say I own one of the cryptokitties worth $100k:

https://www.cnbc.com/2017/12/06/meet-cryptokitties-the-new-d...

What happens if the cryptokitty loses 10% of its value? And how does the contract know this loss in value?


Hi, let's say someone wanted to work at dharma.io. What sort of Ethereum skills would you look for?



In fiat money systems, banks create new money when they make a loan. If you take a loan from a non bank entity, they clearly can't make new fiat money, so money supply stays fixed. My question is, should these loans be interest free? Because if they are not, there is an obvious systemic issue of economic musical chairs...

Or is the idea these contracts live within the broader fiat systems? I suppose you can use a crypto currency with a growing money supply.


I found this project the other day after doing a deep dive into the 0x project. This is a cool project and I am impressed with the level of thought and detail gone into planning this protocol. I have a question about governance. The 0x project essentially plans to set up a DAO that will promote/depricate old/new versions of their protocol, and stakeholders will have a say using the 0x protocol token. How do you plan to implement governance? Through some sort of token model similar to 0x? Thanks!



Maybe PoS will accept crypto kitties


next step a stable coin based on collateralized cats.


People will buy kitty's, borrow against them and use funds to buy more kitty's building a leverage position on Kitty's.


In all seriousness, this isn't a _totally_ unreasonable proposition -- Vitalik proposed an interesting route for creating stable tokens using baskets of debt obligations in a CDO format: https://ethresear.ch/t/collateralized-debt-obligations-for-i...

Perhaps unfeasible to appraise given that CryptoKitties haven't coalesced around any sort of stable value, but it'd be interesting to see what the volatility of NFTs like CryptoKitties is in comparison to normal tokens.


Proof of Kitty


Too bad nobody I their right mind would borrow or lend such an obscenely volatile and deflationary instrument (unless they were going to scam it somehow).


I work at Dharma with Nadav and am happy to shed some light here.

Your point is well-taken and definitely a risk. What lenders plan to do, for loans collateralized by crypto, is overcollateralize substantially.

So, for instance, in order to take out a 50k USD loan, you may need to put up 2.5-3x of the value in ETH, say 150K USD worth of ETH. This protects against some of the volatility (though definitely not completely).


Why wouldn't you just sell the eth in the first place?

I havent read the whitepaper yet (i will this weekend), but it seems like the collateral is essentially locked up in the contract, so you lose any interest or other opportunity cost.

Even with only current instruments you could synthetically create this loan for cheaper: sell the BTC collateral for USD, buy futures to cover the BTC, invest the unused USD to collect interest..

The problem is that the collateral is locked in the contract and that collateral is another liquid currency.


> So, for instance, in order to take out a 50k USD loan, you may need to put up 2.5-3x of the value in ETH, say 150K USD worth of ETH.

Why on earth would someone borrow $50k if they have $150k on hand?


I am guessing if the person borrowing believes that the asset that is being used as collateral ( ETH in this case ) will appreciate in value.


Similar to what is required for bitcoin futures on cboe


CBOE margin requirements are nowhere near that. 40-44% depending on what kind of client as of 01-17-18.

http://cfe.cboe.com/margins/cfe-margins




Applications are open for YC Winter 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: