Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- omit in toc -->
# Contributing to TAP
# Contributing to Graph Tally

First off, thanks for taking the time to contribute! ❤️

Expand Down Expand Up @@ -100,7 +100,7 @@ Once it's filed:

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for TAP, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
This section guides you through submitting an enhancement suggestion for Graph Tally, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.

<!-- omit in toc -->
#### Before Submitting an Enhancement
Expand All @@ -119,7 +119,7 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/graphp
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
- **Explain why this enhancement would be useful** to most TAP users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
- **Explain why this enhancement would be useful** to most Graph Tally users. You may also want to point out the other projects that solved it better and which could serve as inspiration.

<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->

Expand Down
71 changes: 35 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,83 @@
# Timeline Aggregation Protocol (TAP)
# Graph Tally (Timeline Aggregation Protocol)

| Crate | Latest Version |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **tap_aggregator** | [![GHCR](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=tap_aggregator-*&label=ghcr.io)](https://github.com/graphprotocol/timeline-aggregation-protocol/pkgs/container/tap_aggregator) |
| **tap_core** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=tap_core-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |
| **tap_eip712_message** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=tap_eip712_message-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |
| **tap_graph** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=tap_graph-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |
| **tap_receipt** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=tap_receipt-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |
| Crate | Latest Version |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **graph_tally_aggregator** | [![GHCR](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=graph_tally_aggregator-*&label=ghcr.io)](https://github.com/graphprotocol/timeline-aggregation-protocol/pkgs/container/graph_tally_aggregator) |
| **graph_tally_core** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=graph_tally_core-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |
| **graph_tally_eip712_message** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=graph_tally_eip712_message-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |
| **graph_tally_graph** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=graph_tally_graph-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |
| **graph_tally_receipt** | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/timeline-aggregation-protocol?filter=graph_tally_receipt-*)](https://github.com/graphprotocol/timeline-aggregation-protocol/releases) |

## Overview

The TAP (Timeline Aggregation Protocol) facilitates a series of payments from a
sender to a receiver (TAP Receipts), who aggregates these payments into a single
payment (a Receipt Aggregate Voucher, or RAV). This aggregate payment can then be
verified on-chain by a payment verifier, reducing the number of transactions and
Graph Tally (formerly TAP - Timeline Aggregation Protocol) facilitates a series of payments from a
sender to a receiver (Receipts), who aggregates these payments into a single
payment (a Receipt Aggregate Voucher, or RAV). This aggregate payment can then be
verified on-chain by a payment verifier, reducing the number of transactions and
simplifying the payment process.

## Documentation for Individual Components

- [tap_aggregator](tap_aggregator/README.md)
- [tap_core](tap_core/README.md) - links to this `README` for now.
- [graph_tally_aggregator](crates/aggregator/README.md)

## Key Components

- **Sender:** Initiates the payment.
- **Receiver:** Receives the payment.
- **Signers:** Multiple signers authorized by the sender to sign receipts.
- **State Channel:** A one-way channel opened by the sender with the receiver
- **State Channel:** A one-way channel opened by the sender with the receiver
for sending receipts.
- **Receipt:** A record of payment sent by the sender to the receiver.
- **ReceiptAggregateVoucher (RAV):** A signed message containing the aggregate
- **ReceiptAggregateVoucher (RAV):** A signed message containing the aggregate
value of the receipts.
- **tap_aggregator:** A service managed by the sender that aggregates receipts
- **graph_tally_aggregator:** A service managed by the sender that aggregates receipts
on the receiver's request into a signed RAV.
- **EscrowAccount:** An account created in the blockchain to hold funds for
- **EscrowAccount:** An account created in the blockchain to hold funds for
the sender-receiver pair.

## Security Measures

- The protocol uses asymmetric cryptography (ECDSA secp256k1) to sign and
- The protocol uses asymmetric cryptography (ECDSA secp256k1) to sign and
verify messages, ensuring the integrity of receipts and RAVs.

## Process

1. **Opening a State Channel:** A state channel is opened via a blockchain
1. **Opening a State Channel:** A state channel is opened via a blockchain
contract, creating an EscrowAccount for the sender-receiver pair.
2. **Sending Receipts:** The sender sends receipts to the receiver through the
2. **Sending Receipts:** The sender sends receipts to the receiver through the
state channel.
3. **Storing Receipts:** The receiver stores the receipts and tracks the
3. **Storing Receipts:** The receiver stores the receipts and tracks the
aggregate payment.
4. **Creating a RAV Request:** A RAV request consists of a list of receipts and,
4. **Creating a RAV Request:** A RAV request consists of a list of receipts and,
optionally, the previous RAV.
5. **Signing the RAV:** The receiver sends the RAV request to the tap_aggregator,
5. **Signing the RAV:** The receiver sends the RAV request to the graph_tally_aggregator,
which signs it into a new RAV.
6. **Tracking Aggregate Value:** The receiver tracks the aggregate value and
6. **Tracking Aggregate Value:** The receiver tracks the aggregate value and
new receipts since the last RAV.
7. **Requesting a New RAV:** The receiver sends new receipts and the last RAV
to the tap_aggregator for a new RAV.
8. **Closing the State Channel:** When the allocation period ends, the receiver
7. **Requesting a New RAV:** The receiver sends new receipts and the last RAV
to the graph_tally_aggregator for a new RAV.
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.

## Performance Considerations

- The primary performance limitations are the time required to verify receipts
and network limitations for sending requests to the tap_aggregator.
- The primary performance limitations are the time required to verify receipts
and network limitations for sending requests to the graph_tally_aggregator.

## Use Cases

- The TAP protocol is suitable for systems that need unidirectional, parallel
micro-payments that are too expensive to redeem individually on-chain. By
aggregating operations off-chain and redeeming them in one transaction, costs
- Graph Tally is suitable for systems that need unidirectional, parallel
micro-payments that are too expensive to redeem individually on-chain. By
aggregating operations off-chain and redeeming them in one transaction, costs
are drastically reduced.

## Compatibility

- The current implementation is for EVM-compatible blockchains, with most of the
- The current implementation is for EVM-compatible blockchains, with most of the
system being off-chain.

## Contributing

Contributions are welcome! Please submit a pull request or open an issue to
Contributions are welcome! Please submit a pull request or open an issue to
discuss potential changes.
Also, make sure to follow the [Contributing Guide](https://github.com/graphprotocol/timeline-aggregation-protocol/blob/main/CONTRIBUTING.md).
Also, make sure to follow the [Contributing Guide](https://github.com/graphprotocol/timeline-aggregation-protocol/blob/main/CONTRIBUTING.md).
Loading
Loading