Anyway, it’s not clear to me why flash loan providers are still a thing, as they seem to be open to a second layer of abuse: transaction copying / sniping:
All flash loan borrowing transactions are profitable (otherwise they wouldn’t be able to pay back the loan) - but why let the originator of the transaction keep that profit? What a sensible attacker should do is: 1) watch for flash loan transactions to be submitted by someone, then 2) quickly submit a duplicate transaction with a larger fee, but change the destination wallets to your own. That way, you get all the proceeds of a theft, and not just the loan interest rate.
Given this possibility, flash loan pools could be considered as ‘bait’ or a trap for the unwary thief...
There are two main differences:
1) The atomic nature of a flash loan makes flash loan arbitrage much less risky than performing arbitrage traditionally. Doing the same type of arbitrage non-atomically may mean that you miss the arbitrage opportunity, resulting in a loss from having to pay back the loan you took out plus interest without having made any money with it.
2) Because the debt must be repaid in the same transaction, the loan is uncollateralized. As far as I know, one cannot borrow millions of dollars in the traditional financial system without putting up some kind of collateral.
> What a sensible attacker should do is: 1) watch for flash loan transactions to be submitted by someone, then 2) quickly submit a duplicate transaction with a larger fee, but change the destination wallets to your own.
This has been observed on the blockchain in practice. The paper I linked to describes the mechanics of how this plays out and what strategies competing arbitrageurs use to win these opportunities.
The future is likely private smart contracts like Secret (https://scrt.network/)in which the contract’s internal state and the function calls are entirely obscured using sMPC or by leveraging SGX enclaves. This makes it impossible to frontrun in most cases.
Whether an unauditable financial system is a good thing or bad thing is still up for debate.
One interesting thing I think is still under dev/consideration is adding the ability for MakerDAO to make "flash mint loans"(https://forum.makerdao.com/t/mip25-flash-mint-module/4400/9) -- essentially a flash loan where the caller can mint an arbitrary amount of DAI without having to back it with anything, so long as they pay it back + fee at the end.
There's a similiar idea being worked out for WETH10 (https://github.com/WETH10/WETH10#flash-loans), a project trying to make a feature update of the WETH (wrapped ether) token.
I'm honestly unsure WTH the impact of something like these would be, but would definitely prevent arbitrage from going too far out of bounds, since there would always be unlimited liquidity.
Multi-party atomic financial transactions are kinda insane.
Aave is 0.09%: https://aave.com/flash-loans/
It is also an important part of uniswap: https://uniswap.org/docs/v2/core-concepts/flash-swaps/
Any fees on a flash loan will disincentive closing arbitrage positions to that fee amount.
Borrow x amount of tokens. (Withdraw)
Call a function (i.e. Logic to handle flashloaned funds). (Call)
Deposit back x (+2 wei) amount of tokens. (Deposit)
It looks like unlimited leverage for flat fee.Because of the atomicity of the transaction, there's no way to default on the loan. If you can't pay it back, you're never loaned the money in the first place.
[1] https://medium.com/@kentmakishima/the-43k-defi-magic-trick-f...
Basically if you put $1000 of capital into the pot for making flash loans, then you are foregoing the X% / year that you could earn on interest, i.e. you are losing money.
It’s entirely possible that platforms are running these flash loans as a loss leader to drive adoption, but in a mature market and at scale, you’d expect there to be a small fee.
(Or just that the success-case fee covers the loss in the failure case, but that would break if the % of failed txns increased, so might not be a stable equilibrium. )
For a lot of transactions like this its actually miners who can detect and rewrite these transactions to take advantage of the arbitrage opportunities first, for this reason this cost is called "miner extractable value" or MEV.
However, note this fee doesn't accrue to the lender!
The funds aren't foregoing interest in all cases though. Ex: uniswap, curve, etc all require assets to be deposited, and pay depositors trading fees. These protocols could generate additional income by providing assets for flash loans without affecting the income received for acting as an amm.
Vitalik himself acknowledges this, the guy is quite honest and straightforward about its limitations: https://thenextweb.com/hardfork/2019/08/19/vitalik-buterin-e...
Vitalik Buterin: Using Ethereum is expensive, and its blockchain is ‘almost full’ He also said blockchain's 'problem' is that every computer verifies every transaction
Actually blockchains are a first-generation technology that do global consensus for every block, which literally means all transactions in the world must go through one computer in the world (the miner) although it’s a different one each time. And the situation is actually worse, since you don’t know who would mine the next block in advance, every transaction must be sent to every potential miner! Imagine if BitTorrent had every computer store and seed every movie instead of using DHT.
The ability to send or loan arbitrarily large amounts for a fixed fee is a symptom of centralization. In a fully distributed network, transaction fees would have to be proportional to transaction size!
Almost every other protocol on the Internet does not have such bottlenecks in its design. No one asks how many emails or websites can be served per second. Blockchain is trying to secure every transaction using the entire network! That is why so much electricity is wasted just to do 7 transactions per second.
The next generation of crypto will actually be able to power payments using embarrasingly parallel architecture. Until then, we have blockchain.
Ethereum is nicknamed the “world computer” for a reason. Gas fees are super high for small transactions like paying for coffee or voting in a secure election. Just one app KryptoKitties can clog up the entire network.
We built Intercoin apps on top of Ethereum (https://intercoin.org/applications) but we are not going to wait around for Ethereum 2.0 - which is blockchain also. Kik Messenger and others have long gotten off.
That said currently ethereum has many L2 solutions (https://ethereum.org/en/developers/docs/layer-2-scaling/) that "run in parallel" and result in low gas fees.
So far I've not seen any hint of an "embarrasingly parallel architecture" that can satisfy the safety requirements that a blockchain also does and run smart contracts. I'd be happy to read up if you can point me to any research or projects that I've missed.
Ethereum has so much network effect that these other projects need to actually pay people to use them over Ethereum. Not to mention they're also more centralized.
A lot of other platform projects are providing bridges which makes it possible to use those projects as some sort of an L2 for ethereum. If a lot of dapps starts migrating to those instead of to native L2 solutions it can get ugly.
However, the actual technical research paper with rigorous mathematical proofs is still going through peer review, but if you email me I am happy to share it with you.
Really, what you need is a distributed hash table (like MaidSAFE), or randomness beacons (like Algorand) to select a subset of the network. This paper shows mathematically that the probability of a double-spend goes down exponentially with the number of notaries, and having the entire network secure every transaction, no matter the size, is wayyyy overkill:
If you don’t like ME saying it — here is VITALIK HIMSELF saying it, the guy is quite honest and straightforward about its limitations: https://thenextweb.com/hardfork/2019/08/19/vitalik-buterin-e...
Vitalik Buterin: Using Ethereum is expensive, and its blockchain is ‘almost full’
He also said blockchain's 'problem' is that every computer verifies every transaction
Actually Ethereum 2.0 should be “fast enough” for many applications. It’s still going to be doing a global consensus, but at least it will be able to handle actual real world usage - people paying for coffee, let’s say, or voting in elections.
In fact, a major reason that so many ICOs from 2017 were considered scams is that the tokens could not actually be used for their intended purpose. Teams like Kik Messenger discovered this early on and moved away:
https://medium.com/kinblog/kin-pushing-ahead-next-steps-on-t...
[0] https://www.forbes.com/sites/kellyphillipserb/2019/09/19/por...
The more important reason flash loans work on Ethereum is that Ethereum runs programmatic contracts that can take the output of a function call from a different contract as their input. This is something that doesn't exist outside of the world of smart/programmatic contracts.
The blockchain just provides the immutable ordering of transactions and credible neutrality of access-control needed for the state of programmatic contracts to accrue value.
Been hearing that for years. Anyone yet have anything running that allows a digital currency to scale without being vulnerable to the attacks Bitcoin can resist?
For the time being, no one has found vulnerabilities in it.
What can I say, the first generation of any technology is laughably inadequate as a replacement for what came before. That is why for example hardlh anyone uses Bitcoin in everyday transactions and why we still don’t use technology to secure voting, but that will change. As an aside, I don’t think blockchain is the best technology for voting but it’s the buzzword that people understand:
https://cointelegraph.com/news/russian-blockchain-voting-sys...
If you identify an arbitrage opportunity in the market, you can atomically borrow a large sum of money to take advantage of the price difference. You also have the added assurance that if the arbitrage opportunity goes away before you can take advantage of it, the entire transaction fails and you only lose the Ethereum transaction fee. It's essentially risk-free arbitrage.
This paper [1] dives into detail about how these arbitrage mechanics play out on the blockchain, and how both arbitrageurs and miners manipulate transactions in order to make a profit.
[1] https://arxiv.org/abs/1904.05234