News for hackers. Stuff that matters.
Re:DeFi bug accidentally gives $90M to users by yokem55 on Friday October 01, 2021 @09:00AM (#28717873)
Because the only way to get a loan is to put up collateral that is locked into a contract. And that collateral can only be extracted if you pay back the loan. So, if you value the collateral less then your debt, then, sure, walk away. But if the value of that collateral falls to less then the liquidation threshold (an amount some percentage greater then the value of your debt), your debt will be paid back by a liquidation bot and the the liquidator will take your collateral for themselves.
Re:DeFi bug accidentally gives $90M to users by lottin on Friday October 01, 2021 @10:52AM (#28719187)
Yeah, but the whole purpose of a loan is to fund something, and to be able to fund something the amount loaned out needs to be larger than the collateral. Otherwise, there's no financing going on. It's simply a bet on the relative value of the principal vs the collateral. Calling this "a loan" is misleading.
Re:DeFi bug accidentally gives $90M to users by TameAntelope on Friday October 01, 2021 @12:27PM (#28720470)
What happens is someone takes a loan out with their BTC as collateral, the BTC grows, they earn more than the interest on the loan with the money they've borrowed, and make a lot of money chaining these together over and over again.

Vastly oversimplified (and possibly wrong), but if you want to know more, do some searching for "yield farming".

The point is that they want to keep their BTC because they think it's going to go up, so they take out a loan with their BTC as collateral rather than directly spend their BTC.

Re:DeFi bug accidentally gives $90M to users by lottin on Saturday October 02, 2021 @03:35AM (#28726768)
If you take a loan in BTC and post the same amount of BTC as collateral, the payoff from such a "loan" is the return on BTC during the holding period minus the rate of interest charged times the principal (or collateral, since it's the same amount). In finance, this called a "swap", and in a swap the principal is not actually exchanged because it's inconsequential, it's only used to calculate the amounts due. In short, what you describe is not loan, but a swap, which is a different kind of financial product.
Re:DeFi bug accidentally gives $90M to users by TameAntelope on Saturday October 02, 2021 @07:28PM (#28733103)
If you know all that, I think you'll probably understand how yield farming works better than I!
Re:DeFi bug accidentally gives $90M to users by pdonis on Friday October 01, 2021 @12:19PM (#28720383)
> the whole purpose of a loan is to fund something, and to be able to fund something the amount loaned out needs to be larger than the collateral

Um, what?

If I take out a mortgage to buy a house, the loan amount is not going to be larger than the value of the collateral (the house).

If I take out a loan to buy a car, the loan amount is not going to be larger than the value of the collateral (the car).

What kind of loan are you thinking of?

Re:DeFi bug accidentally gives $90M to users by lottin on Friday October 01, 2021 @03:26PM (#28722447)
A car or a house being used as collateral are kept by the borrower at their disposal. This means the borrower can benefit from the collateral asset, e.g. by using it or living in it, while the debt still hasn't been paid off. In these cases a fully colletarelised loan can make sense. But this is not the kind of collateral that we're talking about here. We're talking about collateral that is held by the lender in a margin account, or "locked" (in defi parlance), until the debt is paid off, which is the only kind of collateral that can be used in "decentralised finance", because the other type requires a contract (not a smart contract, an actual, legal contract) and the ability to litigate.
Re:DeFi bug accidentally gives $90M to users by throwawaygh on Friday October 01, 2021 @01:07PM (#28720987)
> If I take out a loan to buy a car, the loan amount is not going to be larger than the value of the collateral (the car).

Pray tell of these new cars whose value does not plummet the moment they are driven off the lot.

Re:DeFi bug accidentally gives $90M to users by pdonis on Friday October 01, 2021 @01:21PM (#28721162)
Which is why car loan providers usually require a substantial down payment so the loan is not underwater. (And why home mortgage providers usually require a LTV well under 100 percent--and make you pay mortgage insurance even then unless the LTV is even lower.)
Re:DeFi bug accidentally gives $90M to users by throwawaygh on Sunday October 03, 2021 @06:27PM (#28741052)
What the hell are you taking about? I have never made a down payment for a car and have never paid interest on a car loan. Ever. And I’ve purchased many cars.

E: woah! .06 seconds to the first downvote to a Dow thread comment on a two day old post! I’m out.

Re:DeFi bug accidentally gives $90M to users by plorkyeran on Friday October 01, 2021 @02:25PM (#28721871)
Currently several year-old cars are selling for nearly as much as brand-new cars. Even before the current car shortage, repossessed zero-money-down cars were commonly resold at basically the same price as the first sale.
Re:DeFi bug accidentally gives $90M to users by throwawaygh on Sunday October 03, 2021 @06:38PM (#28741142)
Currently. Which is mostly notable because it is not normal.
Re:DeFi bug accidentally gives $90M to users by UncleMeat on Friday October 01, 2021 @09:20AM (#28718076)
There is a huge problem with the collateral model: liquidity.

If you put up $X in FOO_COIN as collateral and FOO_COIN starts tanking in value, the contract is supposed to auto-liquidate once it hits a certain point. But there is absolutely no guarantee that this can find a buyer. So the "guaranteed" collateral recovery is not exactly guaranteed.

Re:DeFi bug accidentally gives $90M to users by yokem55 on Friday October 01, 2021 @09:56AM (#28718473)
That's why you can only borrow up to 80-ish% of your collateral, and that's getting very risky for the borrower. It also means that the sane lending protocols are somewhat stingy with what they take as collateral and then set the borrowing limits and liquidation thresholds fairly conservatively.

When the market starts making big moves downward the liquidation bots have a keen eye on which positions are at risk, watching and predicting the oracle updates, and within a block or 2 (~30 seconds) of a position being vulnerable have the deal all closed out. It can even be all done in a single transaction bundle that calls the liquidation function, pays back the debt, takes the collateral, and sells it on a dex, all in one go.

The market price for the collateral would have to drop more then 20% in the span of that 30-seconds for it to not be profitable for the liquidator.

That's not to say it's impossible for this to fail, the biggest and sharpest dumps happen during liquidation cascades. But a failure is in the category of 'black swan event', and not something that is seen with regularity.

Re:DeFi bug accidentally gives $90M to users by plorkyeran on Friday October 01, 2021 @02:27PM (#28721888)
A "black swan event" is something which was obviously possible in retrospect, but no one could have predicted other than via blind guessing. If you can explain how it'd happen in advance, it's not one.
Re:DeFi bug accidentally gives $90M to users by wizzwizz4 on Friday October 01, 2021 @10:41AM (#28719040)
> That's not to say it's impossible for this to fail, the biggest and sharpest dumps happen during liquidation cascades.

If it happens, it's not a black swan event.

Re:DeFi bug accidentally gives $90M to users by TomSwirly on Friday October 01, 2021 @12:35PM (#28720566)
This is a wrong use of the term.

Black swans are rare but actually exist.

https://en.wikipedia.org/wiki/Black_swan_theory

Re:DeFi bug accidentally gives $90M to users by wizzwizz4 on Friday October 01, 2021 @01:35PM (#28721328)
It's actually a correct use of the term. A “black swan” is something that is believed not to be possible – or, in retrospect, something that was believed impossible but happened anyway.

The term predates the discovery of black swans;

> However, in 1697, Dutch explorers led by Willem de Vlamingh became the first Europeans to see black swans, in Western Australia.[9] The term subsequently metamorphosed to connote the idea that a perceived impossibility might later be disproven. Taleb notes that in the 19th century, John Stuart Mill used the black swan logical fallacy as a new term to identify falsification.[10]

Re:DeFi bug accidentally gives $90M to users by bhaak on Friday October 01, 2021 @09:37AM (#28718257)
How is that different to traditional finance?

Evergrande almost went belly-up as the prices of their real state fell sharply because they sold so much of it to cover their credits.

The financial crisis from 2007 was because the collaterals were nowhere as sound as they were sold for.

Don’t get me wrong I think it’s mostly a house of cards but crypto finance is just traditional finance on steroids IMO.

Re:DeFi bug accidentally gives $90M to users by UncleMeat on Friday October 01, 2021 @10:10AM (#28718635)
> How is that different to traditional finance?

There are a lot more backstops. Traditional finance can have this problem, but we can install human systems to limit the blast radius of things. As you say, it is traditional finance on steroids.

Crypto enthusiasts seem to think it is the opposite. People tell me that defi loans are "zero risk" because of the automatic collateral systems and I just laugh and laugh.

Re:DeFi bug accidentally gives $90M to users by bhaak on Friday October 01, 2021 @02:21PM (#28721834)
Crypto finance and especially DeFi is tiny compared to traditional finance. The blast radius is still small without the regulations. But the regulations will come. Crypto finance is going down the same path that traditional finance did just in a period of a few years than a century.

Everybody who claims there's "zero risk" is either lying or blind to the risks. You can't get those large yields with zero risk.