project screenshot 1
project screenshot 2
project screenshot 3

StreamCrypt

Private and secure streaming of payments with confidentiality at its core.

StreamCrypt

Created At

ETHGlobal Bangkok

Winner of

Inco Network - Best use of confidentiality for DeFi

Project Description

The StreamCrypt Protocol is an innovative implementation on the INCO Rivest Testnet, enabling users to securely stream tokens while maintaining privacy. Leveraging the TFHE (Fully Homomorphic Encryption) library, this protocol ensures the confidentiality of streamed amounts and their status, exposing only the sender and receiver.

Core features include the ability to start, stop, and withdraw from streams while keeping critical data private. The system operates with a rate-per-second model, where tokens are continuously streamed over time.

Key functionalities include:

Start Stream: Creates an open-ended stream between a sender and receiver. Stop Stream: Allows senders to cancel streams, transferring any remaining balance to the receiver. Withdraw from Stream: Receivers can withdraw streamed tokens by providing encrypted proof of the requested amount. Stream Balance: Both senders and receivers can view their streamed balance via encrypted calculations. The project also features minting capabilities for both private and public tokens and incorporates TFHE encryption to validate and process requests securely.

How it's Made

This project was built by extending a custom ERC20 contract to support private streaming functionalities. The contract, ConfidentialStreamERC20.sol, introduces several key functions: startStream, stopStream, withdrawFromStream, and viewAlreadyStreamedBalance.

Technologies Used Blockchain:

Deployed on the INCO Rivest Testnet for testing and demonstration. Implemented token streaming using ERC20 standards with confidentiality enhancements. TFHE (Fully Homomorphic Encryption):

Used to encrypt and validate critical transaction details such as streamed amounts. Ensures secure interactions by processing encryptedAmount inputs with inputProof for withdrawal and stream management. Smart Contract Development:

Solidity was used to build the contract. Advanced encryption handling incorporated for private transactions. Testing Framework:

Comprehensive testing with TypeScript and Hardhat to simulate use cases. Functionalities such as minting, starting, withdrawing from streams, and cancellation were validated with pnpm.

background image mobile

Join the mailing list

Get the latest news and updates