Skip to content

Make PAYMENT_FEE_BPS configurable #128

@SarveshLimaye

Description

@SarveshLimaye

Currently, the PAYMENT_FEE_BPS is defined as a constant here

uint256 public constant PAYMENT_FEE_BPS = 10;

This hardcodes the payment fee at 0.1% (10 basis points), making it inflexible for future updates. If protocol fees ever need to be adjusted (e.g., increased, decreased, or set to 0), this constant would require a contract upgrade.

Suggested Solution:

Add an onlyOwner function to allow secure updates to the fee:

function setPaymentFeeBps(uint256 newFeeBps) external onlyOwner {
    require(newFeeBps <= COMMISSION_MAX_BPS, "Fee too high");
    paymentFeeBps = newFeeBps;
}

If this sounds useful, I’d be happy to contribute a PR for it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🐱 Todo

Status

🐱 Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions