v1
STON.fi v1 smart contract API reference - technical specs for Router, Pool, and LP contracts
Important: This API reference documents low-level smart contract methods and opcodes. For production applications, we strongly recommend using the official SDK + TonConnect instead of manually compiling BOCs and sending transactions. The SDK provides better developer experience, handles edge cases, and receives official support. Custom BOC compilation should only be used for specialized/advanced use cases.
Overview
The section contains separate documents for each smart contract used in AMM:
Source code of all smart contracts can be found in this Github repo
Note: Protocol fees in DEX v1 are collected in ASK jetton.
Referral Fees
DEX v1 pays the referrer share of a swap fee directly inside the swap transaction. The rate is fixed at 0.1 % and the amount is transferred to the provided referrer_address automatically. See the Omniston referral fees guide (note: although the guide is Omniston-centric, the referenced paragraph specifically covers DEX V1 referral fees).
You can monitor referral payouts using the Stats & Vaults REST API:
- GET /v1/stats/fee_accruals– shows all operations that led to fee accrual for the referrer, filterable by period
- GET /v1/stats/fee_withdrawals– lists all fee withdrawals from the referrer's vaults by period
- GET /v1/stats/fees– returns aggregated referral fee information, such as total accrued USD value, for the selected time frame
The full specification is available in the Swagger UI.
Last updated