protocol_fee_withdrawal.gno
Getter and setter functions for the Withdrawal Fee, the protocol fee charged when a user claims the swap fees earned from providing liquidity by removing liquidity or calling the CollectFee
function. The default value is set to 100 (=1% of total swap fees claimed).
GetWithdrawalFee
func GetWithdrawalFee()
Returns the current rate of the Withdrawal Fee.
Return Values
withdrawalFee
uint64
The current rate of the Withdrawal Fee.
SetWithdrawalFee
func SetPoolCreationFee(
fee uint64
)
Modifies the Withdrawal Fee.
Parameters
fee
uint64
The rate that will be set as the new Withdrawal Fee. (the value should be in bps)
HandleWithdrawalFee
func HandleWithdrawalFee(
positionId uint64,
token0Path string,
amount0 string,
token1Path string,
amount1 string,
poolPath string,
caller std.Address,
) (string, string)
Parameters
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.
caller
string
The caller address from position contract.
Return Values
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.
Last updated
Was this helpful?