
Snuggle · Acts onchain
Closes a Snuggle position and pays out everything it holds. The vault unstakes the position from its gauge if it is staked, collects its trading fees and gauge rewards and pays them after the performance fee, then removes all of its liquidity, pays the principal in both of the pool's tokens with no fee, and burns the position. Only the account that holds the position can withdraw it, and not within a minute of the deposit. An exit of a position the wallet holds, which a deposit standing as a program's only write opened, runs as the wallet's own transaction, alone or beside reads; an exit of a position the Plug account holds, which a deposit composed with other writes opened, runs in the account's program and composes with every other step. The position is found when the program runs by the pool it is in and the moment it was deposited, which every rebalance carries over, so an exit signed before the vault re-centers the range still reaches the position after; an id the vault no longer books is refused when the exit is built, as is a position another of its owner's positions shares a pool and a deposit block with. The action returns what each of the pool's tokens paid and what the gauge's reward token paid; a reward token that is one of the pool's tokens is counted once, in that token's amount, and the reward amount is then zero, as it is for a pool with no gauge. Reach for it to exit a range that no longer pays, on a condition when the Plug account holds the position, coiling the amounts received into a swap, a deposit elsewhere, or a repayment in the same run.
On other protocols · 17