Timeswap Tech Rewind
A quick recap of what we’ve been building since our mainnet launch
Gm Time Travelers!
We went live on Polygon Mainnet on March 21, 2022. It was the culmination of many months of eating glass and building with our heads down! And we couldn’t be more proud of how well the launch and the subsequent weeks went. Our pools have continued to operate with various different assets and an ever increasing volume of transactions with no major bug or downtime. We’re now gearing up for scaling Timeswap and bringing the true power of permissionless money markets to the wider Polygon ecosystem and web3 ecosystem at large.
We have an incredibly talented team of shadowy super coders who have been tirelessly working in the background to ensure Timeswap is safe and secure and also ensuring we have all the necessary infrastructure in place as we scale up.
In our conversations with our community we often realized there was a gap in understanding in terms of what our super coders were working on behind the scenes, so we‘ve decided to restructure our blog with a dedicated section for Engineering where our tech team will share their learnings & failures in public. We hope the wider ecosystem will find these valuable, you can read the first two engineering blogs here and here. In addition to these blogs we also wanted to throw some light into what all our super coders have been working on since mainnet launch, so let’s dive right in!
Deployment of Genesis Pool
We launched our genesis mainnet pool on March 21, 2022. The deployment was successful with no technical issues and the pools functioned smoothly as expected. Since then we have worked on numerous improvements and features as well as improving the overall infrastructure of the Dapp.
We analyzed our pool performance during week-1 and decided to increase the transaction fees— from 0.75% p.a in the first pool to 1.5% p.a and have kept it same since then for all of our subsequent pools. The goal for increasing fees was to incentivize liquidity providers for the risk being undertaken.
UI Changes for better UX
We updated our UI as per community feedback to improve the User Experience.
- Updated the UI to do a better estimation of gas, specifically for the purpose of repay transactions. These gas optimizations while small, still helps users.
- Added Pool APR and Pool CDP values post transaction execution, this helps users determine if the pool might end up in undercollateralized state after execution
- We also added warning messages for users in case of pool undercollateralization to further ensure lenders are protected and do not make mistakes
To analyse and consistently monitor pool statistics, our tech team built a Dune Analytics dashboard with all the pool level transactions data including lend, borrow, fees, protocol fees etc.
Some key metrics:
- ~1.6 Million USD total transaction volume
- 27,000+ total transactions.
- 5,200+ unique wallets
You can find all the stats on our Dune dashboard here: https://dune.com/ameeth/Timeswap
We successfully integrated with DeFiLlama to help track our pool metrics & TVL. We specifically created a Subgraph to serve our TVL and other data generated by our pools.
You can find our DeFiLlama page here: https://defillama.com/protocol/timeswap
To cater to the needs of serving better analytics in the future, we created our very own Timeswap subgraph.
You can see that hosted on The Graph here: https://thegraph.com/hosted-service/subgraph/emmanuelantony2000/timeswap-v1/
NPM Packages Live!
We made all the Timeswap Packages live on NPM (earlier these were live on Github ) to enable external and community development efforts.
This works as the catalyst for developers that would want to build on Timeswap, establishing a solid framework for them.
We made multiple optimizations to improve performance:
- Reworking the computation of liquidity tokens in the event of adding liquidity to an existing pool
- Introduction of minimum ΔY for the purpose of Lend and Borrow Transactions to ensure a lower bound for APR
- Refactoring the convenience contracts to remove circular importing warning and to be able to verify all contracts on polygon scan
- Earlier certain libraries of the convenience contracts were not verified due to a circular import related compiler issue. Resolving this would ensure all contracts related to the convenience to be verified
We have started an Engineering blog to promote and share what we do on a regular basis.
The aim of this is to:
- Promote education around Timeswap
- Encourage more developers to build on Timeswap
- Let our community in on our learnings during building Timeswap
- Create guides to help our community better understand Timeswap with a more technical eye
The following are our first blogs:
- How to use the Timeswap Subgraph (Link)
- Leveraging the graph protocol to retrieve analytical data off the chain (Link)
Expect to see regular content on the Engineering blog ;)
Follow the Engineering blog here: https://medium.com/timeswap/tagged/engineering
New features under Development
This enables users to add liquidity to currently deployed pools, the feature will be live on mainnet within next two weeks.
Users can also now become LPs and thus enable us to turbocharge our liquidity and help drive large transaction value with lower slippage. We will also soon enable permissionless pool creation which will truly democratize money markets in DeFi enabling any community to create their own money markets.
Some UI improvements soon coming to our Dapp
- Beautification according to community feedback
- Adding relevant pages for new features
FlashSwap bot will monitor the pool CDP percent and will execute a flashswap transaction using Uniswap Flashswap and ensure pools don’t remain undercollateralized
-> This feature is currently in final testing before deploying, we will mostly open source this Bot so that community can also participate in Arbitragueing
FlashRepay: Using a FlashSwap bot to payback the user’s debt.
We are going to add FlashRepay, where the user would be able to use flash-repay features to repay the borrowed amount without bringing fresh capital. If you want to repay your USDC debt, you no longer need USDC. Just click flash repay and it will atomically use Uniswap Flash Swap mechanism and repay your debt and unlock collateral!
We will be launching Gasless integration with biconomy’s gasless architecture enabling users to execute transactions on Timeswap without paying gas! No more transaction fees! This will go live this week.
Vaults would be introduced to automate investments into Timeswap Protocol. This would enable users to deposit their funds into respective vaults conveniently without having to do rollover or worrying about strategy. Currently under architecture development.
Timeswap V2 — a more capital efficient protocol is under active development. We expect to launch the testnet within next 1–2 months with features such as bidirectional pools — same pool can be used to lend or borrow either of the assets instead of needing two separate pools like in V1, early exit for LPs and lenders i.e they don’t have to wait till maturity to withdraw capital.
These and many other significant improvements are being built into V2 to ensure the most capital efficient and permissionless money market DeFi has ever seen!
As we continue to build Timeswap, we will continue to introduce newer features for our community — and as much as the development process itself, it’s equally important for everyone to give us constant feedback so that we can improve and deliver our best to enhance your experience using Timeswap.
A lot of exciting things are in the pipeline, make sure you keep an eye on all our official channels. We’d be regularly putting out similar tech updates — you might just get some good alpha from here ;)
Shadowy Super Coders signing off.