osmosis-labs / osmosis

The AMM Laboratory
https://app.osmosis.zone
Apache License 2.0
889 stars 590 forks source link

refactor: consider multiple emission rates per incentive records #5531

Open p0mvn opened 1 year ago

p0mvn commented 1 year ago

There is one optimization that I'm thinking about.

Currently, we create an incentive record for every coin in gauge.

Instead, we could have one incentive record for all coins in gauge if we were to introduce multiple emission rates per incentive record.

I will make an issue to track this. Don't think this is launch blocking though

_Originally posted by @p0mvn in https://github.com/osmosis-labs/osmosis/pull/5496#discussion_r1230397721_

AlpinYukseloglu commented 1 year ago

This could be a worthwhile change to add now that incentive records are uniquely created by gauges & thus we expect most record fields to be identical.

Given that the gain is marginal at best though, I'm assuming we wouldn't be adding this for v16 (which I guess would make it difficult to add in the future without a state migration :/)

p0mvn commented 1 year ago

Yeah that's how I see this change as well. Would be valuable to have but don't want to risk it at this stage. We can revisit once we're stable with all of the other fronts