bancorprotocol / carbon-app

https://app.carbondefi.xyz
MIT License
23 stars 14 forks source link

Strategy duplicate - expose undercut option for concentrated strategy #1325

Closed ashachaf closed 2 days ago

ashachaf commented 2 weeks ago

current: when you duplicate a strategy: IF strategy is disposable or recurring, display a popup asking if you would like to copy as is or undercut. where undercut update the prices of the strategy by 0.1% closer together.

image
example:
existing strategy is selling tokens at $1500
undercut will set the price to be $1500*0.99% = $1485

updated: add handling for concentrated strategy.

IF strategy is concentrated (using the same check we do for edit prices etc), display the same popup asking to copy as is or undercut where undercut reduce the fee tier (spread) by 0.1%.

example:
existing strategy between usdc/usdt with price range of 0.999 to 1.001 and a spread of 0.01%
undercut will set the price the same (0.999 to 1.001) and update the spread to be 0.01*0.99 = 0.0099%