Giter Club home page Giter Club logo

Comments (4)

Reidmcc avatar Reidmcc commented on September 15, 2024

After more detailed examination of the balancedLevelProvider code I think this is probably better accomplished as a new strategy. Since the balanced levels are calculated off held assets every time, a fixed start price wouldn't be considered at all after the first run. So this is more like a modification to the buysell strategy that would track SDEX prices instead of outside prices.

from kelp.

nikhilsaraf avatar nikhilsaraf commented on September 15, 2024

yes, I think your intuition is correct here -- the reason I did not include this as an option in the strategy is that by adding the concept of initial vs. non-initial pricing means you need to maintain state.

Given that Kelp currently does not require a DB (a good thing), this raises some questions [with potential solutions]:

  1. Where to save this boolean state representing whether to use the priceFeed vs. the balance-based pricing mechanism? [manage data on the account?]
  2. How to ensure that the correct asset balance is read when pricing subsequent update cycles of the bot? [save a piece of data on the account that represents a virtual balance that the bot will use which will always be negative?]

With these changes I can see it being useful, but tbh, it would be much simpler to adjust your initial starting balance to match your seed price. This would keep the code simpler and avoid potential bugs both while coding and also while using the strategy -- less moving parts. For this reason, I'm in favor of leaving the strategy as-is.

from kelp.

nikhilsaraf avatar nikhilsaraf commented on September 15, 2024

I can see Kelp having a new command that updates an account's balances for two assets to set it to a price taken from a price feed (can be an SDEX market as input too). Although I think this is also overkill compared to just setting your initial balance correctly.

from kelp.

Reidmcc avatar Reidmcc commented on September 15, 2024

@nikhilsaraf I agree. I'll think about doing something pegged to extant SDEX price as a separate strategy.

from kelp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.