The relevant question is whether the peg can be broken long enough for the loan to get margin called (by someone else exploiting the smartcontract to liquidate collateral). Lasting for the length of a flash loan isn’t enough.
Re:Anyone Seen Tether’s Billions?
by arcticbull on Friday October 08, 2021 @09:49AM
(#28799271)
I suppose that's true, but are you confident that's not possible? I'm not but as you can probably tell I'm pretty skeptical :)
Flash loans have to be paid back in the same block or everything the flash loan funded reverts. And to ensure this happens, it usually is all wrapped up on the same transaction bundle.
But liquidations are only triggered on oracle updates. And those happen at fixed intervals (measured in time or price movement), and can only happen a block at a time, in blocks after the flash loan has been closed.
> One of the most notorious flash loan attacks to have ever hit the space is the exploit on DeFi protocol bZx, where the attackers borrowed funds from the platform and quickly swapped them with stablecoins (sUSD). Since the stablecoin is governed by a smart contract, the attacker had manipulated its price by placing a large buy order on sUSD, which pushed the price of the stablecoin to $2, doubling its pegged value. Then, the attacker took a larger loan from the higher-priced sUSD, repaid his loans, and took the profit with him.
It's relevant here because stable coin prices can be manipulated at DEXs too, or at least have been in the past. I'm not sure there's a long enough track record to guarantee it won't happen again before things go pear shaped if you're trying to take your short structured this way via DEX. There's smart contract bug risk, counter-party risk in the stable coin collateral and peg risk. Also regulatory risk.
[1] https://www.cybavo.com/glossary/flash-loan-attack/