Migrating to Solana: How Loop enabled crypto payments on Solana
Introduction
At Loop, we help companies pay and get paid onchain. Our mission is to build infrastructure for the next generation of payments, which will occur onchain, regardless of which chain. From the start, Loop has been deeply entrenched in the EVM ecosystem. Our CTO Shane van Coller was an OG solidity smart contract developer starting back in 2017, and we initially launched Loop on Ethereum and Polygon. From there, we continued to expand and deploy across the more popular EVM chains including BNB Smart Chain, Arbitrum, Optimism, and Base. We were EVM people 😀, but the time had come to embrace Solana and ensure Loop’s backend architecture and UX were able to handle both EVM chains and Solana.
In early 2024, we saw increasing demand from clients requesting Loop to deploy on Solana. For companies like Loop, who have been deeply entrenched in the EVM ecosystem, moving to Solana can be a scary feat as we didn’t know exactly how big of a challenge the switch would be until we actually embarked on the change.
But we crossed the chasm and learned a few things that we wish we knew before we started. So we wrote up our learnings here so others could benefit from our learned experience. It’s not so scary on this side of the “bridge."
Our build
In order to bring support for Loop Crypto onto Solana, there were large buckets of work we needed to undertake.
Find a wallet connector that supported both EVM & Solana
Update our backend to support both EVM & Solana wallet structures
Update our frontend and backend to handle transactions for both EVM & Solana
In the sections below, we explore each of these in more detail.
1) Finding a new wallet connector
This decision to deploy on Solana necessitated a complete overhaul of our wallet connector as our existing provider didn’t support Solana. After extensive research on wallet connection solutions, we settled on Dynamic. Several factors influenced this decision:
1) Multi-chain support: Dynamic was one of the few solutions that supported both EVM chains and Solana when we started this process in early 2024 .
2) React-ready library: Dynamic’s SDK offers a package that exposes React hooks to manage wallet data, aligning with our existing development patterns.
3) Out-of-the-box UI: Dynamic offers multiple pre-built components to connect and manage a user’s wallet, with the flexibility to customize their branding and style.
4) Comprehensive documentation: The availability of detailed documentation streamlined the integration process.
While there are many great wallet solutions, we settled on Dynamic as it best met our implementation needs.
To drive home the first point, we were surprised by just how limited the number of options were when it came to finding solutions that could handle both EVM and Solana wallets. Granted we were researching solutions in early 2024 and several providers have now rolled out Solana support, but we found it challenging to find a provider that could offer a seamless connection experience regardless of which chain the user’s wallet was on. Dynamic proved to be the best option with a team that was highly supportive and reactive to any of our needs and feedback.
2) Updating our backend to support both EVM and Solana wallet structures
Once EVM functionality was stable with Dynamic, we focused on integrating support for Solana. We recommend looking out for three things during this phase.
1) Address format differences between EVM and Solana - Our backend database structure had been constructed to handle EVM addresses, so we were forced to reconsider how we handle rudimentary tasks like case sensitivity and validation. When the Dynamic connector passed a new Solana address to our system, we needed to be able to accommodate the new format as well as continue to support the existing EVM format.
2) Transaction structures - Once we had the wallet formatting down, we moved onto transaction structures, creating separate mechanisms for handling the construction of transactions depending on which chain the user was connected to.
3) Signature validation - This was another critical component to address where we needed chain-specific validation logic on both the client and server sides of our application to account for the differences in the way transactions are signed on EVM chains vs. Solana.
In addition to the three considerations above, we also had to find a way to replicate EVM’s ability to authorize token spending on behalf of a wallet using a Contract’s approve function, but for Solana. We developed a system allowing us to assign a contract as the delegate for an SPL token account, giving it controlled access to transfer tokens up to a specified limit, then confirming that amount before proceeding with checkout.
Addressing UX considerations
Once we had built the core functionality, we went through a series of user experience testing with our team. Our goal was to make the multi-chain experience as seamless as possible for users. We wanted there to be a standard experience for users regardless of which wallet they went to connect to Loop with. Our ability to treat Solana and EVM the same way technically, allowed us deliver a simple linear experience, providing users with the power to choose where to make their payment with as little friction as possible.
Being able to handle network switching was also critical. While it may be a rarer occurrence, we needed the UX to feel smooth when a user switched from a Metamask to a Phantom wallet. After a bit of iteration, we got there 😀. We’re of course always open to feedback, but we landed on the flow below, which allows you to easily see which networks are available on the given checkout page that you are using. Our ability to treat Solana and EVM the same way technically, allowed us to make this experience possible and give users the power to toggle between chains seamlessly.
Conclusion
Hopefully these learnings help you in your implementation of Solana from an EVM network. Our implementation showcases the complexities involved in creating a truly multi-chain application. By maintaining a consistent user experience and carefully bridging the gaps between EVM and Solana, we were able to create a solution that supports both ecosystems. This approach not only solved our immediate need for Solana support but also positioned us for easier integration of additional chains in the future.
We owe a special thank you to our lead frontend developer Rocco Panacci who did a fantastic job spearheading this implementation and sharing these insights from his work.
If you want to learn more about this implementation or need to begin accepting crypto payments for your own application, let’s talk. Loop makes it simple to get started with crypto payments in minutes.
___________________________________________________________________________________________________________________________________
About Loop
At Loop Crypto, we build infrastructure to unlock truly programmable money and create an open financial system. We enable crypto payments for 50+ of the top web3 companies, including Pinata, Neynar, Paragraph, Kaito, ETHGlobal, and ENS, supporting millions of dollars transacted and saving thousands of hours.
Whether the payment is one-time or recurring, Loop supports a broad range of payment use cases: subscriptions, one-time charges, recurring bill pay, loan repayments, and donations. Our integrations with Stripe, QuickBooks, and Xero make it easy to implement crypto payments within your existing operations.
If you’re ready to get started, book a call with our team to get started in minutes.
Stay in the Loop.