Deep Dive on Timeswap: Unique Lending and Borrowing Protocol
Before diving deep into everything Timeswap, I would really like to touch upon a few things that are closely associated with the platform. Web3 is a field of extreme innovation and we see new protocols being made every day with different principles and underlying technology, everything under the umbrella of DeFi, challenging TradFi (Traditional Finance) on a daily.
So what exactly is DeFi and why is it required, what’s wrong with TradFi?
Decentralized Finance challenges the idea of traditional banking, revolving around the idea of decentralization, everything is in the hands of the user, not an entity on which a certain amount of trust has to be put in with funds.
> Traditional Finance has a lot of intermediaries that function in a way that the whole process of managing assets in the traditional way is very inefficient and impractical considering that it’s your own money that you’re trusting centralized organizations with.
> Such centralization induces fear in people about their own assets being managed by an entity on which they just have to put blind faith, that’s where the need of DeFi arises.
> Decentralized Finance hands over the control to people because its fundamental principle is to hand over the control to the people that own the assets.
Decentralized Finance like Traditional Finance provides services like lending and borrowing but with a very higher transparency rate and control over those assets in a way Traditional Finance would never do (This would be clear by the example of Timeswap and its utility in the DeFi space).
What is Timeswap?
Quoting from the Timeswap website:
Timeswap is the first fully permissionless, oracle-less, non-liquidatable, fixed maturity lending & borrowing protocol.
Breaking down the definition:
> It basically means that anyone using the platform can borrow or lend (fixed maturity) an ERC-20, using another ERC-20 token as collateral which enables users to have permissionless borrowing and lending.
What is an ERC-20 token?
They’re basically blockchain assets with a certain value and can be used to perform transactions on the Ethereum network.
It’s oracle-less as well which means that the Timeswap doesn’t depend on a price oracle to fetch the rates. A 3 variable constant product AMM unique to this protocol is used to fetch that data. This makes it different from platforms like Uniswap, where 2 variable constant product mechanism is followed.
It’s important that we understand what exactly an Oracle is, Oracles are “third-party services that provide real-time data & any external data to smart contracts which are outside of their ecosystem. Currently, DeFi protocols rely on oracles for real-time on-chain data like the price of assets.” ~ Timeswap glossary.
Point to note here: It is extremely important to understand why an Oracle-less market is safer than the one relying on an Oracle to fetch the price-action data. While the DeFi field is considered very secure, there have been a lot of thefts in recent years and a lot of them include manipulation of Oracle price data. A hacker that is capable of manipulating a price Oracle can use it as an advantage to receive more tokens from a certain swap, performing theft of digital assets and tokens through manipulating the prices which put platforms dependant on Oracles for such data vulnerable.
Reading more about such attacks: Link
Documentation about Oracle problem on Timeswap: Link
> There’s no liquidation penalty on Timeswap, making it stress-free for the borrowers. Timeswap also eliminates the dependency on liquidators that’s present on other Ethereum-based platforms.
Timeswap aims to be a game-changer in this field by eliminating the existing problems in DeFi and terming it as DeFi 2.0 (more on this in the article later).
Using Timeswap
Flying into the time machine, we just reached the Timeswap website, let’s explore it from deep within!
Entering the “App” to discover the features of the platform.
The App:
Our first step would be to set up our wallet and connect it to the Timeswap interface, simply pressing the “connect to a wallet” button and a pop-up should come to your screen:
After connecting your wallet, you should be able to see your wallet assets as follows:
The assets available are the tokens that are already available as ERC-20 Pools on the Timeswap.
You can see the following trading pairs are available on the platform:
Opening one of the following pools, we observe that we have the freedom to choose from the following ones according to our needs. We see that there are available pools in certain pairs and some do not have pools, using Timeswap, one can generate a pool themselves of any ERC-20 token and provide liquidity, which is one of the unique features of Timeswap.
Some things to be understood here are that we’re basically borrowing DAI (a stable coin) or lending DAI from the pool and putting up MATIC as our collateral asset. We can choose from the pools and go on to lend or either borrow.
Borrowing
Now, for example, we want to borrow 450 DAI, we‘ll click on Borrow and the following popup shall come, we see that it shows us our Estimated APR, the amount at repay and also the collateral to lock.
We also see the liquidity that’s present in the first pool, which is 999,150 DAI and 2.17M MATIC as the collateral in the second with an estimated APR of 35.08%, where the collateral factor is 0.921 DAI per MATIC.
The collateral factor (min CDP) is the amount of collateral locked per unit of asset borrowed.
There’s also a timer that shows our time to maturity, which is the term that’s decided when we borrow the DAI.
A very interesting option for our position here is the “Customize Risk” toggle which is only unique to Timeswap and no other platform, to better understand its use case, let’s toggle it in the next step.
Toggling the button, we see that we have a slider that helps manage our risk appetite according to our management of assets or funds.Lower the APR, lower the risk,
Higher the APR, higher the risk.
Here, we are shown the estimated APR according to the risk position, once everything is in place, just click the “Borrow button” and wait for the transaction to be approved.
Once it’s approved, we can check our overall debt on the main page, which is as follows:
You can also see the information as an NFT on OpenSea when you click on the small icon on the right of the screen:
Lending
To lend, again you go to the following pool pairs on the Dashboard and click on one of the pools:
You can click on the “Lend” button and carry out the procedure similar to the one followed while borrowing. You can see that we have 3 pools to choose from here with different maturity periods, we can simply choose the ones that benefit us the most.
After clicking on Lend on the following pools, we can see the following screens where for example again, we are lending 450 DAI to the pool, we can see that we have the following values:Estimated APR: 18.47
Collateral factor: 0.606 DAI PER MATIC
The collateral factor (min CDP) is the amount of collateral locked per unit of asset borrowed.
And the most important part here is the Insurance, we see that if one defaults on the loan, we should receive ~742 MATIC
which secures the lender in cases of 100% default by a borrower.
Now in the “customize risk” section, we can adjust it according to our risk appetite:
Putting it a higher risk would earn a higher yield %,
but the insurance coverage would get lower accordingly.
When you put it at a lower risk, there would be lower yield %,
but the insurance coverage would be higher.
You can find your Lend positions under the “Lend” tab in the Dashboard:
And this is how it looks when a position is matured and you’re able to claim back the amount:
Underlying Principles of Timeswap
It’s a fascinating platform, here we will summarize how it works and understand the underlying principles of Timeswap and how it could be useful to build other products.
Timeswap functions on a unique 3 variable product equation unlike the 2 variable product equation of Uniswap (which also factors in Oracles).
Here’s the equation:
X * Y * Z = K
X is equal to the number of assets in the pool that can be borrowed.?, known as the principal pool (X).
where X is the Principle Pool,
Y is the Interest Rate Pool,
and Z is the collateral factor Pool.
If the maximum interest rate per second is Y/X, the Interest Rate Pool is a virtual pool with an interest rate of Y/X.
An example of a virtual pool, known as a Collateral Factor Pool, is one that decides how much collateral the borrower must put up in order to meet the CDP’s minimal Z/X ratio.
It’s shown in an infographic very clearly from the Timeswap blog:
From here, we can infer that there are two more factors here which are A and C, A being the Asset Pool and C being Collateral Locked PoolCollateral Locked Pool is equal to the amount of ERC20 collateral tokens locked in the pool by borrowers.
Asset Pool is equal to the amount of ERC20 asset tokens locked in the pool.
X, Y, and Z may be changed in this model such that the constant product K is always maintained by lenders and borrowers while using the pools. This allows for interest rates and collateral components to be discovered in real-time on the market price.
You can read more about the intricate Mathematics of this in the Whitepaper.
Because of the 3 variable product equation, Timeswap is able to function independently without a need for an Oracle and hence makes the platform Oracle-less!
How Timeswap can help other projects?
Debt Financing on Timeswap is going to be a great tool for projects that would want to use their native tokens as collateral which would help them fund the initial financing of the project and also pan out in a positive way for moving capital into fair launches.
It also enables such projects to get leveraged loans rather than diluting their equity to finance their project, which is sometimes not a great option for smaller projects with great growth potential; Timeswap aims to solve this problem and give such projects a platform to use Timeswap and build their own products.
Key Features
As mentioned on their website:
Let’s go through the features one by one and analyze them ourselves.
”Flexible interest rate & collateral factors”: This is one of the best use-cases of Timeswap since it allows the users to consider their assets and have a risk appetite of their own rather than having the platform decide it for themselves like Uniswap and other platforms in this space.
”Oracle-less and Gas Efficient”: As mentioned above, the unique 3 variable AMM of Timeswap makes it self-sufficient to calculate and fetch the data from its own platform rather than having to use a third-party Oracle which might put the platform and its users at risk of theft.
”ERC20 agnostic”: Another unique and key use-case of Timeswap is this, users can create a pool themselves by providing liquidity to the pool and can enjoy the optimization of earning more yields from popular ERC-20 tokens by creating a pool.
Time Token
Timeswap is also in the process of introducing its own token which would facilitate the governance of the protocol through their community members, which is a great initiative by Timeswap making it a functioning Decentralized Autonomous Organisation.
It would then be used to decide on important proposals and voting would be deciding factor for the whole protocol. A transparent approach makes Timeswap a choice for a lot of users on the internet.
Community and Events
Timeswap has a very active Discord channel which enables the users to continuously interact with each other and discuss a lot of things Timeswap on it.
The Team makes sure that every update is given to the community to keep them excited about the future updates and upcoming events of the platform.
There are regular events that happen on Discord to engage the community and enforce trust on the platform.
Regular AMAs are also done on Discord to promote transparency within the team and its community members.
Gamified Testnet updates:
Recent Christmas NFT event on Timeswap Discord:
Timeswap and DeFi 2.0
It’s a term coined by the Timeswap team on their website and I would like to appreciate the fact that they’re trying to bring in solutions to the existing DeFi field.
There are a lot of existing problems in DeFi, a few of which are very neatly expressed in this blog from Timeswap’s Medium,
A few excerpts from there:
While existing money market protocols have amassed significant liquidity there remain inefficiencies that need to be addressed. Existing lending and borrowing protocols are not fully decentralized, market creation requires an unwieldy process due to governance voting mechanisms. This restricts liquidity for long tail assets wherein projects are dependent on the money market token holders who decide which token can be used as a collateral.
Timeswap tries to solve this problem by letting the users on their platform create their own pools, where they can choose any ERC-20 token to lend or borrow while having the other ERC-20 token as the collateral.
Arbitrary collateralization ratios have led to capital inefficiency wherein tokens with different risk profiles have similar collateralization ratios. Deciding collateralization ratios for every asset via governance mechanisms means additional operational overhead.
Timeswap has enabled users to customize their own risk profiles through their unique slider, which helps users maximize their yield according to their risk appetite. It hands the function to the user itself rather than have it decided by governance mechanisms.
Oracle attacks have drained millions from the DeFi ecosystem till date. Every lending and borrowing protocol is only as strong as their weakest link i.e the price oracles that feed the liquidation engines. Oracles remain a significant roadblock for scaling and securing money market protocols outside of the deeply liquid top tier assets.
This has also been one of the things Timeswap has worked on eliminating by their 3 variable product AMM equation. This eliminates the involvement of a third-party Oracle to fetch price data.
We at Timeswap are excited to be building solutions that specifically address some of these. We are calling this next phase DeFi 2.0, wherein we realize the vision of creating fully decentralized, secure and highly efficient protocols as we prepare to onboard the next billion users to DeFi.
The take on DeFi 2.0 by Timeswap here is extremely necessary and they have delivered solutions to the few underlying problems that exist right now, which gives us, as users, give even more reasons to trust the platform and use it. A good team is always a foundation block of success and one that delivers on its promises is something that we should really put our faith in.
Audit
One more addition to the credibility of the Timeswap platform is that their contracts have been audited by PeckShield, Quantstamp and Trail of Bits.
This means the contracts and code of the platform are on par with the standards of the Blockchain field.
Backing and Investors
A platform that is backed by veterans of the fields and firms that are positioned solidly in the space is a big plus.
Timeswap is supported by a lot of such people and firms:
The founders of the Polygon (one of the biggest multiscaling solution on Ethereum if not the biggest) are the advisors of the platform.
And other big names from this field as Investors of the platform:
Conclusion
Considering the current options and the solutions that Timeswap is offering, one should definitely try out the platform, the team also makes a very compelling case of delivering on their words and the eco-system guarantees continuous growth of the platform, also factoring in such strong advisors and investors. Timeswap is definitely an option to consider and with the whole Ethereum eco-system getting better and better, Timeswap is only bound to grow.
The DeFi space is an ever-growing field and we can only expect things to get better with platforms like Timeswap aiming to solve the existing problems for the good.