Add param to prevent overpriced ticket purchases
Related issue: #2455 Add param maxticketprice Add the parameter maxticketprice to enable control over halting ticket purchases when ticket prices are excessively high The parameter can be configured in the configuration file with the name: ticketbuyer.maxticketprice If value = 0 (default value): The system will proceed with ticket purchases as it did previously if value < 0: param error if value > 0: The system will cease ticket purchases if the ticket price surpasses the specified threshold
Can anyone review or comment on this for me?
I don't think this feature should exist at all.
If you want more control over what price you are willing to buy tickets at, buy them manually.
See discussion in linked issue.
to further elaborate:
because you implemented this as a config setting, there is no way to change it at runtime without restarting the wallet with a different config.
the ticket price, if stake participation remains a constant percent of the total supply, is expected to gradually increase. it doesn't make sense to put a maximum purchase value into the autobuyer for this reason alone.
if stake participation does increase, then the maximum value you set may prevent you from purchasing when you, in retrospect, would have wanted the purchases to go through.
if stake participation decreases, then any delta over the steady state price that you consider "overpriced" would no longer be relevant, because the overall demand has also dropped.
the autobuyer is dumb on purpose. it exists to "DCA" at any price, high or low. the complexity needed to address all three concerns above is not something we want to maintain.
you have the option to buy manually instead. use it.