Skip to content

Optimize rebalance by reducing token transfers #306

@saucepoint

Description

@saucepoint

for future iterations --

when Doppler is moving liquidity slugs, we call _clearPositions which closes the liquidity slugs and withdraws tokens, then _update creates new slugs and transfers tokens back to PoolManager


With flash accounting, we should be able to leave outstanding deltas -- token credits (from _clearPositions) can be used towards _update

this should might save 120k gas -- 30k gas per token transfer (2x withdraws and 2x "redeposits")

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨ improvementCode optimization or better readability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions