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

Brought to you by Sovryn

August 4, 2022

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. 

Since then, we’ve also released an entirely new product on Sovryn: Perpetual Futures! Yes, you can now trade decentralized perpetual futures on Sovryn using bitcoin as collateral, without the need for KYC. 

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!


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 


  • History table


  • History table


  • APY chart
  • History table


  • Stake history


  • 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

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.

Further information about The Graph and how this can be used by the community will be released over the coming weeks, as part of our Sovryn SDK initiative.

That’s all for now folks.

Stay Sovryn

You May Also Like

Leave A Reply