Fee Calculation and Limits
The fees applied in the system are not limited and may exceed 100%. It is important to document and inform users about the fee amounts and limits to avoid transaction failures and unexpected outcomes.
Scenario 1: Standard Fee and Royalty Fee (Non-Privileged Collection)
Standard Service Fee: 2%
Royalty Fee: 5%
Treasury Percentage: 0
Example:
User buys an NFT for 100 tokens.
Standard Service Fee (2%) is deducted: 100 - 2 = 98 tokens.
Royalty Fee (5%) is deducted: 98 - 5 = 93 tokens sent to the seller.
The contract has 2 tokens remaining from the operation.
Scenario 2: Standard Fee, Royalty Fee, and Treasury Fee (Non-Privileged Collection)
Standard Service Fee: 2%
Royalty Fee: 5%
Treasury Percentage: 30,000
Example:
User buys an NFT for 100 tokens.
Standard Service Fee (2%) is deducted: 100 - 2 = 98 tokens.
Royalty Fee (5%) is deducted: 98 - 5 = 93 tokens sent to the seller.
Treasury Fee is calculated: 30,000 * 2 / 10,000 = 6 tokens.
After sending tokens to the treasury, the contract has 89 tokens remaining.
The transaction is reverted due to insufficient balance in the contract.
Scenario 3: Standard Fee, Royalty Fee, Treasury Fee, and Privileged Collection
Standard Service Fee: 2%
Royalty Fee: 5%
Treasury Percentage: 30,000
Privileged Collection Value: 30,000
Example:
User buys an NFT for 100 tokens.
Standard Service Fee (2%) is deducted: 100 - 2 = 98 tokens.
Royalty Fee (5%) is deducted: 98 - 5 = 93 tokens sent to the seller.
Treasury Fee is calculated: 30,000 * 2 / 10,000 = 60 tokens.
After sending tokens to the treasury, the contract has 89 tokens remaining.
The new Fee is calculated: 200 * 30,000 / 10,000 = 600 tokens.
Privileged Service Fee is 6 tokens.
Treasury Fee Percentage is calculated: 30,000 * 600 / 10,000 = 1,800 tokens.
18 tokens are sent to the treasury, and the contract balance is reduced to 77 tokens.
The transaction is reverted due to insufficient balance in the contract.
It is recommended to limit the maximum fees paid during transfers and document them clearly. It is also important to thoroughly check the fee calculations to prevent transaction failures and ensure a proper balance of funds.
Last updated