The borrower didn't have to put collateral for the fund they borrowed if they can return it within the same transaction block? In amateur non-technical dumb way, how long does a same transaction block span? One day? One week? One minutes?
Depending on the blockchain, the block time is different:
on ETH - block time is an average of 15 seconds
on BSC - the block time an average of 3 seconds
This is the time frame you have the loan in your wallet and build your own trading transactions.
It looks short time, but it's enough to execute an arbitrage trade, for example.