You are viewing a single comment's thread from:

RE: Karaka Tutorial #6: foreach saving you time and space

in #engine2 years ago (edited)

The basic ones are:

  • Swap tokens on pools (a more advanced thing could be to check what's worth if swapping or sell/buy on the market and decide based on price)
  • Add and remove liquidity to pairs to the pools (can be based on APR or static rules like you are doing for the rest already)

Most if not all will be in contracts/marketpools.js

Quite more advanced (this will go in the direction of "trading" automation most likely, so not sure if that's your idea):

  • Allow conditions on prices to be made and then either buy/sell or swap, whichever is the "rule" for selling/buying that generates a better deal.
  • Allow (experimental) "predictions" on swapping via multiple jumps between pools (ie. instead of SWAP.HIVE -> WOO, do SWAP.HIVE -> PIZZA -> WOO). There are a lot of pools already, so this becomes interesting sometimes.
  • ALERT "remove liquidity" mode... if certain price changes on the pool (in % of the last check or last few checks), remove % liquidity to avoid losing too much. This could be useful for people that don't want to lose the token when the price crashes on either side of the pair, leading to an undesirable outcome.

You are already doing something within the lines with the Oracles feature... =)

I would be a frequent tester with this one for sure. Pools are quite "better" positioned against the markets in many cases. Meaning that most of the time you get better prices via pools.

Sort:  

Thanks. I'll add all that to my list. I was trying to avoid making a trading bot. I'll see what info I can pull from the pools then, most of what you want can be done with a few pool / liquidity "facts" and some commands to handle liquidity. Might take me awhile though.

Yeah, I figured. No rush on this... I think providing the basic functions (swap, add, remove liquidity) is probably already a huge help for many.

Until we are on the other side of the HF26 without any sorts of things to sort out, any new stuff is just secondary for me. First stability and HA, etc..

Right now I am busy with the HE stuff and Hive, but later would like to see your code better. I feel from the diagonal read that I have something to learn about on those facts collections. Looks nice... Also feels this is going on somewhere nice as a tool. =)