The RSquad DEX Solution

5 min readOct 7, 2022

A brief outline


The development of a decentralized exchange (DEX) for a financial platform based on Uniswap v2 with Yield farming functionality.

Platform overview

An innovative financial platform (FinTech) that connects businesses and individuals and provides its members with a secure, private way to exchange funds/assets, services and goods within its ecosystem. The FinTech crypto-platform which is being developed is owned by its members and ensures their privacy and legal protection.

Vision of the problem (project prerequisites)

The business model of the financial platform is based on the cooperative principle. Here, a cooperative is a voluntary association of people with collectively owned funds, organized on the democratic principle of equality. It is stated that the cooperative platform will be financed from a capital fund (40% tokens) and capital contributions from members, known as rotating capital. This is a financing method in which members make capital contributions in proportion to their influence. After the cooperative has used this money for a certain period, the money is returned to the cooperative members as it is replaced with new contributions.

The business goal of the project is to bring together individuals, businesses or other communities under the auspices of a legal representative to fulfill their economic, cultural and social needs. It is planned to be a multi-level cooperative global network with all the benefits of legal protection, equal opportunities and equal access for all its partners and members.

The financial platform ecosystem pays significant attention to the decentralized cryptocurrency exchange (DEX). Within DEX, there must be liquidity pairs (LPs) that will make it possible to exchange assets in accordance with the principle of automatic market maker (AMM), and deposit liquidity in them receiving LP tokens. Liquidity providers who have obtained LP-tokens will receive a commission for each exchange made and will also be able to freeze their tokens in farming pools to obtain additional yield in DEX tokens.

Characteristics of a finished product

The developed system should enable a financial platform to implement the concept of a decentralized exchange with liquidity pools and automatic market maker.

DEX should provide the administrator with an opportunity to:

  • create a pair;
  • add a farming pool;
  • set commission fees;

DEX should provide users with the ability to:

  • make token exchanges within the pool;
  • add/remove liquidity to/from the pool;
  • inject LP tokens into the farming pool and receive remuneration;
  • stake DAO tokens.

Specifics of the original protocols

The Uniswap protocol is a peer-to-peer system designed to exchange ERC-20 tokens in the Ethereum blockchain. The protocol is implemented as a set of smart contracts with no update capability. It is designed to prioritize security, self-service and to work without any trusted intermediaries who can selectively restrict access. Each Uniswap smart contract or pair manages a liquidity pool consisting of reserves of two ERC-20 tokens.

SushiSwap is a decentralized exchange. Similarly to Uniswap, SushiSwap allows users to trade without trustees in a peer-to-peer network with liquidity provided by other users. Users receive SLP tokens for providing liquidity, which enables them to engage in farming. The mechanics of how farming works in this case is Yield farming, which refers to performing a certain action for a platform or organization that justifies the payment of an annual percentage yield.

Often this action entails adding liquidity to the network and then placing liquidity provider tokens or adding liquidity to the market for borrowing and lending.

The table below features the adaptation of the aforementioned protocols, user and admin interfaces by the RSquad team.

A solution by RSquad

RSquad experts have developed a DEX system which provides a mutually beneficial mechanism of working with digital assets. On the one hand, users invest funds and provide liquidity to issued tokens or act as traders. On the other hand, they gain profit from it. The system provides a full cycle of funds movement and various operations with assets, in particular, additional investment opportunities.

The developed DEX System includes several subsystems:

DEX. Liquidity pool (LP) is a pair of coins/tokens with locked funds of liquidity providers.

The main mechanisms:

  • Trading is carried out by an automated market maker (AMM);
  • LP releases its token when liquidity is deposited to it and writes it to the balance of the liquidity provider;
  • when a liquidity pool token is burned, the user receives a part of the pool, according to his or her share;
  • The user interface deploys supplementary smart contract methods to get up-to-date data on token prices, and interacts with liquidity pools.

Farming is an add-on to DEX which enables users to invest tokens received for providing liquidity in the specific liquidity pools that the farming administrator has entered into the corresponding smart contract.

Each subsystem includes the following modules:

  • a set of smart contracts;
  • a user interface for interaction with smart contracts.

User roles and access rights:

  • Both a crypto-purse (e.g., metamask) or another smart contract that is designed to interact with ERC-20 and DEX tokens can be a user. The user can act as a liquidity provider or a trader.
  • Only the owner, i.e. the address that was accepted by the farming smart contract during the deploy or during a subsequent change of owner, can be the farming administrator. The administrator can make changes to the operation of the farming.

Here is a schematic depiction of the DEX system in action:

Benefits of the solution by RSquad

The System that has been developed is attractive to users because it offers a variety of transparent and lucrative ways of gaining income. Moreover, it is easy to manage and can be customized to the client’s needs depending on the goals of the specific project.

RSquad is a team that has successfully implemented 75 projects in various networks, including the Bitcoin, Ethereum, Solana, TON networks.

Official media: Facebook, Instagram, Linkedin, Telegram, VK, Twitter.




RSquad is a international team of experts specialized in the development of decentralized information systems based on blockchain technology.