Indeed, the continuous expansion of decentralized finance has undoubtedly facilitated flash loans and other loaning projects, thereby relegating traditional loans. Overtime, borrowers who subscribed to traditional loans encountered tedious requirements or prerequisites to access the existing loans. As a matter of fact, many of the traditional loaning programmes usually mandate borrowers to produce collaterals, evidence of occupation/payslip and so on before being considered. However, with flash loans occasioned by DeFi, such tough procedures are not incurred. Accordingly, this article seeks to comprehensively analyze the virtual trend and how users become eligible to access such loan.
As earlier hinted, the possibilities of accessing crypto-based loans manifested in courtesy of DeFi technologies. Built on the Ethereum blockchain, the DeFi flash loans came into limelight in 2020. Its founder, identified as Aave operates a renowned lending platform on the Ethereum network. Furthermore, despite possessing varieties of similarities, the differences between flash loans and other traditional loans are not farfetched. As obtainable in traditional loaning programmes, DeFi flash loans requires borrowers to refund the borrowed funds, with interest. However, the amount incurred in the interest depends on the value of the funds borrowed.
How does the flash loan works?
As the name implies, the borrowers refund the borrowed funds in the same transactional chain. Being an unsecured loan as it requires no collateral, the flash loan relies solely on the smart contract obtainable on the blockchain. The smart contract, however, house the funds, ensuring the transactions of the borrowers only succeed if the borrower meets the rules. This literally mean the lender can recover the funds if the borrower failed to follow the protocol as programmed on DeFi. Borrowing and refunding occur on flash loan within the twinkle of an eye as borrowers in one process take the loans, trade with the loan and refund the loan in the same process, thus keeping the profit.
As programmed, the smart contract accordingly performs the aforementioned operations on behalf of the borrower. Immediately the borrower field the money into it, the smart contract processes a logic of exchanges to make profit, through token sales, DEX purchases and trades. In similar terms, the mechanism do the trading, flip the profit and consequently return the initial loan. However, a serviceable fee of about 0.9% of the returned profit becomes charged after the success of the transaction. Having done this, the smart contract tends to terminate the trading or transaction if it lacks profit or when the borrower failed to refund the lender. As programmed, the project automatically return the funds.
How new subscribers can access such loans
For new subscribers to access flash loans, they need to first develop a contract capable of seeking such borrowing. Accordingly, the built contract consequently reaches the pool contract to seek for a flash loan, stating the exact amount. For the borrower contract to do this, it must through an ethereum account relay a transaction to the concerned pool by using either the flash loan or flash loan simple functions. IFlashLoanSimpleReceiver.sol or IFlashLoanReceiver.sol contract address becomes used. The process appears similar if using a contract from a different account. The borrower must ensure the aforementioned receiver contract address stays unchanged.
As programmed, the pool contract, then conduct series of verifications. In this process, the pool contract secures precedented access to automatically extract the funds as payback of the loans. With this in place, the pool contract further directs execution of the operation by the other contract. The borrower contract must align to the IFlashLoanSimpleReceiver.sol or IFlashLoanReceiver.sol interface by executing the operation as directed. After successful verifications, it relays the requested amount of loans to the borrower’s contract. Immediately after the success of the operations, the borrower need to ensure that his contract posseses the required resources to refund the loan. As earlier noted, the funds automatically extract itself from the contract to the pool as programmed.
For instance, borrowers having discovered that a virtual asset which costs $25 in DEX B amounts to $35 in DEX C. Such borrower then immediately employ flash loan to borrow $25 and consequently purchase such tokens with the acquired loan. Afterwards, the borrower proceeds to DEX C to resell the token at a gainful amount of $35. In the same transactional process, the refunds become made, in addition with the interest attached. That’s the literal programming of the flash loan.