osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

feat: before swap cosmwasm hooks for CL pools

Open p0mvn opened this issue 1 year ago • 1 comments

Background

Implement hooks for CL pools that call into a cosmwasm contract before every swap.

Should consider if it makes sense to define this at the poolmanager level of abstraction.

This can be implemented by having a parameter of contract addresses controlled by governance. Before every swap, the chain code executes a fire and forget Sudo message to every contract.

The proposal above is up for debate and should be further confirmed with @sunnya97 before starting work on this.

Acceptance Criteria

  • specific design is defined and confirmed
  • before swap CW hooks for CL pools implemented
  • thoroughly tested

p0mvn avatar Oct 16 '23 13:10 p0mvn

Yeah I suppose his actually does make sense at the poolmanager level.

Otoh, we might want to also add hooks for CL for the creating and removing of positions as well, and those will def have to go into the CL module.

sunnya97 avatar Oct 16 '23 18:10 sunnya97