-
Notifications
You must be signed in to change notification settings - Fork 263
Conversation
This function is taken care of by allowedSpend now
Fixes an issue with the provider having negative allow spend amount. Changes asset to price dynamic adjustment to be more aggressive. Ensures that levels are always placed, with amounts approaching zero.
@Reidmcc the strategy in this PR seems more targeted. It may be better to keep it in your own fork for now. I will be adding better support for custom, pluggable, and shareable strategies hopefully by end of year. These will be run in a REST wrapper that Kelp can interact with, similar to how we interact with CCXT via the ccxt-rest process. I’m thinking of the best way to share these strategies that are created by the community with the community (reddit, keybase, slack, website, registry file in the kelp repo, etc.). If you have any suggestions please let me know. Maybe your strategy can be the first one? The sdex price feed seems generalizable — could you include that in the list of price feeds by extending the current set of tags (crypto, fixed, exchange, etc.) to include one called “sdex”? The URL format can be like ”code1:issuer1/code2:issuer2” where we can leave an empty issuer for XLM markets: ”XLM:/BTC:GA....END”. |
@nikhilsaraf Ok, I'll add SDEX to the price feeds. As for sharing community strategies, my first thought is a separate Github repo, something like kelp-codeshare, which could be managed by a group of community maintainers, while keeping the core code clean and in your custody. Kelp strategies are, at least for now, fairly involved code, and Github is great for community development projects. Strategies could be added by PRs, which would let maintainers help authors QC their code, and avoid having a bunch of buggy strategies floating around among working strategies. I'd be happy to post mine to get whatever sharing format started, and help maintain a repo if we went that route. It would probably be good to have a more interactive space too, like Slack, since Github isn't great for talking. |
@nikhilsaraf I'm having trouble getting the SDEX feed integrated with the existing I'd just have Alternately we could implement this as a separate SDEX tracking strategy, with the buysell logic instead of the custom logic I have in this pull request. |
Closing this; the code is too old to merge reasonably and the custom strategy stuff isn't going in. A clean sdex price feed PR is at #90 |
Strategy description
This strategy allows Kelp to track the SDEX orderbook price as the midpoint for setting levels, and allows the user to manually set the amount per level. It dynamically adjusts level amount to maintain asset balance close to value parity.
The strategy assumes that the SDEX price is correct and is thus is most appropriate for native SDEX tokens.
I'll write up a walkthrough and add to the README once the code is finalized.
New files
The added files follow the convention of the existing strategies:
Modifications to existing files
Functions necessary to enable the strategy were added to two files:
Added the strategy's StrategyContainer to factory.go
Added a function to pull SDEX orderbooks to functions.go