Skip to main content

1. Introduction

Problem Statement

In the blockchain world, transparency is a double-edged sword. While transparency is great for trust and accountability, it also means that all data is visible to everyone. Imagine if everyone could see your bank card activity—not ideal. For institutions, this means competitors can easily access sensitive data, which is like leaving your financial books wide open for anyone to inspect.

Furthermore, traditional privacy protocols typically only allow single-output transactions, a 1:1 correlation. This means that if you deposit 10 USDC, you can only withdraw 10 USDC in a single output, limiting privacy and reducing flexibility in transaction management. Existing privacy tools are often stigmatized as tools for illicit activities, are incompatible across multiple ecosystems, and come with high financial integration costs.

Solution

tip

With SurferMonkey, institutions can leverage their existing blockchain codebase and infrastructure, minimizing security risks, engineering integration burden, and overall go-to-market costs.

The SurferMonkey SDK is a regulatory-privacy-focused middleware solution designed to address the challenges of maintaining confidentiality in blockchain transactions. It provides a scalable, compliant, and privacy-preserving approach to interacting with digital assets on the blockchain, all while adhering to major regulatory frameworks such as MiCA and FinCEN. By leveraging advanced zero-knowledge proof (ZKP) technology, SurferMonkey enables institutions to maintain privacy without compromising the inherent benefits of blockchain security and transparency.

One of the core innovations of SurferMonkey is its Fractionalized Output feature, which breaks free from the limitations of traditional privacy protocols. Instead of being restricted to a single output, SurferMonkey enables a 1:N correlation where one input can be split into multiple asynchronous outputs. This means that if you deposit 10 USDC, you could withdraw it as 3 USDC, 4.5 USDC, and 2.5 USDC at different times, significantly enhancing both privacy and flexibility.

SurferMonkey integrates seamlessly with any blockchain, as well as existing and future smart contracts, supporting all types of digital assets. This means institutions and developers do not need to over-engineer or migrate their current digital asset infrastructure to a new blockchain or system.

Overview

The SurferMonkey SDK is a JavaScript library that simplifies the integration of privacy-compliant blockchain transactions. It provides a secure and easy way for developers to interact with supported blockchains, ensuring privacy and regulatory compliance through zero-knowledge proof (ZKP) technology.

By abstracting complex blockchain mechanics, the SDK enables developers to focus on building innovative solutions with minimal effort. It supports both native tokens and ERC20 assets, while the Fractionalized Output feature allows a single deposit to be split into multiple withdrawals at different times, enhancing both privacy and efficiency for use cases like payment distribution or asynchronous transactions.

Key Benefits:

  • Privacy & Compliance: Ensures secure, AML-compliant blockchain interactions while maintaining user privacy.
  • Simple Integration: Just two primary JS functions make it easy to add privacy features across mobile, browser, and server environments.
  • Fast & Flexible: Generates Zero-Knowledge Proofs (ZKPs) in 3 seconds, supporting any type of asset, multi-call, and multi-output transaction types.
tip

For an in-depth understanding of the technology behind SurferMonkey, take a look at the SurferMonkey research paper.

Visualizing the Protocol

The diagrams below illustrate key phases of the SurferMonkey protocol, highlighting its flexibility and privacy capabilities in different scenarios. These diagrams will help you visualize how the protocol works during both deposit and withdrawal phases, especially when dealing with multi-output transactions and multiple smart contract calls.

Asynchronous Fractionalized Output Scenario

The following diagram represents the deposit and withdrawal phases of the SurferMonkey protocol, showcasing the Fractionalized Output functionality:

Figure 1.- High-Level Fractionalized Output Flow

In this example, both Alice and Bob deposit funds into the SurferMonkey protocol. After locking the assets, the protocol can then fractionalize these deposits into multiple output transactions, sending specific amounts to different recipients. Here:

  • Alice deposits 14 USDC, and Bob deposits 6 USDC into SurferMonkey.
  • The protocol then sends asynchronous independent fractional outputs to Charlie, Daniel, Evie, Felicia, and Gil.

This fractionalization feature allows for efficient distribution of assets, whether for splitting payments, distributing dividends, or other purposes.


Figure 2 illustrates the fractionalized output process where each transaction, represented by a unique transaction hash, can be settled at different times and in different order. After deposits from Alice and Bob, the SurferMonkey protocol divides the funds into multiple asynchronous transactions. The SurferMonkey Proxy then distributes these amounts to individual recipients like Charlie, Daniel, and others. This asynchronous processing allows each recipient to receive their funds independently, optimizing efficiency, privacy and ensuring timely transfers without any centralized bottleneck. The use of a proxy enhances security by independently validating each transaction, ensuring accurate and secure fund distribution.

Figure 2.- Detailed Transaction Breakdown for Fractionalized Outputs


Multi Smart Contract Call Scenario

The next diagram illustrates a more advanced use-case where SurferMonkey is used with Multi Smart Contract Calls to enable complex transactions:

Figure 3.- Overview of Multi Smart Contract Call Flow

In this example, both Alice and Bob contribute funds to the SurferMonkey protocol, which then makes a multi-call transaction:

  • Alice deposits 14 USDC, and Bob deposits 6 USDC.
  • The SurferMonkey protocol transfers 6 USDC to the SurferMonkey Proxy, which handles the subsequent operations.
  • The SurferMonkey Proxy approves ERC20 and permit actions (e.g., with UniSwap).
  • The proxy then proceeds with a UniSwap Swap to exchange 6 USDC for 100,000 MemeCoin.
  • Finally, the resulting MemeCoin is transferred to Evie.

This capability allows developers to create complex, multi-step transactions within a single deposit, ensuring privacy throughout the entire process. By using SurferMonkey, you can easily orchestrate multiple smart contract calls atomically, improving efficiency and user experience.


Figure 4 illustrates the detailed steps involved in the multi-call process with SurferMonkey. Following deposits from Alice and Bob, the SurferMonkey Proxy executes multiple interactions within the same transaction hash, including ERC20 token approval, Permit2 approval for UniSwap, and finally a token swap for MemeCoin. The atomicity of this process guarantees that all steps are either completed successfully or fully rolled back, ensuring robustness and user trust. By bundling these interactions, gas costs are significantly reduced, resulting in a highly efficient and streamlined DeFi experience.

Figure 4.- Step-by-Step Smart Contract Interactions

tip

You can combine Fractionalized Outputs with Multi Smart Contract Calls to achieve complex and versatile use cases.


Technical Foundations of SurferMonkey Protocol

The SurferMonkey protocol is based on the concepts introduced in the research paper titled SurferMonkey: A Decentralized Anonymous Blockchain Intercommunication System via Zero Knowledge Proofs. This research outlines the key contributions of the Decentralized Anonymous Compliant Technology (DACT) protocol that underpins SurferMonkey. The DACT protocol is designed to achieve privacy, anti-Maximal Extractable Value (MEV), and censorship resistance through the use of advanced cryptographic zero-knowledge proofs (ZKPs).

The SurferMonkey infrastructure uses these methods to enable secure and anonymous intercommunication across multiple blockchains. This ensures that transactions remain private while maintaining regulatory compliance, making it ideal for developers looking to integrate privacy-preserving capabilities into their blockchain applications.