rSwap V1 (ERD Solution)
Let's take rATOM Token as an example. If Alice holds 1 rATOM, then she is entitled to initiate a redemption to StaFi rToken Contract and obtain 1.04 ATOM tokens (assuming the rATOM/ATOM exchange rate is 1.04). However, due to the existence of an Unbonding Period (21 days) of Cosmos Staking, Alice can't actually receive the token till 22 days from the date of redemption.Alice can, for sure, exchange for ATOM through any rATOM-supported DEXes, but there might be certain limitations here as depicted by the following scenarios:1) The liquidity of the DEXes that supports rATOM is limited, which will make the exchange ratio much lower. In some cases, rATOM: ATOM price can be lower than 0.8, or even under 0.7.2) The issuance format of rATOM is StaFi Chain Standard, and so Alice must cross-chain to the Cosmos system for an rATOM-supported DEX, during which the gas fees could be very high. This scenario is quite hostile for small exchanges.So, what should Alice do if she wants to convert her rATOM to ATOM immediately?
Alice is not alone. Many rToken users are facing the above dilemma. Therefore, in order to improve the liquidity scenario of rToken, we provide an ERD Solution to facilitate users to quickly redeem NativeToken. As for its core business logic, we drew experience from the concept of Bill Discounting used in traditional finance. To put it simply, we regard rToken as a Bill issued by StaFi Protocol, which anchors the user's right to obtain a certain amount of Native Token within a certain period of time (often equal to the Unbonding Period of the original chain).The figure below illustrates a classic Bill Discounting Flow:1) A Bill Issuer issues a 45-day acceptance Bill to the Bill Holder.2) The Bill Holder hopes to receive the token as soon as possible, instead of waiting for 45 days. So, he chooses to do Bill Discounting with a Finance Provider.3) The Finance Provider pays cash to the Bill Holder at a discount of 90%, and then gets the Bill's exercise.4) After 45 days, the Bill Issuer will pay the Finance Provider the full amount of the bill.
Similar to Bill Discounting, when a user like Alice wants to immediately exchange the rToken Bill for Native Token, he or she can find a third-party Finance Provider who is willing to buy rToken from Alice at a discount. This is a win-win situation where Alice gets the Native Token immediately and the Finance Provider purchases rToken at a discount. The business logic of ERD solution is as follows:
1.Alice stakes ATOM through StaFi and obtains 100 rATOM tokens, with an annual staking APY of 12%~9%.
2.After holding it for 3 months, the exchange rate of rATOM/ATOM reaches 1.04, which means Alice could redeem around 100*1.04=104 ATOMs. In order to keep it simple, let's neglect the redemption fees(0.2% of the redeemed ATOM tokens).
3.Now Alice wants to use rATOMs to redeem ATOM immediately because of price fluctuations in the secondary market or portfolio management. But she doesn't want to redeem it through the StaFi rToken App which will take 22 days. And the liquidity or exchange rate on DEXes are not very friendly.
4.Under this scenario, Alice could choose to directly use the StaFi ERD solution to sell her 100 rATOM tokens to the financial providers, with a certain discount, such as 90% of the exchange rate. Namely, Alice will get around 104 * 90%=93.6 Native ATOMs, which will go to her Cosmos wallet address instantly.
5.The financial providers who buy the 100 rATOM tokens could redeem for 104 ATOMs on StaFi chain with a 22-day unbonding period.It should be noted that the transaction logic of ERD is not similar to that of Unsiwap's DEX. Essentially, ERD solution provides rToken users with a liquidity realization channel under extreme conditions like Alice's, at the expense of certain losses in the rToken users' principal. The exchange rate discount could be seen as the compensation for price fluctuations during the redemption period for the Financial Providers on StaFi ERD solution.
With the help of ERD solution, StaFi will build an all-round liquidity ecosystem for rToken Holders:
This type of exchange will support most mobile trading scenarios, such as Unsiwap, Curve, Pancake, etc. which have already been bridged to StaFi. The advantage here is that it can satisfy 90% of transactions with sufficient liquidity scenarios, but on the flip side, when the liquidity is insufficient, it may directly make rToken untradable or make the exchange rate extremely unbalanced (less than 0.9%).
The lending platforms allow rToken users to mortgage loans to meet liquidity needs, such as Liqee, which has been connected to StaFi.
ERD solution can help rToken users to exchange liquidity at a suitable exchange rate under extreme conditions like Alice's dilemma, and provides solid support for the rToken exchange rate on Third-Party DEXes.
rSwap needs the financial providers to deposit native tokens as the liquidity for rToken sellers. By providing liquidity, financial providers could earn profits, which is roughly 10% on native tokens, by purchasing the discounted rTokens.