Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the fixed 0.00777 min_volume #873

Closed
cipig opened this issue Mar 22, 2021 · 10 comments
Closed

remove the fixed 0.00777 min_volume #873

cipig opened this issue Mar 22, 2021 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@cipig
Copy link
Member

cipig commented Mar 22, 2021

Would be good if the 0.00777 fixed min_volume would be removed from code because it leads to situations like this from VRSC/BCH orderbook:

  "base": "VRSC",
  "bids": [
    {
      "coin": "BCH",
      "price": "0.001341967849711302791983569858186272612300851719483870844800364736125808734408438798418896163405842473",
      "maxvolume": "3.17658248",
      "min_volume": "0.00777",
      "base_max_volume": "2367.1077371066508",
      "base_min_volume": "5.79000458295",
      "rel_max_volume": "3.17658248",
      "rel_min_volume": "0.00777"
    },

0.00777 BCH rel_min_volume results in base_min_volume of 5.79 VRSC (1 VRSC is almost 1$) and there is actually no reason for it on this pair, because the txfees are low on BCH and VRSC.
The other reason for min_volume was the dust on some chains, but this was already fixed by using the real dust settings of the respective coins.

@artemii235 artemii235 added the enhancement New feature or request label Mar 22, 2021
@artemii235
Copy link
Member

Thanks for opening the issue! We will still need some reasonable min_volume because it can't be zero. Should we use 10 x dust for all UTXOs?

The other question is ETH: there is no dust at all for ETH, but we might possibly rely on the current gas price during calculations. However, it would be not clear how to handle the min_volume of ERC20 as we don't always have info about their price in relation to ETH.

Having the 0.00777 is actually simpler than answering the above questions 🙂

@artemii235
Copy link
Member

@tonymorony Could you please advise on this? Maybe you will have a better idea 🙂

@cipig
Copy link
Member Author

cipig commented Mar 24, 2021

We will still need some reasonable min_volume because it can't be zero. Should we use 10 x dust for all UTXOs?

The UTXO coins have the lowest txfees (except BTC), so we could set min_volume to 10 x dust for all UTXO coins and keep the fixed 0.00777 for all other coins/tokens.
A simpler solution (also from GUI perspective, since i believe they use the fixed setting) would be to lower the fixed 0.00777 to a fixed 0.001 or so... at the current price this means a min_volume of 50$ for BTC pairs and 0.50$ for BCH pairs, which sounds reasonable to me.
Or we simply keep the current 0.00777 settings, which is ~435$ for BTC pairs and ~4$ for BCH pairs.

@cipig
Copy link
Member Author

cipig commented Mar 26, 2021

We now have BTC-BEP20 too, which has a low txfee compared to BTC. Would be nice if we could swap < 0.00777 BTC-BEP20. Lowering the fixed 0.00777 to a fixed 0.000777 or even lower would be the easiest solution i guess and it would cover BTC-BEP20 too, which is not a UTXO coin with dust.

@tonymorony
Copy link

tonymorony commented Mar 26, 2021

@tonymorony Could you please advise on this? Maybe you will have a better idea 🙂

the only idea I have (at least so far) is to make a separate min_volume field in the coins file and maintain it manually depends on common sense and market conditions but it potentially can create a bit of mess (e.g. mobile GUI reparse this file so can miss the update and etc.)

@samurai321
Copy link

it's fine as is. obviusly i wish i can trade any amount but we are talking onchain trading.
i sure don't want people spamming 50$ btc trades that are going to cost a 20% or more in fees.
dogecoin is for that.

@cipig
Copy link
Member Author

cipig commented Apr 7, 2021

i sure don't want people spamming 50$ btc trades that are going to cost a 20% or more in fees.

BTC-BEP20 does not have such a high fee and is affected too... all coins with low fee and high USD price

@artemii235
Copy link
Member

@cipig Could you please test changes from the linked PR? 🙂

@cipig
Copy link
Member Author

cipig commented Apr 9, 2021

works fine, i can now swap BUSD-BEP20 to BTC-BEP20 with min_volume 0.05$

artemii235 added a commit that referenced this issue Apr 12, 2021
#873 #849

* Reduce min trading vol in certain cases.
Add RPC call to display it.

* Fix compilation.
@artemii235
Copy link
Member

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants