[8] buyTwap strategy #522
Description
We have a sellTwap strategy, which uses the compose strategy to set the buy side as empty (delete) and sell side as the sell twap level provider.
We want an equivalent strategy that works on the buy side where buy side is set to the sell twap level provider and sell side is empty (delete). In such situations you will need to adjust the ordering of the base asset and quote asset as is done in the buysell strategy.
This should reuse the sample sellTwap config file. If there are any differences when creating the buy version please highlight in comments. If they are exactly the same we can rename the sample config file to sample_twap.cfg
indicating that it is common for both buy and sell twap strategies.
Here are two useful resources:
- sellTwap strategy file
- buysell strategy file
- sample sellTwap config file
- sample PR on how to create a new trading strategy.
We want to include this in the v1.10.0 release and is a priority over the Kelp GUI rc2.
Testing is a manual process in this case, which is what contributes to 3 of the 5 points allotted to this task
Testing
This should be tested manually on SDEX with a 10-second update interval (trader config) and a 60-second bucket interval (strategy config file).
Please upload the log file here from the test run so I can look at it and ensure the strategy is working correctly (and also for posterity).
Triggering Trades
We want some way of triggering trades against the buyTwap strategy. One way is to create the necessary accounts on SDEX testnet and start consuming the maker orders created by the buytwap manually. You can use the testnet versions of interstellar.exchange or stellarterm for this.