You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TAP (Timeline Aggregation Protocol) facilitates a series of payments from a sender to a receiver, who aggregates these payments into a single payment. This aggregate payment can then be verified on-chain by a payment verifier, reducing the number of transactions and simplifying the payment process.
6
+
7
+
## Key Components
8
+
9
+
-**Sender:** Initiates the payment.
10
+
-**Receiver:** Receives the payment.
11
+
-**Signers:** Multiple signers authorized by the sender to sign receipts.
12
+
-**State Channel:** A one-way channel opened by the sender with the receiver for sending receipts.
13
+
-**Receipt:** A record of payment sent by the sender to the receiver.
14
+
-**ReceiptAggregateVoucher (RAV):** A signed message containing the aggregate value of the receipts.
15
+
-**tap_aggregator:** An entity managed by the sender that signs RAV requests.
16
+
-**EscrowAccount:** An account created in the blockchain to hold funds for the sender-receiver pair.
17
+
18
+
## Security Measures
19
+
20
+
- The protocol uses asymmetric cryptography to sign and verify messages, ensuring the integrity of receipts and RAVs.
21
+
22
+
## Process
23
+
24
+
1.**Opening a State Channel:** A state channel is opened via a blockchain contract, creating an EscrowAccount for the sender-receiver pair.
25
+
2.**Sending Receipts:** The sender sends receipts to the receiver through the state channel.
26
+
3.**Storing Receipts:** The receiver stores the receipts and tracks the aggregate payment.
27
+
4.**Creating a RAV Request:** A RAV request consists of a list of receipts and, optionally, the previous RAV.
28
+
5.**Signing the RAV:** The receiver sends the RAV request to the tap_aggregator, which signs it into a RAV.
29
+
6.**Tracking Aggregate Value:** The receiver tracks the aggregate value and new receipts since the last RAV.
30
+
7.**Requesting a New RAV:** The receiver sends new receipts and the last RAV to the tap_aggregator for a new RAV.
31
+
8.**Closing the State Channel:** When the allocation period ends, the receiver can send the last RAV to the blockchain and receive payment from the EscrowAccount.
32
+
33
+
## Performance Considerations
34
+
35
+
- The primary performance limitations are the time required to verify receipts and network limitations for sending requests to the tap_aggregator.
36
+
37
+
## Use Cases
38
+
39
+
- The TAP protocol is suitable for systems with sequential operations that are too expensive to redeem individually on-chain. By aggregating operations and redeeming them in one transaction, costs can be reduced.
40
+
41
+
## Compatibility
42
+
43
+
- The current implementation is for EVM-compatible blockchains, with most of the system being off-chain.
44
+
45
+
## Contributing
46
+
47
+
Contributions are welcome! Please submit a pull request or open an issue to discuss potential changes.
48
+
Also, make sure to follow the [Contributing Guide](CONTRIBUTING.md).
/// The EIP712 domain separator builder for the TAP protocol.
97
+
///
98
+
/// This is the current domain separator that is used for the [EIP712](https://eips.ethereum.org/EIPS/eip-712) signature scheme.
99
+
///
100
+
///
101
+
/// It's used to validate the signature of the `ReceiptAggregateVoucher` and `Receipt` structs.
102
+
///
103
+
/// You can take a look on deployed [TAPVerfiers](https://github.com/semiotic-ai/timeline-aggregation-protocol-contracts/blob/4dc87fc616680c924b99dbaf285bdd449c777261/src/TAPVerifier.sol)
0 commit comments