Optimistic rollups like Optimism and Arbitrum are going to take increasing space in the global DEX volumes as shown by the impressive increase on Arbitrum DEX volume these past months.
They now represent over $2.5+B per week, with Paraswap only accounting for $40M over the last week, which is around 1.5%.
I believe that our marketshare could be greatly improved by reducing gas costs for interacting with Paraswap on optimistic rollups. Indeed, with the current gas price of mainnet going crazy like for the meme coin season, it creates an equivalent reaction on these L2s gas prices and transactions on Optimism through Paraswap can reach 5-10$ nowadays.
The more the ecosystem will grow the more cost efficient the protocols will need to be to remain competitive, as a 50% gas saving could durably represent up to 5$ of savings per transaction on Optimism. These economies could attract more users and daily traders or could incentivize more people to develop their scripts with Paraswap.
With these considerations I have been thinking for a few months now on how to drastically reduce the costs for Paraswap on these specific optimistic rollups. It turns out it can be achieved through callData compression. I have now gathered many ideas and tested a few of them and I would like to cease the OP grant opportunity to help me accomplish this project for the DAO.
This compression algorithm will be universal for any callData or swap method used in Paraswap, this will guarantee a sustainable optimisation for all the versions of paraswap to come, without struggling in development for keeping with the optimisations or not to break it.
A saving of +50% of gas cost on Optimism and Arbitrum will bring Paraswap to the top of the aggregators on these chains, and could easily bring 1 or 2% of the relative volumes of Optimism and Arbitrum, thus multiplying by 2 or 3 the volume on this network and potentially the related rewards.
This work will rely on byte level compression algorithms, solidity development, back-end development, smart-contract optimisations, in order to create a brand new compression method optimised for optimistic rollups.
As a tech lead in an innovating startup in blockchain since 2018 I am in position to lead this work.
Optimising gas costs on Optimism/Arbitrum
Community project, Paraswap optimisation, Costs savings
The price of a transaction on optimistic rollups mainly dependw on the gas paid for integrating this data in the L1 (aka Ethereum).
This difference could be reduced or we could even achieve better gas costs. And Paraswap could have the lowest costs across aggregators on the optimistic rollups.
Reducing the current gas cost for interacting with Paraswap on Optimism will be a clear advantage, as users will see the gas cost reduced by at least 35-50%.
The exact volume acquired is to be determined, but there is a lot of room to grow:
current trading volume (7D): $380M (according to defillama)
current trading volume on Paraswap (7D): $10M
These volumes are proportionally x10 on Arbitrum.
By reducing the transaction cost, I think a fair x2 on the volumes going through Paraswap is a realistic expectation, even a pessimistic one as it represents only ~2% of the total volume on DEXs on Optimism. In the context of this evaluation it would allow for at least $560M more volume per year, considering a low reward for the DAO on the positive slippage as 0,0035% of the volume that could easily generate more than $20k a year.
The equivalent amount for arbitrum would be + $200k/year as fees for the DAO.
As a total this upgrade could bring around $200k/year as fees for the DAO, as Arbitrum is often currently the second volume across all chains and Paraswap protocol, it could really represent a noticeable increase in rewards and volumes for Paraswap.
If this upgrade was already currently implemented this would represent $116k of saved gas fees for Paraswap users (considering 300k txs on ARB and 140k on OP, with respectively 20cts and 40cts of saving in average).
In total the DAO users and ParaSwap users will benefit from cost saving on Arbitrum and Optimism as well as more ETH rewards while staking $PSP.
This project will help to grow volume on Optimism and Arbitrum by decreasing the gas costs for every OP user interacting through Paraswap. It will also help to decrease the overall gas consumption of optimistic rollups on mainnet, and could help decrease the costs of interacting with both L1 and L2.
This project will help to grow volume on Paraswap on Optimism and Arbitrum by increasing the competitive advantages of Paraswap on other DEXs and aggregators.
This project will be structured in 3 phases in collaboration with the Paraswap dev team:
- research & POC: +1 month including the times of meeting for getting into more close collaboration phases
- evaluations and optimisations: 1-2 months
- adaptations of code base and deployment: 1-2 months
Total duration: 3-5 months, expecting delivery date in production in 10/2023 at latest.
I will be leading all the phases and will process to the necessary changes I’ll be able to do, for the deployment part I will help advising and accompanying the Paraswap dev team as much as it will be needed.
Amount of OP requested
Initial 2k $OP on validation of the grant.
- research & POC: 5k $OP
- evaluations and optimisations: 7k $OP + 5k $OP bonus(if average saving > 45%)
- adaptations of code base and deployment: 6k $OP
Total: 20k $OP + 5k $OP performance bonus (around $30k at current $1.4 valuation).
As this project could bring a real advantage to Paraswap, and regarding the complexity of the implementation and the innovative nature of this research for aggregators and DEXs, 20-25k $OP seems a fair share to request if all the success metrics are met. A total duration of 4-5 months will be required to release this upgrade while I’ve been studying the feasibility for a while. This will also cover the costs of deployment and testing as deploying contracts on Optimism and Arbitrum can be quite expensive in the long term.
I’ve hesitated a while to move some of the required $OP amount in a bonus considering the evolutions for each network in volume, # of transactions or number of daily addresses on this network, as it would seem fairer for the DAO to pay only if consequences, but considering the work to setup these comparisons and the uncertainty of the market conditions being the same as the past months, I’ve finally decided not to include this.
Success is determined for each phase as follow:
Research & POC:
Document gathering ideas for optimising callData size on optimism (could stay confidential if necessary to keep competitive advantage)
Implementation of a smart-contract allowing for callData decompression
Compression average rate of at least 25% at this stage required
Evaluations and optimisations
Create a framework for evaluating the performance and exactitude of the compressing algorithms regarding a variety of inputs, and the related gas costs
Optimise the contract to reduce the callData even more
Optimisations on the compressing algorithms
Compression average rate of at least 35% is expected at this stage and the algorithm should be efficient (running in few ms)
If compression average rate is at least 45%, 5k $OP should be unlocked
Adaptations of code base and deployment
Testing in real conditions and final adaptations to the contract for production condition
Help and guidance around the necessary modifications in the API and blockchain
Internal documentation and flows for the compression well designed and proved
Implementation of the compressing algorithm for the Paraswap API specific language
- Support and slight optimisations post-production if possible
- Gathering data and analytics around the savings
- Documentation and redaction of communications of the advantages and savings made through this optimisation
When all the points of a phase are considered reached the related grant could be unlocked.
I hope this grant proposal will get your trust and agreement, as I’ve also been accepted as a ParaTrooper recently you can get a bit more of my background here.
I’m determined into achieving my ideas for the DAO and to help developing and structure an innovative protocol.