gnosis / prediction-market-agent-tooling

Tools to benchmark, deploy and monitor prediction market agents.
GNU Lesser General Public License v3.0
7 stars 0 forks source link

Re-work betting strategy code to work with `DeployableAgent.calculate_bet_amount` #104

Open evangriffiths opened 3 months ago

evangriffiths commented 3 months ago

See betting strategies in prediction_market_agent_tooling/tools/betting_strategies/

These currently contain market-specific code. They should be refactored such that we could add a 'betting strategy' enum which could be passed to DeployableAgent.calculate_bet_amount, to get a bet amount for any betting strategy and any market type.

Currently this is hard-coded to return market.get_tiny_bet_amount().

kongzii commented 3 months ago

But because calculate_bet_amount is just a method of class that needs to be subclassed, it's easy to change the strategy, for example in EVO:

Screenshot by Dropbox Capture

If we introduce enum, it will be easy to switch between built-in strategies, but not so easy to introduce new, experimental ones in agent itself.

Just something to keep in mind while implementing this, would be nice to have best of both worlds.