
Imagine offering your users a way to gain rewards on their tokens â all within your app, and doing so with only a few lines of code. No deep blockchain expertise required, no complex infrastructure to build from scratch. It might sound too good to be true, but with STON.fi itâs entirely possible.
STON.fi makes adding liquidity provision (LP) features to your React application both simple and powerful. In this article, weâll explore how STON.fiâs liquidity pools work on TON and how seamlessly you can integrate this functionality. Weâll keep things understandable and friendly (so even non-developers can follow), focusing on the benefits, real-world use cases, and the straightforward steps to get started. By the end, youâll see why enabling STON.fi liquidity in your project could be a game-changer for your users and your appâs growth.
STON.fi Liquidity Pools in a Nutshell
What is STON.fi? In case youâre new, STON.fi is a decentralized exchange built on the TON blockchain. It operates as an AMM DEX, which means it uses liquidity pools instead of order books to facilitate token swaps. Liquidity providers deposit token pairs into these pools, thus enabling smooth trading for everyone and in return they earn a share of the trading fees. STON.fi stands out for its user-friendly design and technical prowess â the platform boasts nearly zero extra fees and low slippage trades, plus seamless integration with popular TON wallets.
Why TON? The Open Network blockchain offers serious performance and scalability under the hood. TONâs sharded architecture can handle millions of transactions per second in theory, so apps built on TON donât need to worry about hitting throughput limits as they grow. Transactions confirm quickly and cost a tiny fraction of a cent in fees â effectively removing cost barriers. This high throughput and low-cost environment makes features like real-time token swaps and liquidity provision viable even for a large user base. TON also has a growing community (boosted by its origins with Telegramâs 1B+ user base) which means new integrations can tap into an enthusiastic pool of users and ecosystem partners. In short, STON.fi on TON combines performance with a massive audience and virtually zero network fees â ideal conditions for DeFi functionality in your app.
How does liquidity provision work? Liquidity provision is the engine behind AMM DEXs. When a user provides liquidity on STON.fi, they deposit two assets into a pool (for example, depositing TON and USDT into the TON/USDT pool). These funds then become available for traders swapping those tokens. Whenever someone makes a swap using that pool, a small trading fee is charged â on STON.fi itâs typically 0.3% per trade: 0.2% goes to liquidity providers and 0.1% to the protocol. This means liquidity providers (LPs) gain rewards from every trade happening in the pool, proportional to their share of the poolâs liquidity. Over time, those fees can add up to a meaningful amount (often displayed as an APR on the pool).Â
Liquidity providers receive LP tokens representing their stake in the pool, and they can withdraw their portion of the pool (plus accrued fees) at any time. Essentially, STON.fi turns your users into mini market-makers â they put in assets and earn rewards when others trade. Itâs DeFiâs way of letting anyone âbe the house,â and itâs a key pillar of how decentralized exchanges achieve continuous liquidity .
Now that we know the basics, why should you consider adding this feature to your React application? Letâs talk about the value it brings.
Why Let Users Provide Liquidity in Your App?
Whether youâre a wallet developer, a DeFi project founder, or building any token-based app, integrating STON.fiâs liquidity provision can add significant value. Here are some of the biggest benefits:
- Background value flow for users. By offering liquidity provision, you give your users a chance to gain rewards on their idle tokens without leaving your app. Instead of just holding TON or jettons, they can deploy them in a pool and collect fees from each swap.Â
- Deeper user engagement & retention. When users provide liquidity through your app, they become stakeholders in the ecosystem â they have skin in the game. This tends to make users more loyal and more active. They might open your app more often to track their pooled assets, collect rewards, or add more liquidity.Â
- Easy integration, minimal development. The STON.fi team provides an official SDK and API that handle all the heavy lifting for you â from fetching pool info and simulating outcomes, to constructing the actual transactions for adding liquidity. In practice, youâll install the @ston-fi/sdk and @ston-fi/api libraries, drop in a few function calls, and youâre nearly there.Â
- Seamless TON Wallet support. If your app uses Tonkeeper, Tonwallet, or any TON Connect-compatible wallet, integrating STON.fi means your users can confirm liquidity transactions through the wallet they already trust. Thereâs no need for them to create new accounts or handle private keys beyond what they already use. Native wallet support also means you donât have to implement custom signing or security logic â the standard TON Connect flow handles it safely.
- Low fees & high performance. Your users wonât be scared off by high costs when adding or removing liquidity â even small liquidity providers can participate without worrying about fees eating all their gains. High throughput ensures transactions (like adding liquidity or claiming LP rewards) execute quickly, which is critical for user satisfaction. Scalability is also a non-issue; whether you have 100 users or 100,000 users providing liquidity, you wonât hit a performance wall.
- Access to the TON DeFi ecosystem. By integrating STON.fiâs LP functionality, your project immediately plugs into the broader TON DeFi ecosystem. Users who are already active in TON DeFi will see your app supports the same pools and tokens they know, and it can open doors for partnerships. Other TON projects or might promote your app as a way for their community to provide liquidity easily.Â
- No need to reinvent the wheel. Your team can focus on your core product â whether itâs a game, a wallet or a lending platform â rather than diverting months of dev time into creating and auditing a custom DEX. STON.fi continually updates its protocol, and your integration benefits from those improvements automatically.
How to Integrate STON.fi Liquidity â A High-Level Guide
You can break down the integration into a few straightforward steps. Hereâs a code-free overview of the process:
- Install the STON.fi SDK and API packages. First, add the official SDK (@ston-fi/sdk) and API (@ston-fi/api) to your project using npm, yarn, or pnpm. These libraries are your gateway to interacting with STON.fi. The SDK will let your app construct and send liquidity provision transactions, while the API provides helpful data endpoints (like fetching token lists, pool info, and simulating actions).
- Connect a TON Wallet (TonConnect). To actually perform on-chain operations, your users need to connect their TON wallet to your app. STON.fi integration works seamlessly with the TON Connect standard, which supports popular wallets like Tonkeeper. You can use the @tonconnect/ui-react package (or similar) to quickly add a wallet connect button/component to your appâs UI. When a user clicks âConnect Wallet,â theyâll link their TON wallet via a QR code or deep link, establishing a secure connection. Integrating the wallet is a one-time setup that opens the door for all subsequent STON.fi interactions. If youâve done any Web3 integration before, this will be familiar â and if not, TonConnectâs documentation makes it easy.
- Fetch pool data & simulate the provision. Start by letting the user choose a liquidity pool and enter their deposit amount. Use the STON.fi API to fetch available pools and tokens so you can display optionsâlike a dropdown of token pairs or a pool selector with APR info. Once the user selects a pool and amount, simulate the liquidity provision before executing it. The STON.fi API provides endpoints for this: send the pool ID and deposit amounts, and it returns the expected resultâlike the number of LP tokens the user would receive, and any slippage or price impact. This lets you show a confirmation message such as: âYou will receive X LP tokens for depositing Y TON and Z USDT.âUsers can then review and approve the result before proceeding. STON.fi smart contracts support single-sided liquidity (if the user has only one token, the protocol can swap half to form a pair). You can choose whether to expose that option or stick to equal-pair deposits for simplicity. Once the user is happy with the preview, they click âConfirm.â
- Execute the liquidity provision transaction. Now itâs time to add liquidity on-chain. With a single SDK function call, your app builds the correct transaction payload. This includes all required data: pool address, deposit amounts, and minimum LP tokens (from the simulation). Send this payload to the userâs wallet for signing. Thanks to TonConnect, the Tonkeeper app prompts the user to confirm the transaction with all the details shown. After approval, the transaction is broadcast to the TON blockchain. Your React app can listen for the result or wait for confirmation, then update the UI accordinglyâfor example, by showing the updated LP token balance or the userâs share of the pool. Thatâs itâthey’re now an LP and earning fees. You can later add features for viewing or withdrawing liquidity using similar SDK calls.
- Test and iterate. Itâs always a good idea to test thoroughly. Because youâre dealing with real assets and user funds, you might want to try the flow on TONâs testnet or with small amounts first. STON.fiâs documentation and example apps can be very handy here Ensure the user experience is smooth â e.g., handle scenarios like if a user tries to add liquidity to a pool that doesnât exist yet (the SDK can help create a new pool in that case), or if they donât have enough balance, etc. Once everything looks good, youâre ready to roll out the new feature to your users!
Next, letâs discuss some real-world scenarios where adding liquidity provision can make a significant impact. Itâs not just theoretical â a wide range of TON apps can benefit from this integration.
From Wallets to Games: Liquidity Integration in Action
The beauty of STON.fiâs LP integration is that it can enhance all kinds of apps in the TON ecosystem. Letâs explore a few scenarios to illustrate how liquidity provision can be a game-changer:
Wallets and Payment Apps: Rewards at Your Fingertips
If youâre building a crypto wallet or payment app for TON, adding a âgain rewardsâ feature can set you apart. Imagine a Toncoin wallet app where, in addition to checking their balance and making transfers, users see an âGet Rewards with STON.fiâ tab. There, they could pick a token pair and instantly put their assets to a liquidity pool. Itâs a natural extension for payment apps too: if your app facilitates TON payments, why not also let users allocate unused funds to liquidity pools for extra rewards?Â
DeFi Dashboards and Tools: One-Stop DeFi Experience
Many dashboards show users their token holdings, portfolio value, and current yields from things like staking or farming. By adding liquidity provision, you can let users take direct action on that information. For instance, suppose your dashboard shows that a user holds some idle USDT and TON in their portfolio. You could nudge them with an insight: âYour assets could be working â provide liquidity to the TON/USDT pool with an estimated X% APY.â With STON.fi integration, the user could follow that prompt and execute the LP provision right then and there through your interface.
Automated trading bots or yield optimizers can leverage the STON.fi SDK to manage liquidity positions programmatically. A trading bot might decide to park funds in a liquidity pool during calm market periods, then withdraw when it needs the liquidity â all using the SDK under the hood. Users will appreciate not having to navigate multiple apps or websites. And since STON.fi ensures best-rate swaps and aggregated liquidity (especially with Omniston in the mix), your tool would be tapping into the deepest liquidity on TON.
Utility & Governance Tokens: Turbo-Charging Any Vertical
Decentralized apps across SocialFi, GameFi, DeFi, and every future â-Fiâ you can dream up â tend to launch a single token that pulls double duty: it unlocks features (utility) and lets holders steer the roadmap (governance). For these multitool coins to thrive, they need deep, stable markets from day one â and thatâs exactly what STON.fi liquidity pools deliver.
Why STON.fi LPs are a perfect match for dual-purpose tokens?
- Instant depth, tighter spreads. AMM pools bootstrap liquidity without order books, so new tokens avoid the thin-market whiplash that scares users away.
- Community-owned liquidity = stronger governance. When holders supply the pool, theyâre literally investing in the token they vote on, aligning long-term incentives and hardening the DAO against takeover attempts.
- Fee + reward flywheel. STON.fi routes 0.2 % of every trade back to LPs, and projects can layer extra token emissions on LP tokens to super-charge rewards â classic âdouble-dipâ mechanics popular in yield-farming 2.0.
TON DeFi Startups: Focus on Core Innovation
Say youâre launching a TON-based lending platform. Your users will need to swap collateral and interest tokens, and they might want to provide liquidity to support markets for the platformâs token. By using STON.fi for swaps and LP, you outsource the complexity: users can swap any tokens through STON.fiâs pools (ensuring good rates), and if they want to gain extra benefits with their idle assets, they can add them to STON.fi pools directly from your interface. Your development team doesnât have to code those mechanisms from the ground up â they just integrate existing ones.
Another angle is composability: TONâs DeFi ecosystem will grow, and having STON.fi integration means your app plays nicely with other services. For example, your TON yield aggregator can use the STON.fi SDK to move funds in and out of pools based on where the best outcome is, all automatically. This kind of synergy is only possible because STON.fi provides API and SDK for any project to use.
Token Communities and Projects: Kickstart Your Tokenâs Liquidity
You might be a community token project or DAO launching a new token on TON. One of the first hurdles for any new token is to establish liquidity so that interested users can buy, sell, or trade it easily. Imagine youâve just launched $MYTOKEN for your community. Instead of simply telling your supporters âgo to STON.fi and add liquidity,â you could embed the STON.fi LP interface directly on your projectâs website or in your custom wallet app. With a straightforward React integration, your community members can provide liquidity to, say, the $MYTOKEN/TON pool without ever leaving your site/app. This makes the process far less intimidating for newcomers.
More liquidity also means better conditions for your token (less volatility, more accurate price discovery, and the ability to handle larger trades).
Additionally, by integrating STON.fi, your token project taps into the wider TON audience â STON.fi users might notice a new pool (your token) and be tempted to join in or learn about your project.
Next Steps: Start Building with STON.fi Liquidity
Feeling inspired to add STON.fiâs liquidity provision to your own project? The path from idea to implementation is straightforward, and there are plenty of resources to guide you. To help you get started, here are some handy resources and references:
- Official STON.fi Liquidity Quickstart Guide. The STON.fi docs offer a step-by-step tutorial on building a basic liquidity provision feature in a React app. Itâs a great starting point if you prefer a structured walkthrough (and itâs beginner-friendly).
- Example Next.js App (Open-Source Code). Check out the STON.fi SDKâs Next.js demo app on GitHub. This is a full-featured example application that showcases swap and liquidity integration with best practices (like using hooks, handling errors, and managing state efficiently). You can even fork it as a foundation for your project.Â
- Live Demo. Sometimes the best way to understand a feature is to try it yourself as a user. STON.fi provides a hosted demo app where you can actually connect a wallet (you can use a testnet wallet or a spare wallet for safety) and walk through providing liquidity in a user interface. This lets you experience the flow end-to-end â from selecting pools to confirming via Tonkeeper â exactly as your users would.Â
- STON.fi Documentation and support. The broader STON.fi docs cover everything from the JavaScript API reference to deeper explanations of the protocol. The STON.fi team and community are active on Telegram, so donât hesitate to join those channels for support.
With these resources in hand, youâre well-equipped to bring a new dimension of functionality to your React app. Happy coding, and see you on the TON DeFi side!