RigelSwap

Rigel Finance
3 min readDec 11, 2020

Rigel.finance

What is RigelSwap?

RigelSwap is the decentralized exchange (DEX) of Rigel Finance, where users can add liquidity through automated liquidity pools, swap any ERC-20 token for another, and list their tokens.

The liquidity provided to the exchange comes from Liquidity Providers (“LPs”) who stake their tokens in “Pools”, in return they get RLP (RigelSwap Liquidity Provider) tokens, which can also be staked in the “Farm”.

When users make a trade on RigelSwap exchange, they pay:
- 0.3% trade fee;
- 0.25% fee reward for LPs;
- 0.25% of this trade fee goes to the Liquidity Providers, it’s added to the pool balance.

How a decentralized exchange works

DEXs are similar to their centralized counterparts in some ways but significantly different in others. Let’s first note that there are a few different types of decentralized exchanges available to users. The common theme among them is that orders are executed on-chain (with smart contracts) and that users do not sacrifice custody of their funds at any point.

Some work has been done on cross-chain DEXs, but the most popular ones revolve around assets on a single blockchain

On-chain order books

In some decentralized exchanges, everything is done on-chain (we’ll talk about hybridized approaches shortly). Every order (as well as alteration and cancellation) is written to the blockchain. This is arguably the most transparent approach, as you’re not trusting a third party to relay the orders to you, and there’s no way to obfuscate them.

Unfortunately, it’s also the most impractical. Since you’re asking every node on the network to record the order forever, you end up paying a fee. You need to wait until a miner adds your message to the blockchain, meaning the experience can be cumbersome, too.

Off-chain order books

Off-chain order book DEXs are still decentralized in some regards, but they’re admittedly more centralized than the previous entry. Instead of every order being posted to the blockchain, they’re hosted somewhere.

Where? That depends. You could have a centralized entity completely in charge of the order book.

These approaches are superior from a usability perspective than those that rely on on-chain order books. They don’t face the same constraints in terms of speed, as they don’t use the blockchain as much. Still, the trade must be settled on it, so the off-chain order book model is still inferior to centralized exchanges in terms of speed.

Automated Market Makers (AMM)

Automated market makers are smart contracts that create a liquidity pool of ERC20 tokens, which are automatically traded by an algorithm rather than an order book. This effectively replaces a traditional limit order-book with a system where assets can be automatically swapped against the pool’s latest price.

There are two main types of automated market makers (AMMs). While one may be governed and set up by professional market makers, the other is fully automated by a set algorithm, allowing any user in the market to participate by depositing liquidity into the smart contract.

RigelSwap is a fork of Uniswap Exchange, and it’s a true decentralized AMM.

RigelSwap allows for anyone to create a liquidity pool on the network, and enables any other user in the ecosystem to add liquidity. The price in the RigelSwap smart contract cannot be configured or controlled. The price of the tokens in the pool is fully determined by the balance ratio between the two tokens in the pool.

--

--

Rigel Finance

Rigel Finance: Farming, Staking, Exchange and more!