📌BiDirectionalPaymentChannel

Overview

The BiDirectionalPaymentChannel contract is designed to manage a two-way payment channel between two parties.

This type of channel allows these parties to conduct numerous transactions with each other off-chain, with the final settlement occurring on the Ethereum blockchain.

The primary advantage of this approach is the significant reduction in transaction fees and improved efficiency, as only two transactions (channel opening and closing) are recorded on the blockchain, regardless of the number of off-chain transactions conducted.

Methods

verify

Checks whether the provided signatures are valid for the given contract state (balances and nonce).

Parameters

Returns

challengeExit

Allows a user to propose a new state (balances and nonce) for the channel, secured by their signatures.

Parameters

withdraw

Enables a user to withdraw their balance from the contract after the challenge period has expired.

Last updated