Vessel
  • ⚓Introducing Vessel
    • Why Vessel Is The Exchange Crypto Needs?
    • Vessel's Roadmap for the Future of DeFi
  • ⚙️Technical Deep Dive
    • Sequencer
    • Prover
    • Contract
    • Data Availability
  • 💰VAELOB
    • Terminology
    • Order Book and AMM: Can We Have the Best of Both?
    • A Typical Trade in Vessel
    • Liquidity Pool Math
    • Concentrated Liquidity
    • Fee Calculation
    • Multi-Pool with Different Tick Spacing
  • 🎁Vessel Voyage
    • Vessel Mileage for Liquidity Providing
    • Vessel Coins for Referral
  • 🛳️Mainnet User Guide
    • Set up a Wallet
    • Deposit
    • Provide Liquidity to Vessel’s VAELOB
      • Access the Liquidity Pools
      • Add Liquidity
      • View Positions
      • Manage Positions
    • Trade
      • Order Types
      • Place Order
      • Cancel Order
      • Modify Order
      • Trading History
    • Internal Transfer - Send to Vessel's User
    • Withdraw Your Assets
    • Fees
      • Trading Fee
      • Gas Fee
      • AMM Fee
    • Trading Settings
  • 🛥️Testnet User Guide
    • Log in with Invitation Code
    • Setting up a Wallet
    • Switching Network
    • Funding Your Wallet
    • How to Deposit
    • How to Trade
    • How to Withdraw
    • Community Contribution
    • Vessel’s Referral Program
    • FAQs
  • 🗺️Smart Contract Deployments
  • 🐚Vessel Community Hub
    • Vessel Community Update: Q1 2024
    • Vessel Community Update: Q2 2024
    • Vessel Community Update: Q3 2024
  • 🎨Brand Kit
Powered by GitBook
On this page
  • SNARK Verifier
  • Inbound and Outbound Messages
  1. Technical Deep Dive

Contract

Vessel’s contract acts as a secure vault to store all user assets, allowing them to be moved only under the constraints of valid SNARK proofs. Unlike traditional DeFi contracts that encode all business logic in Solidity code, Vessel uses an on-chain state root to track changes in off-chain states such as user balances.

SNARK Verifier

SNARK proofs are verified by a public, upgradeable SNARK verifier. Since Vessel open-sources its circuit repository, anyone can generate the SNARK verifier and compare its bytecode with the on-chain verifier, ensuring that the on-chain state is updated according to the rules specified in the circuit.

Inbound and Outbound Messages

In some scenarios, the Merkle tree root alone does not capture all state changes. To address this, we introduce Inbound and Outbound Messages. Inbound Messages carry information from the smart contract to the off-chain system, while Outbound Messages carry information in the opposite direction. Inbound Messages are typically used in scenarios such as "Register" and "Deposit," whereas Outbound Messages are used for "Withdraw."

Messages in both channels are processed sequentially, allowing us to use an accumulated hash to track progress. This hash is encoded in the SNARK proof as a public instance, alongside the Merkle tree root.

PreviousProverNextData Availability

Last updated 11 months ago

⚙️