osmosis-labs / osmosis

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

feat: single remove cl position and sfs new position msg #7095

Open czarcas7ic opened 9 months ago

czarcas7ic commented 9 months ago

Background

Right now if a user wants to make a full range CL position a sfs position, the frontend does a multi message to remove the cl position, then calls the create full range position and sfs stake message. The problem is, the frontend can't know what the slippage will be on the position removal. Its usually small on the order of 1 unit, but we can't assume, and if we do then its possible the user will be left with one unit of an asset which is anoyying.

Suggested Design

Create a message that calls both of these messages in one. It uses whatever the output of the position removal as the position creation.

Acceptance Criteria

Message created and tested on localosmosis.

MuhtasimTanmoy commented 9 months ago

Can we have a high-level design based on the current architecture?