Gas-Optimized Flash Loans on Aqua Protocol. More tokens for lenders. More yeild for LPs!
While platforms like Aave provide flash loans, their token coverage is inherently limited. This implementation aims to fill a critical market gap:
The Problem:
The Solution: Aqua Flash Loans enable efficient, low-gas flash loans for tokens not listed on traditional lending platforms. This is particularly valuable for:
By leveraging Aqua's liquidity infrastructure, this implementation makes flash loans accessible for a broader range of tokens at lower gas costs, with flexible fee pricing determined by individual liquidity providers.
Result: The project that implements custom fees flash loans using the 1inch Aqua protocol with a direct pull/push mechanism, avoiding the complexity and gas overhead of bytecode construction. The result is simple, auditable implementations that maintain full security guarantees while being significantly more efficient.
Key Achievements:
Long story short: I have used the 1inch aqua-app-template in order to speed up the development. As a framework I've used the hardhat v3. I have first researched how does Aqua works, came out with an idea of flash loans, verified their necessity by researching the current state of the market for flash loans (and. uncovering a strong case for a long-tail tokens!). Only then I have sat down and coded the solution.
At first I have tried SwapVM. But then I've realized that flash loans is something rather simple and straightforward (and ideally gas-units-cheap). This is how I've pivoted to using the aqua-app-template (instead of swap-vm-template). Then I've implemented the basic flash loan, tested it, deployed to Sepolia.
Then the "aha" moment happened - since the Aqua is the swap engine - we can make efficient dual tokens flash loans! which will be gas efficient. Done. Implemented and tested.
Then the serious research legacy of mine kicked in and I've decided to run back-to-back tests with Aave V3. And viola - Aqua flash loans are using 2 times less gas units compared to Aave! Indeed gas optimized.
Then I've polished it all and shipped 🚀🧉

