Skip to content

@gala-chain/chaincodeAPI


API > setProtocolFee

Function: setProtocolFee()

setProtocolFee(ctx, dto): Promise\<SetProtocolFeeResDto>

Parameters

ctx: GalaChainContext

GalaChainContext – The execution context providing access to the GalaChain environment.

dto: SetProtocolFeeDto

SetProtocolFeeDto – A data transfer object containing: - Pool identifier – The specific pool where the protocol fee is being updated. - fee value – The new protocol fee percentage, ranging from 0 to 1 (0% to 100%).

Returns

New fee for the pool

Dev

The setProtocolFee function updates the default protocol fee percentage for all Decentralized exchange pool that will be created from this point on within the GalaChain ecosystem.

Source

chaincode/src/dex/setProtocolFee.ts:38