---
title: "Unbanked Solana Support"
year: "2022"
motto: "Solana Integration"
description: "Through the partnership with Zebec, I successfully implemented Solana support into our programs. This involved creating a poller to listen for incoming transactions, utilizing proxy wallets, and leveraging libraries such as @solana/web3.js to enable support for USDC SPL in the Zebec program and SOL in the Unbanked program."
stack: ["javascript", "typescript", "nodejs", "web3"]
website: "https://linkedin.com/company/27177154/"
url: "https://rolandoandrade.me/projects/unbanked-solana-support/"
author: "Rolando Andrade"
---

# Unbanked Solana Support

> Solana Integration

Through the partnership with Zebec, I successfully implemented Solana support into our programs. This involved creating a poller to listen for incoming transactions, utilizing proxy wallets, and leveraging libraries such as @solana/web3.js to enable support for USDC SPL in the Zebec program and SOL in the Unbanked program.

Year: 2022. Stack: javascript, typescript, nodejs, web3. Website: https://linkedin.com/company/27177154/

A bank tells you when money arrives. A blockchain does not. If you want to know about a deposit on Solana, you have to watch the chain yourself. That one difference shaped everything I built for this integration.

At Unbanked, we partnered with Zebec to bring Solana support to our users. Zebec specializes in streaming payments on Solana. They wanted to give their users access to traditional banking services. We wanted to support more crypto. The partnership made sense for both sides.

My job was to build the infrastructure that connects the two.

## No one tells you

Solana is fast, cheap and popular. But its speed comes with tradeoffs that change how you build payment systems.

Traditional payment systems rely on webhooks. A bank sends a message when money arrives, and you update your database.

Blockchains have no central authority to send that message. You have to watch the chain and spot incoming transfers as they happen.

Solana processes thousands of transactions per second. Missing a payment means an unhappy user. Counting a payment twice means losing money. The system had to be reliable.

## A poller that watches the chain

The core of the integration is a transaction poller. It runs all the time and watches the blockchain for incoming transfers.

It works like this. The poller asks Solana's RPC nodes for data at regular intervals. RPC nodes are the servers that answer questions about the chain. It fetches recent transactions for the wallet addresses we control. Then it reads each transaction to find deposits.

Solana transactions are complex. One transaction can hold several instructions, and each instruction can move tokens between accounts. The poller has to understand that structure and pull out the data that matters.

I used `@solana/web3.js` to talk to the network. The library fetches transactions, decodes instructions and checks signatures. It handles the low level RPC calls, so I could focus on the business logic.

The tricky part was the edge cases. Network congestion can delay confirmations. RPC nodes can return old data. The poller retries failed requests and counts confirmations, so it never processes a transaction that is not confirmed yet.

## One wallet per user

We needed to know which user each deposit belonged to. The answer was proxy wallets.

Each user gets their own Solana address. To deposit, they send funds to that proxy wallet. The poller sees the incoming transfer and credits their account.

Behind the scenes, a proxy wallet is just a keypair we control. Funds do not stay there long. A separate process sweeps deposits into a central treasury wallet. That keeps the system secure and makes accounting simpler.

![A deposit lands in the user's proxy wallet, the poller credits the account, and a sweep moves the funds to the treasury.](https://storage.rolandoandrade.me/blog/unbanked-solana-support-deposit-flow.webp)

Creating keypairs is easy with `@solana/web3.js`. Managing thousands of them safely is the hard part. We store the private keys encrypted and decrypt them only when a sweep needs them.

## USDC SPL vs native SOL

Solana has two kinds of tokens. SOL is the chain's own currency. SPL tokens are like ERC-20 tokens on Ethereum.

USDC on Solana is an SPL token, and it needs different code than SOL.

For SOL transfers, you check the lamports field in the transaction. Lamports are the smallest unit of SOL, like satoshis for Bitcoin.

For SPL tokens like USDC, you parse the token program's instructions. The Token Program is the smart contract that manages every SPL token. You look for `Transfer` or `TransferChecked` instructions and decode the amount and the accounts involved.

The Zebec integration used USDC SPL. Users could stream payments in stablecoins and then off ramp through Unbanked, which means turning crypto into regular money. The main Unbanked program supported native SOL deposits. The poller needed separate parsing logic for each.

## Keeping up with Solana

Solana's speed has a cost. Transactions confirm in seconds, so the poller has to process data quickly to keep up.

I built it around a queue. The poller fetches transactions and pushes them into a processing queue. Worker processes take items from the queue and run the business logic. Fetching and processing stay separate, so neither one slows the other down.

Idempotency was critical. Idempotent means that processing the same thing twice has the same effect as processing it once. The poller might fetch a transaction more than once, during retries or after a restart. Each transaction has a unique signature. We store the signatures we have processed and skip any duplicate.

Errors needed careful handling too. Network issues, rate limits and malformed data could each crash a simple poller. Ours logs errors, retries with backoff and sends alerts when a failure keeps happening.

## Live without major issues

The integration went live without major issues. Users could deposit SOL and USDC from Solana wallets. The Zebec partnership opened up streaming payment use cases. Both platforms gained new features.

Building on Solana taught me a lot about blockchain infrastructure. The ecosystem moves fast. Documentation is sometimes outdated. You learn by reading source code and experimenting.

If you build payment systems on Solana, take time to understand the transaction structure. Use the official libraries. Build for reliability first, then for speed.

* * *

If you are working on blockchain integrations or fintech infrastructure, I would love to chat. Feel free to reach out.

[Book a call with Rolando](https://rolandoandrade.me/pricing/)
