Right-click for brand assets
Blog

Product updates

Enabling Concurrent Blockchain Transactions with Portal's /sign API

Reduce latency and gas fees with batched processing

By the Portal team

Enabling Concurrent Blockchain Transactions with Portal's /sign API

Why Concurrent Transactions Matter in Payments

The ability to process multiple transactions simultaneously is fundamental to the modern financial system, where delays can mean lost revenue and poor user experience. Payment processors like Visa must handle thousands of transactions per second to ensure a seamless commercial experience for people around the world. As such, builders interested in migrating financial operations to blockchain encounter a big hurdle: blockchains, by design, require transactions from the same wallet to be processed sequentially due to the concept of "nonces." This limitation hinders one’s ability to build high-throughput financial applications that rely on processing multiple transactions at once.

How Blockchains Process Transactions and the Role of Nonces

Blockchain networks process transactions in a strict sequence. To prevent double-spending and maintain order, transactions include a "nonce," a sequential number that ensures each transaction is processed exactly once and in the correct order.

For example, if an account has a nonce of 10, the next transaction must have a nonce of 10, followed by 11, 12, and so on. If a transaction with nonce 12 is submitted before nonce 11 is confirmed, the network will hold it in the mempool until nonce 11 completes processing. This dependency guarantees order but introduces a challenge for applications that need to send multiple transactions at once.

Sequential Processing Blocks High Throughput

Imagine a blockchain-powered payment processor—let's say a version of Visa operating entirely on Ethereum. If this company uses a single wallet to settle payments, it must process each transaction one by one. Every payment settlement requires a new transaction with a properly incremented nonce, and since nonces must be used sequentially, concurrent transactions are impossible.

Transactions must be broadcast and mined in strict order, creating bottlenecks in high-volume applications. If a transaction with a lower nonce gets stuck due to network congestion, all subsequent transactions will be blocked until it is resolved.

Options for Handling Nonce Management at Scale

Companies facing this challenge have two main options:

  1. Using Multiple Wallets: Instead of relying on a single wallet, companies can distribute transactions across multiple wallets. Doing so adds complexity, requiring careful wallet management, security controls, and reconciliation mechanisms.
  2. Building a Nonce Management System: This approach involves tracking transaction submissions, keeping an internal record of used nonces, and ensuring transactions are sent in the correct order. While this provides more flexibility than multiple wallets, it still falls short of true concurrency.

A Step Closer to Concurrency with Nonce Management Systems

A well-designed nonce management system can track transactions submitted to the mempool and ensure successful execution. This allows for better transaction flow management but still doesn't fully eliminate the sequential submission requirement. Applications need to constantly monitor the blockchain for pending transactions, handle re-submissions, and ensure nonces remain correctly synchronized.

Portal's /sign API: Seamless Nonce Management for Concurrent Transactions

Developers can use Portal's /sign API to handle nonce management efficiently. With Portal, you can submit multiple transactions with pre-incremented nonces, allowing the backend to manage submissions to the mempool in the correct order.

Here’s how you can use Portal's /sign API to send multiple transactions without manually tracking nonces:

Diagram showing concurrent blockchain transactions with Portal nonce management

Benefits of Using Portal’s /sign API for Nonce Management

  • Enables back-to-back transaction submission: Transactions can be prepared and sent in parallel without waiting for previous ones to confirm.
  • Simplifies blockchain integration: Developers can focus on business logic instead of low-level blockchain transaction management.

Conclusion

High-throughput financial applications demand concurrent transactions, but blockchain's nonce requirements traditionally enforce strict sequential processing. By leveraging Portal’s /sign API, businesses can submit multiple transactions efficiently, allowing seamless scaling of blockchain-based payment solutions.

If you’re building a blockchain-based payment system, consider integrating Portal to remove nonce management headaches and enable true concurrency for your transactions.

All customers using the Enclave MPC API have access to Concurrent Transactions with simple additions to their code.

Contact the Portal team for support or set up a time to get acquainted with our full suite of products.

Tell us your vision. We'll show you how Portal helps.

Or start building

npm i @portal-hq/web

Web, iOS, Android, React Native and Flutter. Say hello and we will get you set up.