Skip to content

Fees and balances ​

The platform fee is fixed at deployment and stored in basis points.

solidity
uint256 public platformFeeBps;

Maximum:

text
1000 bps = 10%

Calculation ​

solidity
(amount * feeBps) / 10000

For an amount of 1000 and a fee of 250 bps:

text
fee = 25
freelancer payment = 975

Rounding ​

Solidity integer division truncates fractions. A sufficiently small amount can therefore produce a fee of zero.

Balance ledger ​

solidity
mapping(address => mapping(address => uint256)) public userBalances;

The dimensions are:

text
user → token → balance

This prevents one token's balance from being conflated with another.

Documentation grounded in the current ERC-20 escrow implementation.