Auto-Range automates the process of rebalancing your liquidity positions. When the token price moves and your position goes out-of-range by your selected percentage, Auto-Range springs into action. The system then automatically rebalances your position, by withdrawing the liquidity and recreating it with the same range width but centered around the current price, ensuring your liquidity stays in-range and collecting fees always.
During auto-range swaps, the contract cross-verifies with the pool's TWAP oracle to prevent potential price manipulation. While setting up an auto-exit position, you choose a maximum price impact for swaps. This determines the permissible deviation between the pool price at the time of execution and the actual swap price, accounting for the pool fee, swap price impact and possible slippage.
Revert bots perform swaps sourcing liquidity from the 0x protocol, considering the max price impact as the swap execution threshold. All swaps can be confirmed on-chain, with 0x ensuring optimal pricing and providing slippage protection when available.
When swaps are executed on auto-exit operations, the contract runs a check against the pool TWAP oracle to avoid price manipulations of the pool.
Given the fact, that swaps are executed via 0x as a swap aggregator and many other swaps may happen at the same time, it is impossible to calculate a swap which results in the exact proportion of tokens to be added to the new position. This may lead to a few left-over tokens after minting the new position. These will be sent to the position owner in the same transaction.
The operator (bots) are incentivized to maximize the capital added, because their gets their fees are calculated from the tokens added to the new position.