Skip to content

InternetMaximalism/intmax2-zkp

Repository files navigation

Intmax2-ZKP

Rust License Build Status Version

Intmax2 is an innovative blockchain scaling protocol utilizing Zero-Knowledge Rollups. It significantly reduces the computational and data load on the underlying Layer 1 blockchain by shifting nearly all computational and storage responsibilities to client-side operations.

Features

  • Stateless Block Production: Block producers only periodically commit transaction sets, distribute inclusion proofs, and aggregate sender signatures.

  • Permissionless Operation: Anyone can participate in block production without prior permission or specialized resources.

  • Client-side Computation: Minimizes on-chain data and computation by moving these processes off-chain.

  • High Scalability: The architecture scales efficiently with an increasing number of users.

Circuit Descriptions

Validity Circuit

Directory: src/circuits/validity/

Intmax2 Validity Circuit

The Validity Proof is a ZK circuit designed to demonstrate the legitimacy of public state transitions and transaction structures within blocks submitted to Intmax2's rollup. This proof is recursive, meaning it references the Validity Proof of the preceding block to generate new proofs.

Key Roles:

  • Proof of correctness for public state transitions within blocks
  • Validation of transactions within blocks
  • Maintenance of system-wide integrity

Balance Circuit

Directory: src/circuits/balance/

Intmax2 Balance Proof

The Balance Proof is a recursive ZK circuit that verifies the correct updating of individual user account balances. It can demonstrate the sending and receiving of funds and deposit processes.

Key Roles:

  • Proof of balance correctness for each account
  • Assurance of transaction order and accuracy
  • Protection of individual user privacy

Receive Transfer Circuit

When a user A receives assets from another user B, user A's balance proof A is updated using user B's balance proof B, increasing user A's balance. In this case, the public state of user B's balance proof B needs to be older than user A's public state.

Intmax2_receive_transfer

Receive Deposit Circuit

To receive tokens deposited to the contract, the user needs to have already updated their balance proof to the block that includes the deposit. After that, they can update their balance proof using the deposit Merkle proof.

Intmax_receive_deposit

Update Circuit

If no tx has been sent to a new block, the balance proof can be updated using a validity proof with a new public state.

Intmax2_update

Send Circuit

To synchronize the balance proof to the block where a tx was sent, the validity proof of the block where the tx was sent

Intmax2_send

Withdrawal Circuit

Directory: src/circuits/withdrawal/

Intmax2_withdrawal_proof

The Withdrawal Proof is a ZK circuit that validates the legitimacy of withdrawal requests when users transfer assets from Intmax2 to Ethereum. It allows for the aggregation of multiple withdrawal requests into a single proof, which can be submitted to Ethereum by an aggregator to make funds accessible.

Key Roles:

  • Proof of validity for asset withdrawal processes to Ethereum
  • Efficiency through batch processing of multiple withdrawal requests

Claim Circuit

Directory: src/circuits/claim/

Intmax_claim_proof

The Claim Proof is a ZK circuit used to verify that a given address meets the conditions for privacy mining. It allows for the aggregation of multiple withdrawal requests into a single proof, which can be submitted to Ethereum by an aggregator to make funds accessible.

Key Role:

  • Verification of prerequisites for privacy mining, such as the validity of the duration of stay

Proof of Innocence

Directory: src/circuits/proof_of_innocence/

The Proof of Innocence is a ZK circuit designed to prove the relationship between deposits and withdrawals without revealing the details of transfers within the network. It is used to disclose the minimum necessary information while maintaining privacy.

Running Tests

To run the test:

cargo test -r test_e2e

Dependencies

This project relies on the following custom repositories:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •