3 ms·
The whole thing is atomic right? Who cares what the amount is if it's guaranteed to be paid back or the transaction doesn't go through. Profit is profit.
by aleksiy123 3y ago
The whole thing is atomic right? Who cares what the amount is if it's guaranteed to be paid back or the transaction doesn't go through. Profit is profit.
- thelastparadise 3y ago> The whole thing is atomic right? Yes, by definition flash loans are atomic. It's money borrowed and repaid within one transaction, which is atomic. One might wonder: is anything being borrowed at all?
- nocoiner 3y agoI mean, there has to be actual capital at risk somewhere in this transaction, right? Something can’t come from nothing. Otherwise, someone could keep running this trade on repeat until they’ve accumulated an amount equal to the gross product of the universe.
- lxgr 3y ago> I mean, there has to be actual capital at risk somewhere in this transaction, right? No, since all component operations to a given transaction happen atomically, there really is no counterparty risk: Either the proposing actor manages to make a profit and "pay back" the flash loan (plus interest, apparently), or the entire deal does not go through. > Otherwise, someone could keep running this trade on repeat until they’ve accumulated an amount equal to the gross product of the universe. No, they can keep on repeating the trade (which is usually arbitrage of some sorts) exactly until the arbitrage opportunity is gone, which usually is quite soon – unless somebody has made a serious pricing mistake somewhere. > Something can’t come from nothing. It (i.e. arbitrage profit) doesn't come from nothing – it comes from seeing a market inefficiency and a way to profit from it. The actor that sees it is rewarded by profit; the entire market (i.e. all of its participants) benefits from better price quality. None of this is a crypto innovation either: This is exactly how traditional finance/payments multi-currency net settlement works.
- nocoiner 3y agoThanks for the detailed responses. A couple follow up questions. Or I guess two variants on the same deeply held instinct I hold, but maybe I need to expand beyond animal brain thinking? OK, so real profits (due to a real pricing discontinuity) and no counterparty risk. Fair enough. But beyond that, in my mind it seems like there has to be some way for this trade to either blow up or that it has insane capital maintenance requirements for potential returns.
- lxgr 3y agoImagine a market with three currencies/commodities: A, B, C. One A trades for 10 B, one B trades for 10 C, but somehow one A trades for only 50 C when exchanged directly. There's a clear arbitrage opportunity here: Sell one A for 10 B, sell the 10 B for 100 C, and finally go to the person willing to give you an A for 50 C – and buy two. You started out with one A and ended up with two. This is great! Now repeat that until the arbitrage opportunity disappears and get rich in the process. Now here's the question/idea: If you can do these three trades atomically, why do you need a single A to being with? This is what "flash loans" (or any equivalent system involving multilateral netting) allow.
- deleted 3y ago[deleted]
- aleksiy123 3y agoThe key being that you don't need any capital to perform the arbitrage. You just focus on finding on opportunities and aren't limited by your bank roll. Meanwhile the lender just focuses on providing capital and is happy making a risk free loan for a fee. And in this everyone is happy. You make money, lender makes money, and sellers and buyers get their asks. Is that correct?
- lxgr 3y agoI'd say yes, except for this part: > lender makes money, Theoretically, there is no need for a lender. "I borrow 1 trillion from pension funds X, do <some complex sequence of trades>, and in the end return the trillion to X, all within zero seconds" and "I perform <some complex sequence of trades>, requiring net-zero capital from my end" are equivalent statements. Rational actors should recognize them as such, and the marginal cost of lending (interest) should converge to zero – in other words, X should concede that they do not provide anything valuable to the trade. Practically, existing protocols might not be amenable to that insight, and the lending market is apparently too inefficient to support 0% flash loans – at least for now. So the value that X provides is protocol backwards compatibility, I suppose!