Inspiration
During the last weeks the DeFi space took some serious hits, beginning with Luna-UST crash and the following down-trend of the market. In the middle of this crisis, TronDAO launched USDD, a very ambitious project to give added value to users via a decentralized, over-collateralized, algorithmic stablecoin promising very interesting yield rates (up to 30%). Everything looks good now with USDD, it ticks all boxes: it’s decentralized, over-collateralized with great APY. But is it enough for users to jump on board?
Let’s look at the last part, the promised high yield, up to 30%. How easy is to get that APY? Where is it available? After a quick search everyone can see that 30% is available only on CEX, which is not great for a stablecoin that has the word “decentralized” in its name. So, what about DeFi yields? At the time of writing this is the situation:
- 12.7% on JustLend.org
- 16.5% on USDD/USDT (SunSwap) liquidity farming on Sun.io
- 19% on USDD/USDT (2Pool) liquidity farming on Sun.io
- 48.5% on USDD/TRX liquidity farming on Sun.io
So, the 30% APY is not available on DeFi, unless you chose to farm the USDD/TRX LP, which exposes your capital to TRX price fluctuation.
The second best option is farming on USDD/USDT pool, which gives you 16%-19% APY. But how easy is to do it? To enter the Sun.io LP farming you need to supply USDD/USDT liquidity to 2Pool or SunSwap and then stake the LP tokens to earn USDD while farming. If you want to exit, you need to do it all in reverse. This might seem intimidating to inexperienced users, DeFi should be accessible to as many users as possible.
Supply liquidity on JustLend.org is the simplest way to access USDD yield, but it’s also the lowest APY of the pack, less than 13%.
So we did some research and tried to find a way to offer Tron and USTX users the best USDD DeFi APY and the simplest way to access it. We worked the math, coded the smart contracts, tested them and now we present WARP, our way to simplify USDD yield harvesting.
What it does
Warp is a DeFi app, within the USTX ecosystem, that implements a pseudo delta neutral farming strategy. Mmmm… that doesn’t sound simple at all. Let me try again: it’s an app that allows the users to stake USDD and get the highest DeFi rewards (30%+ APR) with low risk and very easy access.
The UX is very simple, similar to most staking dApps: deposit, claim rewards, compound, withdraw, while behind the scenes the smart contract and the team manage all the complex parts.
- Interface: web app accessible via browser (pc, mac, mobile)
- Wallet: Tronlink (Math and Klever will be validated shortly after the release)
- Deposit token: USDD TRC20
- Rewards token: USDD TRC20
- Deposit lock: 1 full epoch (epochs duration is 1 week, changes every Saturday)
- Rewards lock: till next epoch transition (unlock on Saturday after the request)
- Rewards compounding: yes, manual compounding available
- Max Warp factor: 5.0 (+50%) if user has at least 20 USTX in locked staking every USDD deposited
- Fees: app requires energy to operate, a portion of the rewards will be used for buyback and reserve (max 25%), balance withdraw is not taxed unless the equity ratio is below 100%. This can happen after significant changes in TRX price, but recovers naturally within a few days. The team will create a reserve in the contract to avoid equity ratio < 100%.
- Custody: the deposits are fully managed within the contract, they will NOT be moved to team wallets. The smart contract handles all the interactions with JustLend, SunSwap, Sun.io and all other contracts required to manage the strategy.
- Management: the team will monitor the equity level continuously and weekly will re-balance the strategy, to make sure that it stays close to neutrality.
- APR: Warp yield will vary over time and will depend on Sun.io and JustLend conditions. The team will make sure the contract parameters are always optimized for the best yield and lowest risk.
- Anti-whale: There is a limit on how much a single user can deposit. At launch the limit will be 1,000 USDD but it will be increased to 10,000 USDD after a few weeks.
How we built it
Farming the USDD/TRX LP pair doesn’t protect the user against TRX price loss, so if you enter at a certain TRX price and after some time the price dips significantly your capital has reduced its value, even considering the high farming yield. There is a way to compensate this effect and JustLend makes it possible. If the user supplies USDD to JustLend and then borrows a part in TRX to get the USDD/TRX LP, it creates a situation where the TRX price variations are (almost) cancelled, so the name pseudo delta neutral.
How can it be? If you borrow TRX from JL and add as liquidity in USDD/TRX pool you now have two positions on TRX: the borrow and the LP value. If TRX price increases, the LP value increases, but so does your debt. On the other hand, when TRX price decreases, the LP value is lower, but also your debt position. The overall value of the user invested capital stays roughly the same (supply value— borrow value+LP value). Let’s see this in a chart.
So we’ve fixed the TRX price dependancy, but how about the yield? Can we do better than the 20% that the DeFi options are currently offering? Let’s put some real numbers and make a new chart with the APR, taking into account also the TRX price variation.
Now it looks nice, APR is about 35%. But we’re still not done yet, what is the role of USTX in all this? WARP will merge in the USTX ecosystem in two ways: to generate more buyback and to increase the APR for USTX holders.
The WARP app will distribute weekly rewards to users, but a part of the raw APR will be routed to USTX buyback. The amount of user rewards will always be at least 75% of the total rewards (hardwired in the smart contract), the rest will be used to buyback USTX tokens from the DEX and also as reserve for the WARP contract, to make sure that the overall equity level stays positive at any time (even when the blue line in the chart goes below 0).
To incentive WARP users to also buy and stake USTX tokens, they will benefit from a multiplying factor over the base APR, called Warp Factor. The user warp factor is determined by the amount of USTX the users holds in any of the locked staking options that USTX offers. Maximum warp is obtained when 20 USTX are held for every USDD deposited. At the beginning the Max Warp factor will be 5.0, meaning that the warp APR will be up to 50% higher than the normal APR. Let’s see the final APRs in a chart.
So, making the best use of Tron USDD DeFi options, we’re able to maximize the user rewards and simplify the overall experience at the same time. Warp users will get over 37% APR, while normal deposits still get 25% APR (these APRs will change over time and will depend on Sun.io and JustLend conditions).
Challenges we ran into
Working and debugging smart contracts is never easy, but fortunately most of the times you can work on testnet. Well, that's not the case for WARP. The main contract needs to interface with 17 (seventeen) other smart contracts, most of them live only on mainnet (JustLend, Sun farming, SunSwap), so we needed to design a way to develop and debug directly on mainnet. We partly solved this using a proxy + logic contract structure to be able to test only partial functions and be able to change certain pieces of code after deploy. This of course needed tons of energy, but we had support from some friends with that (@Moneyversac).
Accomplishments that we're proud of
This is one of the most complex project we made, at least on the blockchain side of things. We worked hard to make it in time for the hackathon and we're very proud to see it live and accessible to users with full functionality. We think we have met the main goal of the project: making a simple to use app, with good UX, masking the complex actions that happen behind the scenes. Technology should be about making complex things simple, so that more users can benefit from it. Warp can help the USDD ecosystem increase adoption and bring more users to Tron and USTX.
What we learned
Blockchain coding is hard and sometimes very little things can block development for days. Team work can really make the difference in these situation, since the eyes of one person might not see what is in plain sight of another. USTX team is not big, but we work as one, managing the different aspects of the projects: blockchain, front-end and marketing. Every member is specialized, but we always share the decisions and the road to follow. We learned that even the best project cannot succeed without a strong team behind, that shares a common view.
What's next for Warp by USTX Team
Warp has been released on July 16th: WARP
The team will keep building behind the scenes all the monitoring and management infrastructure to make sure that Warp can safely grow and also adapt to the market and the other apps it interfaces with (JustLend, Sun.io, SunSwap). We'll implement new features (like the auto-balancing contract) and improve the UX by listening to users feedback. We are getting a lot of user interest in a TRX version of WARP, to enable high APR on TRX single staking (20%+ APR). Since all the building blocks are in place we'll add this to our next developments, that might come around end of August. Warp fits within USTX ecosystem and is now the 6th app, together with DEX, Staking, Voting, Teleport bridge (2nd place on Tron Hackathon round 1), UpFolio. USTX journey will continue on Tron and BTTC (launched in July), but will also land on other chains like BSC and Cronos. We'll also keep working with partnerships like we did so far, building a strong community also from the development side.
Log in or sign up for Devpost to join the conversation.