Cheaper and Secure Flash Loans with New Ethereum Implementation for DeFi

A new improvement proposal, recently merged into the Ethereum code, seeks to standardize the processes for flash loans (or flash loans ). It is expected that the incorporation of these loans into decentralized finance (DeFi) protocols will be simplified as it would no longer be necessary to consider each individual implementation.

According to its authors Alberto Cuesta CaƱada, Fiona Kobayashi and the developer known by the pseudonym Fubuloubu , there are "great differences in the approaches [to flash loans ] according to the protocol." The proposal, called EIP-3156 , seeks to unify criteria and approaches.
EIP-3156: the standard for flash loans on Ethereum

Basically, this implementation requires the loan recipient to execute the onFlashLoan function . For this, you must have received tokens from the person making the call. So that the transaction is not reversed, the receiver must send the caller both the amount and the commission.

Additionally, the token contract must implement a FlashLoan function that executes the equivalent of an ERC20.transfer operation . The lender's contract can execute a transfer of the tokens it owns or mint the tokens to be lent.

No comments: