Now bare with me here, I might have kinda misunderstood what a flashloan actually is. Internet tells me that it's a type of uncollaterized lending, where a smart contract takes money out of a pool, sends it to the borrower but the amount has to be paid back within the same block. If the borrower fails to pay back the loan within the same block the loan is revoked, it's as if it never happened. The nature of the blockchain as determeninistic state machine allows this to happen (state gets only really changed, once a new block is added to the blockchain, you can just say if (money_paid_back == true) {transaction == true}, and since every transaction depends on the previous ones, if one transaction in the chain does not happen, the following transactions don't happen either.)
Due to this construct everybody should now able to get any amount of money, at any point in time. Right? So... this in practice should also allow for risk free arbitrage, for everyone at any point in time. Y/N?
But it seems like this is not what flash loans are actually being used for, since every article I can find only talks about flash loan in the context or defi hacks/exploits, were they are being used to bombard other innocent projects with obscene amounts of money that then glitch out the internal contract logic, which then sometimes allows attackers to steal huge amounts of money.
So I don't really get what anyone get's out of offering flash loans in the first place, since it's either gonna be used to steal money, which makes the lender the middleman in a crime, or in the other case, they are technically still loosing money with every succesfull arbitrage.
I would imagine the blockchain to quickly become completly unusable as well, since every other block would get shit up with meme transactions, which would clog up the system entirely and make it impossible for every normal transaction to go through.
None of that actually happens of course, but I just don't understand why.