Stores liquidity assets, handle liquidity manipulations and swaps, supports dynamic fees and farming features.
Interfaces
provide
This message should be sent as forward_payload of jetton-transfer.
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x63ec24ae |
| query_id | uint64 | query id |
| receiver | address | lp tokens owner |
| lock_liquidity? | bool | if true, permanently locks LP tokens upon provision |
| reject_payload | maybe_cell | reject payload for liquidity provision. Sender recieves it with tokens refund. |
| forward_payload | maybe_cell | forward payload for liquidity provision. Sender recieves it with notify from lp wallet contract. |
provide_single_side
This message should be sent as forward_payload of jetton-transfer.
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x729c04c8 |
| query_id | uint64 | query id |
| receiver | address | lp tokens owner |
| lock_liquidity? | bool | if true, permanently locks LP tokens upon provision |
| reject_payload | maybe_cell | reject payload for liquidity provision. Sender recieves it with tokens refund. |
| forward_payload | maybe_cell | forward payload for liquidity provision. Sender recieves it with notify from lp wallet contract. |
native provide_single_side
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x729c04c8 |
| query_id | uint64 | query id |
| native_amount | coins | amount of nanoton |
| receiver | address | lp tokens owner |
| lock_liquidity? | bool | if true, permanently locks LP tokens upon provision |
| reject_payload | maybe_cell | reject payload for liquidity provision. Sender recieves it with tokens refund. |
| forward_payload | maybe_cell | forward payload for liquidity provision. Sender recieves it with notify from lp wallet contract. |
provide_both
This message should be sent as forward_payload of jetton-transfer.
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xa8904134 |
| query_id | uint64 | query id |
| native_amount | coins | amount of nanoton for liquidity provision. |
| receiver | address | lp tokens owner |
| lock_liquidity? | bool | if true, permanently locks LP tokens upon provision |
| reject_payload | maybe_cell | reject payload for liquidity provision. Sender recieves it with tokens refund. |
| forward_payload | maybe_cell | forward payload for liquidity provision. Sender recieves it with notify from lp wallet contract. |
burn
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xadb8eb49 |
| query_id | uint64 | query id |
| lp_amount | coins | amount of LP tokens to burn |
| owner_address | address | recipient of withdrawn tokens |
| is_account | bool | whether recipient is a trade account |
| additional_data | maybe_cell | optional swap origin or instructions |
| forward_payload | maybe_cell | optional payload forwarded with token refund |
claim_fees
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x983b6933 |
| query_id | uint64 | query id |
deposit_on_account
This message should be sent as forward_payload of jetton-transfer.
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xd8e04bf6 |
| query_id | uint64 | query id |
| user_address | address | address of trade account contract owner. |
| public_key | uint256 | public key of trade account. In most cases should be the public key of owner's wallet. |
| seed | cell | Random data cell. Used for creating trade account in required shard. |
| forward_payload | maybe_cell | forward payload for deposit. Trade account owner recieves it after deposit. |
native deposit_on_account
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xd8e04bf6 |
| query_id | uint64 | query id |
| native_amount | coins | amount of nanoton |
| user_address | address | address of trade account contract owner. |
| public_key | uint256 | public key of trade account. In most cases should be the public key of owner's wallet. |
| seed | cell | Random data cell. Used for creating trade account in required shard. |
| forward_payload | maybe_cell | forward payload for deposit. Trade account owner recieves it after deposit. |
direct_deposit_on_account
This message should be sent as forward_payload of jetton-transfer.
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x4b58a6c7 |
| query_id | uint64 | query id |
| trade_account_address | address | trade account address to deposit in |
| forward_payload | maybe_cell | forward payload for deposit. Trade account owner recieves it after deposit. |
native direct_deposit_on_account
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x4b58a6c7 |
| query_id | uint64 | query id |
| native_amount | coins | amount of nanoton |
| trade_account_address | address | trade account address to deposit in |
| forward_payload | maybe_cell | forward payload for deposit. Trade account owner recieves it after deposit. |
swap
This message should be sent as forward_payload of jetton-transfer.
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xdd79732c |
| query_id | uint64 | query id |
| to_address | address | reciever address |
| slippage | coins | minimum amount of token out (normal slippage) |
| from_address | address | user address |
| exact_out | coins | exact out of tokens to recieve from swap. 0 if no exact_out present. |
| additional_data @ maybe | ref_addr | address | address who will receive ref fee |
| additional_data @ maybe | ref_fee | uint16 | referral fee rate. Number between 0 and 10000, where 10000 is 100% fee. |
| reject_payload | maybe_cell | reject payload for swap. Sender recieves it with tokens refund. |
| forward_payload | maybe_cell | forward payload for swap. Sender recieves it with swapped tokens. |
native swap
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xdd79732c |
| query_id | uint64 | query id |
| native_amount | coins | amount of nanoton |
| to_address | address | reciever address |
| slippage | coins | minimum amount of token out (normal slippage) |
| from_address | address | user address |
| exact_out | coins | exact out of tokens to recieve from swap. 0 if no exact_out present. |
| additional_data @ maybe | ref_addr | address | address who will receive ref fee |
| additional_data @ maybe | ref_fee | uint16 | referral fee rate. Number between 0 and 10000, where 10000 is 100% fee. |
| reject_payload | maybe_cell | reject payload for swap. Sender recieves it with tokens refund. |
| forward_payload | maybe_cell | forward payload for swap. Sender recieves it with swapped tokens. |
start_farming
This message should be sent as forward_payload of jetton-transfer.
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xbe761948 |
| query_id | uint64 | query id |
| farming_x_per_second | coins | reward rate of token x |
| farming_y_per_second | coins | reward rate of token y |
| previous_call | uint64 | timestamp of last farming tick |
| end_of_farming | uint64 | timestamp when farming ends |
| farming_per_second | coins | farming reward rate per second |
native start_farming
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xbe761948 |
| query_id | uint64 | query id |
| native_amount | coins | amount of nanoton |
| farming_x_per_second | coins | reward rate of token x |
| farming_y_per_second | coins | reward rate of token y |
| previous_call | uint64 | timestamp of last farming tick |
| end_of_farming | uint64 | timestamp when farming ends |
| farming_per_second | coins | farming reward rate per second |
lp_account_provide
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x64db1349 |
| query_id | uint64 | query id |
| user_address | address | lp account's owner. |
| amount_x | coins | amount of first asset to deposit on lp account. |
| amount_y | coins | amount of second asset to deposit on lp account. |
| lock_liquidity? | bool | if true, locks LP tokens upon provision |
| refund_addr | address | whom refund tokens to |
| reject_payload | maybe_cell | None |
| forward_payload | maybe_cell | None |
lp_account_refund
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x10d674d7 |
| query_id | uint64 | query id |
| amount_x | coins | amount of first asset to withdraw from user's lp account. |
| amount_y | coins | amount of second asset to withdraw from user's lp account. |
| user_address | address | address for calculating lp account's address. |
| forward_payload | maybe_cell | None |
provide_from_account
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x4409db64 |
| query_id | uint64 | query id |
| user_address | address | address of trade account contract owner. |
| seed | cell | Random data cell. Used for creating trade account in required shard. |
| amount_x | coins | amount of first asset to deposit. |
| amount_y | coins | amount of second asset to deposit. |
| lock_liquidity? | bool | if true, locks LP tokens upon provision |
| reject_payload | maybe_cell | reject payload for liquidity provision. Sender recieves it with tokens refund. |
| forward_payload | maybe_cell | forward payload for liquidity provision. Sender recieves it with notify from lp wallet contract. |
swap_from_account
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xf4a31e27 |
| query_id | uint64 | query id |
| user_address | address | trade account owner's address |
| seed | cell | Random data cell for account identification |
| amount | coins | amount of native sent |
| is_x | bool | indicates asset direction (what starts swap, token X or token Y) |
| slippage | coins | minimum amount of token out |
| exact_out | coins | exact out of tokens to recieve from swap. 0 if no exact_out present. |
| reject_payload | maybe_cell | None |
| forward_payload | maybe_cell | None |
withdraw_from_account
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x9aa06552 |
| query_id | uint64 | query id |
| user_address | address | trade account owner |
| seed | cell | account seed |
| receiver_address | address | recipient address |
| amount_x | coins | first token to withdraw |
| amount_y | coins | second token to withdraw |
| forward_payload | maybe_cell | forward payload for withdraw. receiver_address receives it with assets from pool. |
lock
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x7f656d43 |
| query_id | uint64 | query id |
unlock
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x7bed2e64 |
| query_id | uint64 | query id |
collect_protocol_fees
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x144ad586 |
| query_id | uint64 | query id |
set_fees
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xfa94cd2f |
| query_id | uint64 | query id |
update_trade_account_code
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0x3967b023 |
| query_id | uint64 | query id |
change_farming_duration
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xa957dd3d |
| query_id | uint64 | query id |
update_all_codes
| Path | Mnemonic | Type | Description |
|---|
| op | uint32 | 0xdb55ccd0 |
| query_id | uint64 | query id |
Get-methods
get_protocol_fees
Collected protocol fees on pool.
Return
| Path | Mnemonic | Type | Description |
|---|
| collected_token_x_protocol_fee | number | None |
| collected_token_y_protocol_fee | number | None |
get_pool_info
Return
| Path | Mnemonic | Type | Description |
|---|
| token_x_address | address | token x jetton wallet |
| token_y_address | address | token y jetton wallet |
| lp_fee | number | lp fee in pool |
get_lp_account_address
| Path | Mnemonic | Type | Description |
|---|
| user_address | address | None |
Return
| Path | Mnemonic | Type | Description |
|---|
| lp_account_address | address | None |
get_wallet_address
| Path | Mnemonic | Type | Description |
|---|
| user_address | address | None |
Return
| Path | Mnemonic | Type | Description |
|---|
| lp_wallet_address | address | None |
get_trade_account_address
| Path | Mnemonic | Type | Description |
|---|
| user_address | address | None |
| seed | slice | None |
Return
| Path | Mnemonic | Type | Description |
|---|
| trade_account_address | address | None |
get_pool_tokens
Addresses of pool's jetton wallets.
Return
| Path | Mnemonic | Type | Description |
|---|
| pool_token_x_address | address | token x jetton wallet |
| pool_token_y_address | address | token y jetton wallet |
get_admin_address
Return
| Path | Mnemonic | Type | Description |
|---|
| admin_address | address | admin of pool |
get_tvl
Return
| Path | Mnemonic | Type | Description |
|---|
| token_x_amount | number | amount of token x in pool |
| token_y_amount | number | amount of token y in pool |
get_liquidity_info
Return
| Path | Mnemonic | Type | Description |
|---|
| liquidity_token1_amount | number | None |
| liquidity_token2_amount | number | None |
| virtual_x_amount | number | None |
| virtual_y_amount | number | None |
| total_supply_lp | number | total supply of LP tokens |
| locked_lp | number | supply of locked LP tokens |
get_get_dynamic_fee_by_timestamp
| Path | Mnemonic | Type | Description |
|---|
| timestamp | number | None |
Return
| Path | Mnemonic | Type | Description |
|---|
| dynamic_fee | number | actualized dynamic fee |
get_status
Return
| Path | Mnemonic | Type | Description |
|---|
| status | number | init status of pool |
get_fees_info
Return
| Path | Mnemonic | Type | Description |
|---|
| dynamic_fee | number | current dynamic fee |
| dynamic_fee_factor | number | factor used for fee calculation |
| previous_time | number | timestamp of last fee update |
| time_filter | number | duration window for activity |
| time_decay | number | decay rate for fee over time |
| protocol_fee_reduction_factor | number | reduction factor for protocol fee, used in dynamic fee calculation |
get_farming_info
Return
| Path | Mnemonic | Type | Description |
|---|
| farming_x_per_second | number | reward rate of token x |
| farming_y_per_second | number | reward rate of token y |
| previous_call | number | timestamp of last farming tick |
| end_of_farming | number | timestamp when farming ends |
get_expected_swap_result
| Path | Mnemonic | Type | Description |
|---|
| amount | number | None |
| token_wallet | address | None |
| has_ref | number | None |
Return
| Path | Mnemonic | Type | Description |
|---|
| out | number | None |
| lp_fee_in | number | None |
| protocol_fee_in | number | None |
| ref_fee_in | number | None |
| liquidity_token1_amount | number | None |
| liquidity_token2_amount | number | None |
get_collected_fees_info
Return
| Path | Mnemonic | Type | Description |
|---|
| fees_per_lp_x | number | None |
| fees_per_lp_y | number | None |
get_storage
Return
| Path | Mnemonic | Type | Description |
|---|
| storage | cell | full current storage of the contract. |
get_whoami
Return
| Path | Mnemonic | Type | Description |
|---|
| pool_type | slice | None |