logo
Image without caption

Mathematics Fee Structure

Every transaction on SuiOS involves a fee paid in SUI. This fee is distributed between liquidity providers and the SuiOS protocol, with the exact proportions determined by the following settings:
  • Buy Fee: The percentage of the transaction value charged when buying tokens.
  • Sell Fee: The percentage of the transaction value charged when selling tokens.
  • Protocol Fee: The portion of the transaction fee allocated to the SuiOS protocol for development and maintenance.
  • Liquidity Provider Fee: The portion of the transaction fee distributed to liquidity providers who contribute to the trading pool.
When a user swaps tokens on SuiOS, a fee is collected in SUI based on the specified buy and sell fees. This fee is then divided between the protocol and the liquidity providers according to the set protocol fee and liquidity provider fee percentages.
SuiOS is committed to transparency and fairness. All fee settings are publicly visible and subject to community governance. This ensures that the fee structure benefits all participants in the ecosystem.

Liquidity Provider Fee Distribution

On SuiOS, liquidity providers earn rewards based on their contributions to the trading pools. The more LP tokens a provider holds, the larger their share of the transaction fees. This ensures a fair and proportional distribution of rewards among all participants. By providing liquidity, you can earn passive income, support the ecosystem, and potentially benefit from price appreciation.

Euler Amounts and Fee Calculation

SuiOS uses a mathematical approach to calculate swap fees, employing a sequence of ascending numbers known as Euler amounts. These amounts are updated with each SUI transfer to the SuiOS pair smart contract.
Mathematically, this update can be represented as:
With the corresponding sequence of rising numbers:
Liquidity providers are represented by a struct that stores their LP holdings and an Euler amount. This Euler amount represents the value at the time the user added liquidity.
javascript
struct Provider { unit256 lp; unit256 euler0; };
The value represents the latest Euler amount when the user adds liquidity. If the user claims rewards later, the latest Euler amount is different.
The reward for a provider is calculated as:
This assumes the LP balance remains constant during the period. If a provider adds or removes liquidity, is updated to prevent reward manipulation. It's best to claim rewards before adjusting LP balance. LP tokens are non-transferable except when burned or added/removed from liquidity.
SuiOS employs a sophisticated mathematical approach to accurately calculate each user's share of swap fees. This ensures fairness and transparency, even as the liquidity pool's total supply of LP tokens fluctuates due to liquidity providers adding or removing liquidity.
The Euler amount calculation mechanism guarantees that each user's reward is proportional to their contribution to the pool, regardless of market conditions. This promotes a sustainable and equitable ecosystem for all participants.