How Do Decentralized Lending Protocols Manage the Risk of a Flash Loan Not Being Repaid?
They manage this risk by enforcing the atomic nature of the flash loan transaction. The smart contract is programmed to automatically revert the entire transaction if the full borrowed amount, plus interest, is not repaid before the transaction ends.
This means the funds never actually leave the protocol's control unless the repayment condition is met. The protocol takes on no risk of non-repayment, only the risk of exploitation during the transaction.