protocol_fee.gno

Getter and setter functions for the Pool Creation Fee, the protocol fee charged when creating a new pool. The default value is set to 100 GNS (=100,000,000 uGNS).

GetPoolCreationFee

Returns the current pool creation fee.

Return Values

Name
Type
Description

poolCreationFee

int64

pool creation fee

SetPoolCreationFee

Modifies the Pool Creation Fee.

Parameters

Name
Type
Description

cur

realm

Pass cross as argument.

fee

int64

The amount of tokens that will be set as the new Pool Creation Fee. (the amount should be in uTokens)

HandleWithdrawalFee

Handles withdrawal protocol fee for a position.

Parameters

Name
Type
Description

cur

realm

Pass cross as argument.

positionId

uint64

The ID of position which being handled to withdrawal protocol fee.

token0Path

string

The path of token0 of the position.

amount0

string

The amount of token0 to calculate withdrawal fee.

token1Path

string

The path of token1 of the position.

amount1

string

The amount of token1 to calculate withdrawal fee.

poolPath

string

The path of pool of the position was minted.

positionCaller

address

The caller address from position contract.

Return Values

Name
Type
Description

amount0

string

The remaining amount of token0 after the protocol fee has been withdrawn.

amount1

string

The remaining amount of token1 after the protocol fee has been withdrawn.

IncreaseObservationCardinalityNext

IncreaseObservationCardinalityNext increases the observation cardinality for a pool.

Parameters

Name
Type
Description

cur

realm

Pass cross as argument.

token0Path

string

path of the first token

token1Path

string

path of the second token

fee

uint32

pool fee tier

cardinalityNext

uint16

new observation cardinality limit

Last updated