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.

Read also: Why Omniston matters: smarter liquidity for TON DeFi

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:

  1. 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).
  2. 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.
  3. 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.”
  4. 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.
  5. 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!

Share this article: