Function cyclos_core::_update_position
source · [−]pub fn _update_position<'info>(
liquidity_delta: i64,
pool_state: &PoolState,
last_observation_state: &ObservationState,
position_state: &AccountLoader<'info, PositionState>,
tick_lower_state: &AccountLoader<'info, TickState>,
tick_upper_state: &AccountLoader<'info, TickState>,
bitmap_lower: &AccountLoader<'info, TickBitmapState>,
bitmap_upper: &AccountLoader<'info, TickBitmapState>
) -> Result<()>Expand description
Updates a position with the given liquidity delta
Arguments
pool_state- Current pool stateposition_state- Effect change to this positiontick_lower_state- Program account for the lower tick boundarytick_upper_state- Program account for the upper tick boundarybitmap_lower- Bitmap account for the lower tickbitmap_upper- Bitmap account for the upper tick, if it is different frombitmap_lowerlamport_destination- Destination account for freed lamports when a tick state is un-initializedliquidity_delta- The change in liquidity. Can be 0 to perform a poke.