Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: AfterCosmWasmPoolCreated hook to create an internal gauge #6122

Open
Tracked by #5864
p0mvn opened this issue Aug 21, 2023 · 7 comments
Open
Tracked by #5864

feat: AfterCosmWasmPoolCreated hook to create an internal gauge #6122

p0mvn opened this issue Aug 21, 2023 · 7 comments

Comments

@p0mvn
Copy link
Member

p0mvn commented Aug 21, 2023

Background

Currently, we do not have such hook. As a result, cosmwasm pools cannot be internally incentivized. We would have to create a gauge manually for every such pool

Suggested Design

Implement AfterCosmWasmPoolCreated hook that creates one gauge (similar to Classic pool logic)

Acceptance Criteria

  • hook created
  • creates gauge
  • tested
@mattverse
Copy link
Member

@p0mvn You are referring to perpetual gauges correct?

@AlpinYukseloglu
Copy link
Contributor

Floating this up as an important feature to implement for volume-splitting incentives to work with CW pools. We should also not forget to create these internal gauges for existing CW pools (e.g. transmuter) in upgrade handler

@p0mvn
Copy link
Member Author

p0mvn commented Aug 30, 2023

Let's track this here: #5864

@PaddyMc
Copy link
Collaborator

PaddyMc commented Aug 31, 2023

I created a bug report here => #6230

⬆️ maybe the bug can be closed

@p0mvn
Copy link
Member Author

p0mvn commented Sep 21, 2023

Considering two approaches:

  • Lock based approach. In that case, we don't need this distribute_incentives message and instead distribute to locks directly like with balancer. Here, we need the CW pool to mint shares
  • NoLock approach that distributes directly to the pool (like CL) and lets the pool handle the incentives in a custom way. For this we would need a custom distribute_icnentives sudo message that would notify the pool about distribution at epoch. However, this sudo message would just be fire and forget without error checking. If an error occurs, it is silently skipped.

@p0mvn
Copy link
Member Author

p0mvn commented Sep 21, 2023

Tentatively from discussions:

Moving this feature out of upcoming scope until the goals of cw pool incentives are more product-defined

Ref: https://osmosis-network.slack.com/archives/C04LZFBHGQ5/p1695299430819449

Currently, the only cw pool - transmuter does not need incentives.

Some prototyping progress on the NoLock approach: https://github.com/osmosis-labs/osmosis/tree/roman/cw-pool-incentive-progress

@p0mvn p0mvn removed their assignment Sep 21, 2023
@p0mvn
Copy link
Member Author

p0mvn commented Sep 22, 2023

Adding suggestions and context from Boss:

+1 for implementing once there is a need. I reckon 2nd choice is better for customization but I would rather retain from fire and forget and have something similar to dead-letter queue that could manual retry since distributed incentive might become staled assets on the contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage 🔍
Development

No branches or pull requests

4 participants