Jump to content

Inconsistent behavior of DEX algorithms


Recommended Posts

I created two test tokens FMU and USD (my own version). The market is there to buy and sell FMUs in return for USDs.

i created two test cases in first case:

10 FMUs being sold by the FMU seller in return for 2300 USD on testnet

FMU buyer creates the counter offer to buy 10 FMUs for 2300 USD.

it doesn't get automatically fulfilled

https://test.bithomp.com/explorer/CB17EC745F50EB4EA17FA28B36C041C808A4132F85756533830D63DD3B12658D
https://test.bithomp.com/explorer/A1A9AAF1797E47CE60B3E2DC1E43DE38B5B0993A90E85AC03F8104F2F7D0B786

in the second case:

10 FMUs being sold by the FMU seller in return for 0.5 USD on testnet

FMU buyer creates the counter offer to buy 10 FMUs for 0.5 USD.

it gets automatically fulfilled
https://blockchainlaboratorys.slack.com/archives/C05JDDC8WH3/p1692898022098739?thread_ts=1692896678.455969&cid=C05JDDC8WH3

 

A bit details about the matching algorithm will be helpful. docs discuss quality and offer matching but this doesn't look consistent.

May be I am missing something.


FMU buyer address: https://test.bithomp.com/explorer/rM2SkripyXiA7n7DpPjJUrkn7NViLjga5b
FMU seller address: https://test.bithomp.com/explorer/rfo5nvHwfKWDRL9EZSHzkjvPVMfGiog3kr

Edited by faisalrahman36
Link to comment
Share on other sites

  • faisalrahman36 changed the title to Inconsistent behavior of DEX algorithms

The offer from the "rfo5" is to buy 2300 USD for 10 FMU,

but the offer from the "rM2S" account is to buy 10 FMU for 2299.960900664689 USD.

 

In other words, the USD buyer is offering a rate of 0.00434782 FMU per USD,

and the USD seller is asking for a rate of 0.00434789 FMU per USD

 

So the offers are slightly mismatched in the wrong direction so will not cross each other.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...