Skip to content

Paxeer Network

FeeFacet API Reference

The FeeFacet handles progressive fee calculation, fee configuration, and protocol fee collection.

Functions

calculateFee

Calculate the progressive fee for a given trade size.

solidity
function calculateFee(bytes32 poolId, uint256 tradeSize) external view returns (uint256 feeBps)

Parameters:

NameTypeDescription
poolIdbytes32The pool identifier
tradeSizeuint256Absolute trade size in token units

Returns: uint256 feeBps - total fee in basis points

setFeeConfig

Update fee configuration for a pool (owner only).

solidity
function setFeeConfig(bytes32 poolId, FeeConfig calldata config) external

Parameters (FeeConfig):

NameTypeDescription
baseFeeuint256Base fee in basis points
maxImpactFeeuint256Maximum impact fee in basis points
lpShareBpsuint256LP share (default: 7000 = 70%)
protocolShareBpsuint256Protocol share (default: 2000 = 20%)
traderShareBpsuint256Trader rebate pool (default: 1000 = 10%)

Shares must sum to 10000 (100%).

collectProtocolFees

Collect accumulated protocol fees.

solidity
function collectProtocolFees(bytes32 poolId, address recipient) 
    external returns (uint256 amount0, uint256 amount1)

getFeeConfig

Get current fee configuration for a pool.

solidity
function getFeeConfig(bytes32 poolId) external view returns (FeeConfig memory)

License

Licensed under the GNU General Public License v3.0--see LICENSE for terms.

Copyright (C) 2026 PaxLabs Inc.
SPDX-License-Identifier: GPL-3.0-only

Contact & Resources

ResourceLink
Protocol Documentationdocs.hyperpaxeer.com
Block Explorerpaxscan.paxeer.app
Sidiora Exchangeapp.hyperpaxeer.com
Websitepaxeer.app
Twitter/X@paxeer_app
General Inquiriesinfopaxeer@paxeer.app
Security Reportssecurity@paxeer.app

Released under the GPL-3.0 License.