project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

FlashMarket

A peer to peer flash loan protocol. Any EOA (or contract) can now lend liquidity with his own chosen fees to anyone during a tx just by doing a token approval.

FlashMarket

Created At

ETHOnline 2023

Project Description

In the emerging world of decentralized financial protocols (DeFi), the use of flash loans has revolutionized the way users can access liquidity. Flash loans are instant, collateral-free loans that allow borrowers to take and repay a sum of money in a single transaction. Initially limited to developers and DeFi experts, flash loans quickly gained popularity and became a crucial financing option for a variety of users worldwide.

The Flash Market peer-to-peer flash loans protocol marks a significant milestone in the evolution of the DeFi sector. Unlike traditional protocols that rely on their single liquidity to facilitate flash loans and force their users to deposit on their platform to lend the liquidity, this new protocol enables users to interact directly with each other in a decentralized way.

This means that any Ethereum Address (EOA) or contract can now provide liquidity as a lender and charge customized fees, all in a single transaction.

The advantages of this peer-to-peer flash loans protocol are many and significant:

  • Enhanced decentralization: Thanks to this protocol, dependence on few protocols that are acting as intermediaries is eliminated, reducing the risk of censorship or system manipulation.
  • Users have total control over their funds, indeed they are not forced to deposit into a specific protocol to make their liquidity accessible to borrower. Reinforcing the decentralized nature of the DeFi ecosystem.
  • Increased accessibility: By allowing any EOA or contract to become a lender, this protocol offers unprecedented accessibility to liquidity. Users no longer need to comply with strict criteria or rely on a big DeFi protocol to obtain a flash loan, opening the door to a greater number of players on the DeFi market.
  • Customized pricing: The peer-to-peer flash loan protocol enables lenders to set their own fees for providing liquidity. This encourages competition between lenders and leads to more competitive fees for borrowers. Users also have the freedom to choose the most advantageous offers to suit their specific needs.
  • Flexibility of use: Any whale or big liquidity container contract can become a flash-loan protocol just by approving a contract.
  • Enhanced security: As transactions take place directly between users, the risks associated with other protocols are reduced. Users can check the terms and conditions of the flash loan directly before proceeding with the transaction, reinforcing transparency and confidence in the process. In addition, for a DeFi protocol that want to offer flash loans services, it doesn't need anymore to create his own set of contract but just need to do a single approve transaction. This eliminates all the hack risks for their flash-loan feature.
  • Degens paradise: enjoy the possibility of doing PEPE flash loans by aggregating multiple sources of liquidity in order to reach the amount you need to do your things
  • Better market efficiency for small chains liquidity: Basically you can now borrow from as many sources of liquidity you want, so Flash Market should unleash the arbitrages possibilities and permits to small chains to have a way better efficiency into their markets.

How it's Made

The Flash Loans Peer-to-Peer protocol is a decentralized financial system built on the EVM blockchains. It allows lenders to approve a specific smart contract, set their preferred fees (ranging from 0% to 100%), and store this information in a mapping (address => fees). Additionally, the lenders' addresses are stored in an array for easy reference.

  1. Lender Approval and Fee Setting:

Lenders who wish to participate in the Flash Loans Peer-to-Peer protocol must first approve a designated smart contract. This approval is typically done through a transaction that interacts with the smart contract's approval function. Along with the approval, lenders have the option to set their fees, determining the amount they wish to charge borrowers for flash loans. The fees are also provided as a parameter in the transaction and are stored in the contract's mapping.

  1. Borrower Initiates a Flash Loan:

When a borrower wants to initiate a flash loan, they interact with the smart contract through a separate transaction. The borrower provides parameters to the smart contract, specifically the asset it wants to borrow, the amount, and sources of liquidity it wants to use in order to reach this amount.

  1. Accessing Liquidity:

The flash loan process begins by accessing liquidity from the first lender's address, followed by the second, and so on, as per the specified indices in the array. The protocol works in a sequential manner, starting with the lenders who have set 0% fees. This prioritization aims to minimize borrowing costs for the borrower, as they can take advantage of lenders offering loans without any additional fees.

  1. Consideration of Low Liquidity Addresses:

During the process of accessing liquidity, the protocol may encounter situations where lenders have lower available amount than the approved one. Or the contrary, a bigger amount available but a lower approved. The protocol do the intersection between these two case and take the available approved liquidity.

  1. Layer 2 Solutions for Cost Optimization:

The documentation also mentions the possibility of utilizing layer 2 solutions to mitigate the high transaction costs associated with numerous transfer operations on the Ethereum blockchain. Layer 2 solutions are off-chain scaling mechanisms that can optimize the speed and cost efficiency of flash loans.

background image mobile

Join the mailing list

Get the latest news and updates