Skip to content

Commit

Permalink
Improving docs to include information about balance loss check
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabhxyz committed Dec 20, 2023
1 parent d85f59e commit 73ff6f1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ over the multi-asset order book to obtain a list of matches. The matches are the
translated into transactions that will be signed and submitted by the bot.

Due to the open and decentralized design of the protocol, anybody can run a Smart Order
Router instance and collect a share of the fees, thus running a Smart Order Router instance
is not only contributiung to the further decentralization of the protocol, but it is also
Router instance and collect the arbitrage opportunities, thus running a Smart Order Router instance
is not only contributing to the further decentralization of the protocol, but it is also
incentivized financially.

## Crash Course: GeniusYield DEX Orders and the Smart Order Routers
Expand Down Expand Up @@ -128,6 +128,10 @@ If we want our earnings to be in `tokenA` then the
commodity must be `tokenB`. So we can buy from the sell order, `20 tokenB` using `8 tokenA`, then
using these `20 tokenB` we can get `10 tokenA` from the buy order, earning `2 tokenA`.

> ****
>
> Note that as per current design of bot, there is a check in end to determine whether the bot would loose balance in case it submits the build transaction. This check subtracts for transaction fees, that is, it might happen that bot may loose ADA when submitting the transaction but that would solely be due to transaction fees. If currency is set to ADA, bot may still loose some ADA if the transaction fees is more than found ADA arbitrage.
## Building and running the Smart Order Router

> [!NOTE]
Expand Down Expand Up @@ -394,7 +398,7 @@ Once we compiled and configured the order bot, you can execute the SOR using the

The SOR is equipped with a test suite that employs QuickCheck to perform property-based testing.
By implementing certain properties, we are able to verify various important aspects of the strategies,
like for example, given a matching between sell and buy orders there is always a [positive earning](./geniusyield-orderbot/test/Tests/Prop/Strategies.hs#L167-L177).
like for example, given a matching between sell and buy orders there is always a non-negative earning.
Among others that can be found on [Tests.Prop.Strategies](./geniusyield-orderbot/test/Tests/Prop/Strategies.hs)
module.

Expand Down

0 comments on commit 73ff6f1

Please sign in to comment.