As a user of the friendly market AMM, you may have noticed the lack of liquidity available on the exchange resulting in you having an unpleasant experience, either by getting bad prices due to high slippage or simply by being unable to execute large trades.
This is exactly why we have added the RFQ (Request-For-Quote) feature to our DEX. This works differently than the current AMM mechanism by giving liquidity providers the freedom to provide quotes off-chain. This is beneficial for both LPs and traders as it allows LPs to control the price levels they want to trade in and gives users better prices, zero slippage and more liquidity to trade.
As a trader, your experience on friendly.market/swap will mostly remain the same. You will see a checkbox indicating that prices are being fetched from both the AMM and the RFQ systems. By using the RFQ + AMM combination, you will get the best price possible. If the RFQ price is better than the AMM price, the RFQ price will be used. Otherwise, the AMM price will be used.
You can disable the checkbox to only trade using the AMM.
How It Works
The RFQ workflow starts by the trader (you) sending a request-for-quote for a given trade, this request gets sent to market makers which then respond with a quote. If the trader is satisfied with the price they received and clicks on “Swap”, the trade is executed. The trader will receive the exact amount they saw when submitting the trade. No slippage.
Here’s an example:
Say Alice wants to sell 1 ETH for USDC
- Alice uses friendly.market/swap to select the tokens and enters 1 ETH
- A request for quote is sent to all connected market makers
- Market makers calculate pricing off-chain and respond with a quote and a deploy hash for an approve_digest transaction
- The RFQ engine sorts all received quotes and selects the most profitable quote for Alice then presents it. Let’s assume that the best quote was 1 ETH = 2000 USDC.
- Alice then sees that 1 ETH = 2000USDC and accepts the quote by clicking on “Swap”
- The swap deploy is generated with the trade parameters and with the approve_digest deploy hash (from step 3) as a dependency deploy. The deploy is then sent to the market maker.
- Market maker submits the deploy to the blockchain.
- Transaction is processed and Alice gets 2000 USDC and the market maker gets 1 ETH.
Before and After
Let’s take a look at the difference in prices between the AMM and the RFQ.
In this first image we’re trying to swap 20K USDC for CSPR. We get 381.5K CSPR, worth around $14.5K. This is a significant price impact.
Now let’s take a look at the same trade with the RFQ enabled.
We get 512K CSPR worth around $19.65K. 34% better than the AMM price. A huge improvement.
Currently the RFQ is limited to $20K per trade. More liquidity is planned to be deployed in the future.
About Friendly Market
Your gateway to decentralized finance on the Casper network giving you access to multiple products and one ecosystem.
Telegram announcements: https://t.me/friendlymarketann
Telegram public group: https://t.me/friendlymarketofficial