News & Updates

Aug 2022 Release Notes: The Graph Migration (aka Legacy Backend Migration)

August 4, 2022
min read

It seems like only yesterday since we started onboarding people onto Zero from the early access waitlist. In less than 2 months, we’re on the cusp of reaching $2 million in TVL on the protocol. 

In our previous release notes, we outlined a number of Quality of Life updates to the dApp. In this month’s instalment, we’re delighted to share details on what has been an ongoing initiative over the past while: The Graph Migration!

Overview

This release includes improvements to our backend systems used to provide data to the Sovryn dApp, and UX enhancements to our Cross-Chain flow.

Changes in this Release

Backend migration work to improve performance and reliability of data loading for the following areas of the Sovryn dApp

Landing page

  • Asset price 

Swap/Spot

  • History table

Margin

  • History table

Lend

  • APY chart
  • History table

Staking

  • Stake history

Reward

  • Available / Total Balances

Yield Farm

  • History table

Enhanced UX for our Cross-Chain (Bridge) flow

  • Instead of using the ambiguous terms "deposit" and "withdraw", we're now using the terms "Send" and "Receive" to reflect sending funds from the user's wallet or receiving funds to the user's wallet.

Layout updates

  • The progress bar has been moved to the top of the page, and clear explanations have been added for each step.
  • Minor visual and functional bugs have been fixed.

General dApp updates

  • A ‘tiny position’ check when closing loans has been added so that you don’t leave a very small position open when closing a loan. 

Smart contract updates

  1. Update to the lending pool contracts to reduce the gas costs for margin trading
  2. Update to the wrapper contract used for AMM interactions
  • Now supporting liquidity provisions for ERC20/ERC20 pairs with automatic participation at the liquidity mining program
  • General refactoring to reduce gas costs

BE THE FIRST TO USE ZERO

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Backend Migration Summary

The reasons we carried out the migration are outlined below:

  • Data is more robust and reliable from The Graph.
  • Any code for The Graph support can be much more easily maintained and extended by our developers than the previous backend architecture, and the community in general.
  • The Graph is a battle-tested framework designed specifically for indexing blockchains.
  • There is an out-of-the-box GraphQL (Graph Query Language) API. GraphQL offers the benefit that it is much more community-friendly and transparent - users can query whatever data they want, however they want.
  • When The Graph adds full support for RSK blockchain, we can fully decentralize data services by using the whole Graph ecosystem.

Changes we have made in the migration:

  • Switched majority of the data used in the Sovryn dApp to be loaded from The Graph (where possible).
  • Where processing is required but cannot be handled by the Graph, we have created backend microservices to perform the same operations - these can easily be scaled up to prevent problems with large/sudden spikes in traffic to the dApp.

For an informative explanation of what The Graph is, how we are using it, and the benefits of doing so, check out our overview of The Graph on the Sovryn wiki.

Users are encouraged to explore and use The Graph. To help you get started, we have out together technical usage documentation which you can find in the wiki, following the link above.

Contribute to Sovryn Data Services development!

To get involved, take a look at our code on Github:

  1. Sovryn subgraph: https://github.com/DistributedCollective/Sovryn-subgraph
  2. Zero Subgraph: https://github.com/DistributedCollective/Zero-subgraph
  3. Graph Wrapper: https://github.com/DistributedCollective/Sovryn-graph-wrapper
  4. AMM Apy: https://github.com/DistributedCollective/sovryn-amm-apy

And come find out more and engage with the community on our Discord server!

That’s all for now folks.

Stay Sovryn

Sovryn

socials
learn more

Take your sovereignty to the next level

The road to financial self-sovereignty is long. Take a step in the right direction.