Singularity
  • START HERE
    • Introduction
    • 🚀Mission
    • Supporters
    • The Team
    • 🎯Target User(s)
      • 📊Funds
      • DeFi Applications
      • L1 and L2s
  • The Singularity Solution
    • Protocol Overview
    • Core ZK-Infrastructure
  • CORE USE-CASES
    • Unified Cross-Chain Compliance Oracle
    • Private OTC Settlement
    • 🌑Dark pool (Orderbook & Private AMM)
    • Vesting in Stealth
      • Vesting in Stealth Guide
        • (Projects) Confidential Vesting Streams Guide
        • (Projects) Transfer Confidential Vesting Streams Guide
        • (Recipients) Receive Confidential Vesting or Vested Tokens
        • (Recipients) Check & Claim Confidential Vested Tokens
    • Private Payments
    • Swaps
    • Liquidity Provisioning
  • HOW TO GET STARTED?
    • Onboard in 4 easy steps...
    • 🏛️KYC/KYB Guide
      • KYC (Keyring Network)
      • KYB (Keyring Network)
      • KYC (zkMe) for accessing Arbitrum
    • On-Chain Singularity Actions
      • Deposit
      • Withdraw
      • Swaps
      • LP (Adding Liquidity)
      • LP (Removing Liquidity)
      • LP (Collect Fees)
      • Internal Transfer
      • Compliant Staking
        • Staking via Direct Deposit
        • Staking via Private Notes
  • Welcome to the Singularity Service (Hint: Points Points)
    • Page
    • Introduction to the Singularity Secret Service
    • 📜High-level overview Singularity Season 2 (SS2) Guideline
    • How to get started and qualify
    • Discuss roles
    • Dashboard
    • Burning mechanism
    • leveling up and each role
    • OG points vs OG Tokens
    • Partner Campaigns
    • Mission 1 Guideline Overview
      • Mission 1 Guideline with zkMe!
        • How to Deposit on Singularity: Step-by-Step Guide
    • 🕵️ SS2 - Singularity
      • ⁉️ How and where to get started?
      • 🖥️ Season 2 Dashboard
      • 👨‍🚀 CORE GAME PLAY
      • 💵 Earning Mechanism
        • 🖼️ OG POINTs
        • 🤖 OG points <> $OG
  • HOW TO EARN POINTS & YIELD?
    • ⭐Compliant Staking Overview
    • How to participate?
    • Staking via Direct Deposit
    • Staking via Private Notes
    • How to Withdraw?
    • Redeem (i.e sgETH->ETH)
    • sgToken Partners
    • FAQs
  • FOR DEVELOPERS
    • Custom SDK Integration
      • Bridging Smart Contract
      • Front-End
    • Singularity's Architecture
    • Native Transactions
    • DeFi Integrations
      • Uniswap V3
      • Curve Finance
    • The Relayer
    • Smart Contract Addresses
    • Smart Contracts (Compliant Staking)
  • SINGULARITY MISCELLANEOUS
    • 🚨Protocol Security
    • 🪙Tokenomics
    • FAQ
  • 🕶️The Darkpool
    • Darkpool Overview (Testnet)
      • About Sepolia ETH
      • Earning and Tracking Points
      • How to Make a Trade on Testnet
    • Darkpool FAQs
      • Trading Details
      • Security and Compliance
      • Technology Overview
      • Benefits of Trading in a Darkpool
Powered by GitBook
On this page
  1. FOR DEVELOPERS

Native Transactions

PreviousSingularity's ArchitectureNextDeFi Integrations

Last updated 8 months ago

The core set of transaction capabilities within the dark pool. Ability to deposit/withdraw from the pool, split and join separate notes together and apart, and transfer ownership of them between one another.

Deposit/Withdraw

When a user deposits assets into the Singularity, they first generate a zero-knowledge SNARK proof that forms a non-duplicatable link between a newly created, privately kept 'note' and a claim to the assets in the pool.

Transfer

Traders can send anonymous and hidden transfers to each other by submitting a zero-knowledge proof to the singularity that:

  1. invalidates an existing note owned by the trader,

  2. creates multiple new notes with (potentially) new owners, and

  3. proves that the sum of the new notes is equal to the original note (less fees).

After the receiver communicates their note footer and/or Note (generated from footer, with inclusion of qty + asset details), the sender signs a message with the details below and forms a proof with it that gets submitted to the smart contract allowing funds to be spent.

[
        in_note,
        in_nullifier,
        out_note,
        out_note_footer,
]

A typical transfer may also encompass an “internal” transfer performed by one trader. They may perform an internal transfer in order to create a degree of separation between the originating and receiving address that they control.

Join/Split

Because we want to divulge as little information about transactions made within the singularity as possible, the system is designed so that notes may only either be created or spent, and never amended. However, this restriction becomes cumbersome, especially when we want to deal with smaller fractions of our balances. E.g. Deposit $10 —> Send $5 privately to Bob.

To get around this restriction, we have a set of internal operations that join (combine) and split notes. That way, “spare change” notes can be formed and for instance ownership can be re-assigned to yourself.

OTC Swap

After finding a counter-party and negotiating the details of the swap, traders will mutually sign a message indicating that they agree to the terms of the trade:

[
    alice_note,
    bob_note,
    alice_nullifier,
    bob_nullifier,
    new_alice_note,
    new_bob_note
]

Then either trader can use these signatures to construct a zero-knowledge proof that changes ownership of the notes. Both traders do not need to be online for this step.

Swaps are atomic, meaning that in either case where the swap happens, or not; both traders are always left whole.

The Singularity is currently exploring privately matching trades via cryptographic means.

Two traders can use the singularity to swap notes in order to settle trades that have been discovered. In the early versions of The Singularity, this will take on the form of a trustless OTC trading feature similar to where traders privately settle agreements to trade assets directly without any outside observers’ knowledge.

Airswap