Inspiration
We were inspired to build StablePay after learning how many families in countries with volatile currencies turned to stablecoins as their lifeline to protect against hyperinflation. However, we found that they often had to pay expenses like rent or taxes in their local currency, forcing them to go through a complicated process involving high fees, several exchanges and many different wallets to convert their stablecoin to their local currency.
What it does
The goal of StablePay is to empower people in volatile economies to use their stablecoin savings for real-world expenses without losing money to bad exchange rates, hidden fees, or confusing conversion steps.
The app connects to a Solana wallet to read stablecoin balances like USDC, and when a user wants to convert or send funds, we route the transaction through our optimization engine. This engine traverses a graph of exchanges and networks, each edge representing a conversion cost, and computes the cheapest possible path from the user’s stablecoin to their target local currency. By leveraging intermediate assets like BTC, ETH, or SOL only when advantageous, StablePay automatically executes the optimized sequence of swaps across chains, ensuring users get the highest value for every conversion.
How we built it
We built StablePay as a full-stack system combining a smooth mobile experience with a high-performance backend optimizer. The frontend is a React Native Expo application that connects directly to a user’s Solana wallet, displays real-time stablecoin balances, and provides a clean interface for viewing transactions, initiating conversions, and executing transfers across chains.
On the backend, we designed a FastAPI service in Python that performs the heavy lifting. We modeled the currency ecosystem as a weighted graph where nodes represent assets (fiat or crypto) and edges represent real-time exchange fees pulled from P2P, Swapzone, and market price APIs. To minimize conversion loss, we implemented a custom traversal using Dijkstra’s algorithm in log-space, allowing us to find the optimal multi-hop route between any two currencies. This backend exposes clean API endpoints that the mobile app can call, enabling users to trigger conversions and receive optimized paths instantly. Together, the stack combines strong UX with algorithmic execution to give users a powerful but accessible financial tool.
Challenges we ran into
One of the first major challenges we faced was the lack of a reliable, unified API for fiat-to-crypto and crypto-to-crypto conversions. Many providers only support crypto-to-crypto pairs, while fiat endpoints often require paid enterprise tiers or permission from the sales team. This severely restricted our ability to gather real-time conversion routes and fee structures. So we shifted to peer-to-peer (P2P) exchange data, which gave us a more flexible and globally accessible source of fiat on-ramps/off-ramps. This required refactoring our conversion graph to support user-driven markets instead of centralized liquidity.
Midway through the project, we discovered that most providers don’t expose transparent transaction fees. Instead, they embed these fees inside the quoted conversion amount. This meant that simply summing conversion rates wasn’t enough. Paths that looked optimal were actually more expensive due to compounded percentage losses. So we moved to a log-space cost model, transforming multiplicative fees into additive weights. By running Dijkstra’s algorithm on log-costs, we ensured we always computed the true cheapest conversion path, even across long multi-hop routes. We developed this website using web technologies, but some web APIs like the crypto module don't work the same on mobile, so we had to write polyfills to get this to work.
Accomplishments that we're proud of
One of our biggest technical accomplishments is the conversion optimizer, which is a graph-based system that analyzes multiple conversion paths to determine the cheapest possible route between currencies. We used real-time fee data from P2P and Swapzone, transformed percentage-based trading fees into log-space weights, and implemented Dijkstra’s algorithm to find optimal multi-hop conversions. This approach lets us discover routes that aren’t obvious (like USDE to SOL to ARS) when those paths result in lower net fees than direct markets. The optimizer abstracts away all the complexity of cross-exchange pricing, cross-network pricing, and fee structures, giving users a simple, actionable output, which is the path that preserves the most value. Building this engine required algorithmic thinking and strong API integration, making it one of the features we’re most proud of.
What we learned
We learned about the difficulties faced when trying to find exchange rates for different currencies depending on the exchanging method whether that be an aggregate crypto to crypto exchange, or a p2p crypto to fiat exchange. We had to use multiple apis to find the exchange rates.
What's next for StablePay
Looking ahead, we plan to expand StablePay into a fully autonomous financial assistant for users in volatile economies. The next major step is integrating on-chain execution across multiple networks, allowing our optimizer not just to compute the cheapest route, but to actually perform all swaps atomically through smart contracts or cross-chain protocols. We also aim to incorporate MoonPay and additional fiat on/off-ramp providers, enabling users to move seamlessly between traditional currencies and stablecoins regardless of their region. We’re also exploring features such as risk-aware routing, where users can choose between the absolute cheapest path or the safest one based on exchange reliability and liquidity. Long-term, we hope to introduce financial intelligence tools like budgeting insights and metrics calculations, volatility alerts, and better personalized recommendations to help users navigate inflation with confidence. We would also love to add PayPal integration to be able to send the fiat currency output to a trusted banking system. Ultimately, StablePay will evolve from a conversion optimizer into a comprehensive platform that empowers people to manage and preserve their wealth in any economic environment.
Built With
- expo.io
- fastapi
- python
- react-native
- solana
Log in or sign up for Devpost to join the conversation.