Inspiration
Experimenting with MEV and Uniswap-v2 pools. Trying to build an automated and trasparent protocol to maximize liquidity providers profits and reduce impermanent losses.
What it does
Trasparent, fully on-chain, automated DEX arbitrage where profits are distributed to liquidity providers as well as token swap fees.
How we built it
FlashLiquidity core and periphery contracts are derived from Uniswap-v2. The key difference between FlashLiquidity and Uniswap is that pairs can be assigned to a privileged address (FlashBot smart contract) or left open for public trading. In the first case token swaps can only be performed by the authorized address hence blocking external arbitrageurs that could compete (frontrunning) with automated flash swaps executed by the FlashBot contracts making possible to distribute arbitrage profits to liquidity providers instead. To help automate and decentralize this process, on April 14th, FlashLiquidity protocol finished integrating Chainlink Keepers and Chainlink Data Feeds in order to replace the centralized off-chain infrastructure handling pool rebalancing automation and arbitrage profit distributions to liquidity providers previously maintained by FlashLiquidity team (https://docs.flashliquidity.finance/ecosystem/automated-dex-arbitrage). On August 19th a set of new contracts has been deployed to further facilitate the process of creation of FlashBots, upkeeps registration on Chainlink Keepers (thanks also to the latest Keepers v1.2 upgrade) and also to ensure the continuity of operations by maintain a minimum balance on every FlashBot upkeeps (this set of contracts represent also the material for hackathon submission) :
FlashBotFactory: deploy new FlashBot contracts and keep track of it.
UpkeepsStationFactory: deploy new UpkeepsStation contracts and automate it by registering an upkeep on Chainlink Keepers (UpkeepsStationFactory is also automated with Chainlink Keepers to maintain both a minimum upkeep balance and a minimum LINK balance on all the UpkeesStation deployed). UpkeepsStation are used to monitor and ensure a minimum balance of FlashBot upkeeps in order to maintain the continuity of automated arbitrage operations.
FlashLiquidityBastion: treasury contract, holds flashBotSetter privilege thus can lock or unlock FlashLiquidity pools. (open pool for public trading or lock it to a FlashBot address). It can enable automated DEX arbitrage on FlashLiquidity pools with one single transaction wich take cares of deploying a new FlashBot from FlashBotFactory, assigning it the privilege to be the only address authorized to perform swap in the pool, automate the new FlashBot contract by registering an upkeep on Chainlink Keepers (the new upkeep is also assigned to a UpkeepsStation which will ensure a minimum balance).
Challenges we ran into
Time.
Accomplishments that we're proud of
This new sets of contract enhance protocol transparency and represent a great step toward decentralized goverance of FlashLiquidity protocol.
What we learned
Improved knowledge of EVM, solidity language and Chainlink stack.
What's next for FlashLiquidity
$FLIQ token launch
$FLIQ liquidity mining
FlashLiquidity DAO
Log in or sign up for Devpost to join the conversation.