All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed
addLiquidityByStrategy
incorrect array bin indices calculation
- Fixed
quoteCreatePosition
incorrect result if bin range too short
- Removed
removeLiquiditySingleSide
- new method
createEmptyPosition
allows to create an empty position with the corresponding bin arrays.
- fix
getPairPubkeyIfExists
return type
removeLiquiditySingleSide
. Add in unwrap sol in post instructions
isSwapDisabled
checked against wrong field
- Removed
swapInitiator
parameter fromswapQuoteExactOut
andswapQuote
.
isSwapDisabled
to check whether the pool allow swap
swapQuoteExactOut
andswapQuote
require an additionalswapInitiator
parameter.swapInitiator
is the address of the user who will initiate the swap transaction.
- Pool supports 2 modes now defined by
activation_type
. Ifactivation_type == 0
, activation is calculated based on slot. Ifactivation_type == 1
, activation is calculated based on timestamp.
- Pool state added a new field
activation_type
- Rename
pool.activation_slot
topool.activation_point
- Rename
pool.pre_activation_slot_duration
topool.pre_activation_duration
- Rename
pool.lock_duration_in_slot
topool.lock_duration
- Rename
position.lock_release_slot
toposition.lock_release_point
- The activation condition for all endpoints will by validated by slot or timestamp based on
activation_type
in pool state - All program endpoints to modify permissioned pool will migrate parameters with post_fix
_slot
to_point
- Rename endpoint
set_activation_slot
toset_activation_point
- Rename endpoint
set_pre_activation_slot_duration
toset_pre_activation_duration
- Rename endpoint
set_lock_release_slot
toset_lock_release_point
- Endpoint
initialize_permission_lb_pair
requires a new fieldactivation_type
in input parameters
update_fee_owner
endpoint is removed
quote_exact_out
andquote_exact_in
throw error when pool is disabled, or not activated for swap yet.
quote_exact_out
andquote_exact_in
require a new fieldcurrent_slot
in input parameters
update_fee_owner
command is removed
- Rename command
set_activation_slot
toset_activation_point
- Rename command
set_pre_activation_slot_duration
toset_pre_activation_duration
- Command
initialize_permission_lb_pair
require newactivation_type
parameter
swapQuoteExactOut
andswapQuote
throw error when pool is disabled, or not activated for swap yet.
- Renamed
setActivationSlot
tosetActivationPoint
createPermissionLbPair
require newActivationType
parameter
getAmountOutWithdrawSingleSide
. Ensured the correct withdrawal amount is returned
removeLiquiditySingleSide
. Withdraw only 1 token in the pair for the positiongetWithdrawSingleSideAmount
. Calculates the total single-sided withdrawable amount
- extra field (
endPrice
) in swapQuote
getBinArraysRequiredByPositionRange
. Retrieves the bin arrays required to initialize multiple positions in continuous range.initializeBinArrays
. Initializes bin arrays for the given bin array indexes if it wasn't initialized.
- Support partial fill in
swapQuote
function
- Improve the
claimAllRewards
method with a more distinct filtering for claiming non empty swap fees and lm rewards per each kind. - Filter positions with non zero LM rewards in the
claimAllLMRewards
method. - Filter positions with non zero swap fees in the
claimAllSwapFee
method.
- Exclude positions without any fees and/or rewards from reward claims in the
claimAllRewards
method.
swapQuoteExactOut
for swap quote of program endpointswap_exact_out
.swapExactOut
to create transaction to swap using program endpointswap_exact_out
.swapWithPriceImpact
to create transaction to swap using program endpointswap_with_price_impact
.
- Renamed
swapQuoteAtBin
function toswapExactInQuoteAtBin
- Program endpoint
swap_exact_out
. It will consume the in amount until the exact out amount reached. - Program endpoint
swap_with_price_impact
. Similar to minimum amount out (slippage), but in price impact form.
quote_exact_out
for swap quote of program endpointswap_exact_out
.
- Renamed return type of
swap_exact_in
function,SwapQuote
toSwapExactInQuote
- improve
getAllLbPairPositionsByUser
on some promise to run in parallel
- fix
addLiquidityByStrategy
not working when active bin is not within the liquidity
- Swap exact in quote
getEmissionRate
should not return ended reward, which can be read fromrewardDurationEnd
- update static function to support param program id
- Staging program id
swapQuote
not working on pool with bitmap extension when in token is tokenX
swapQuote
not working on pool with bitmap extension
getMaxPriceInBinArrays
to get the max price of a bin that has liquidity
- Introduces
pre_activation_swap_address
and pre_activation_slot_durationpre_activation_slot_duration
fields.
swap_cap_amount
andswap_cap_deactivate_slot
fields.
- Reduced whitelisted_wallet from the size of 2 to 1. This break the
update_whitelisted_wallet
endpoint.
getTokensMintFromPoolAddress
helper function to get tokenX mint & tokenY mint from lb pair address
initializePositionByOperator
function allow operator to initialize positio for other user
withdrawLiquidity
error when close position due to rent receiver must be position owner
getPairPubkeyIfExists
function to get the public key of existing pool address, if the pool doesn't exists return null
- Support liquidity seeding for launch pool (permission pair) based on https://ilm.jup.ag/
findSwappableMinMaxBinId
returned invalid min/max bin id under some edge casederivePosition
using invalid seed
- Add deposit single sided with exact amount endpoint
- Support creation of permissionless pair with same binstep but a different fee tier.
derive_lb_pair_pda
no longer in use. Usederive_lb_pair_pda2
for new pair PDA.derive_preset_parameter_pda
no longer in use. Usederive_preset_parameter_pda2
for new pair PDA.
- Initialization of
LbPair
PDA requirebase_factor
as the fourth seed now. This breakInitializeLbPair
account context. - Initialization of
PresetParameter
PDA requirebase_factor
as the third seed now. This breakInitializePresetParameter
account context.
- Support creation of permissionless pair with same binstep, different fee tier.
deriveLbPair
no longer in use. UsederiveLbPair2
for new pair PDA.derivePresetParameter
no longer in use. UsederivePresetParameter2
for new preset parameter PDA.
- Fix position liquidity withdraw to position owner, instead of customized fee owner
- A new function to sync outdated pool to nearest market price bin
- Fix create permission lb pair browser compatibility
- Fix position quotation calculation for bin array creation.
- Fix position quotation calculation for position count.