Would it be possible to use a flash loan to flash loan?
Ex. I charge 10% for a flash loan. Someone asks my contract for money at 10% rate, so I go to Uniswap, get the money in a flash loan, and loan this user money in turn.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityIt can be done using a smart contract. the only condition with swap loans is that they are executed in a single transaction, so what you would need to do is have a function, which calls Uniswap's flash function, send the received tokens to the caller, and on the end return the tokens to the original loaner.
Flash loan contract doesn't care what you do with the tokens after you borrow them as long as you return the funds with the additional fee on the end of the transaction.