Internally, each STONfi pool tracks liquidity providers through a share based accounting model. When a user adds liquidity, the contract calculates how many shares correspond to their contribution, taking into account the current pool size and composition.


These shares represent a fraction of the pool’s total reserves. As swaps happen, fees accumulate inside the pool and change the absolute balances of both assets. The number of shares held by each provider stays the same, but the value behind each share increases with the pool’s total reserves. When a provider withdraws, the contract uses their share ratio to compute the amount of each asset they receive.
This model allows STONfi to keep all fee accounting on chain and fully deterministic. There is no need for separate reward ledgers or off chain balance calculations. Every change in pool composition is reflected immediately in share value, and integrators using the STONfi SDK can read these values directly from the contracts. $TON $DOGS
TON-1.5%
DOGS-6.21%
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pinned