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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [
[workspace.package]
edition = "2024"
rust-version = "1.85.1"
repository = "https://github.com/eigerco/zcash-namada-airdrop"
repository = "https://github.com/equilibriumco/zcash-namada-airdrop"
license = "MIT"

[workspace.dependencies]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

Zair offers privacy-preserving tools for Zcash airdrops by allowing users to prove they own eligible notes on Zcash while preserving the privacy of the notes owned and the amounts claimed.

**[Link to Documentation](https://eigerco.github.io/zair)**
**[Link to Documentation](https://equilibriumco.github.io/zair)**

**This project has not been audited.**

## How it works

An organizer publishes a snapshot of the Zcash chain at a given height. Claimants scan for their eligible notes, then generate a ZK proof per note that demonstrates note ownership and unspentness without revealing the Zcash nullifier. Each proof instead exposes a domain-separated _airdrop nullifier_ for double-claim prevention and is signed with a spend-authorizing key bound to a target-chain message. Verifiers then check the proofs against the snapshot and de-duplicate by airdrop nullifier.

See the [Introduction](https://eigerco.github.io/zair/introduction.html) for more details.
See the [Introduction](https://equilibriumco.github.io/zair/introduction.html) for more details.

## Crates

Expand All @@ -32,7 +32,7 @@ See the [Introduction](https://eigerco.github.io/zair/introduction.html) for mor

## Getting started

See [Getting Started](https://eigerco.github.io/zair/getting-started/index.html) for build instructions and setup. The quickest path is using Nix:
See [Getting Started](https://equilibriumco.github.io/zair/getting-started/index.html) for build instructions and setup. The quickest path is using Nix:

```bash
nix develop
Expand All @@ -41,7 +41,7 @@ cargo build --release

## Usage

Below is a minimal example workflow. See the [CLI Reference](https://eigerco.github.io/zair/cli/index.html) for details or check `zair --help` for command options.
Below is a minimal example workflow. See the [CLI Reference](https://equilibriumco.github.io/zair/cli/index.html) for details or check `zair --help` for command options.

### 1. Derive keys

Expand Down
4 changes: 2 additions & 2 deletions docs/src/airdrop-proofs/orchard.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Implementation:

Patched dependencies:

- `orchard/` from [https://github.com/eigerco/orchard](/url)
- `halo2-gadgets/` from [https://github.com/eigerco/halo2](/url)
- `orchard/` from [https://github.com/equilibriumco/orchard](/url)
- `halo2-gadgets/` from [https://github.com/equilibriumco/halo2](/url)

## Proof statement

Expand Down
2 changes: 1 addition & 1 deletion docs/src/airdrop-proofs/sapling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Implementation:

Patched dependency:

- `sapling-crypto/` from [https://github.com/eigerco/sapling-crypto](/url)
- `sapling-crypto/` from [https://github.com/equilibriumco/sapling-crypto](/url)

## Proof statement

Expand Down
47 changes: 34 additions & 13 deletions docs/src/integration/namada.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Integration: Namada

This page describes an example integration of ZAIR in Namada. You can find the latest source code hosted at [GitHub](https://github.com/eigerco/namada) (_latest commit at the time of writing: [`e0468b1`](https://github.com/eigerco/namada/commit/e0468b1308a5a397e219e754fc39eb31c4013f8d)_).
This page describes an example integration of ZAIR in Namada. You can find the latest source code hosted at [GitHub](https://github.com/equilibriumco/namada) (_latest commit at the time of writing: [`463f11c5f`](https://github.com/equilibriumco/namada/commit/463f11c5f6f2924153f9c751b06b0b60ec0e421d)_).

## Table of Contents

Expand Down Expand Up @@ -46,14 +46,16 @@ mv config.json *.params *.bin airdrop/

The `airdrop` directory should contain the following files:

| File | Description |
| --------------------------- | ---------------------------- |
| `config.json` | Airdrop configuration |
| `setup-sapling-pk.params` | Sapling proving key |
| `setup-sapling-vk.params` | Sapling verifying key |
| `setup-orchard-params.bin` | Orchard proving parameters |
| `snapshot-sapling.bin` | Sapling snapshot nullifiers |
| `snapshot-orchard.bin` | Orchard snapshot nullifiers |
| File | Description |
| -------------------------- | --------------------------- |
| `config.json` | Airdrop configuration |
| `setup-sapling-pk.params` | Sapling proving key |
| `setup-sapling-vk.params` | Sapling verifying key |
| `setup-orchard-params.bin` | Orchard proving parameters |
| `snapshot-sapling.bin` | Sapling snapshot nullifiers |
| `snapshot-orchard.bin` | Orchard snapshot nullifiers |
| `gaptree-sapling.bin` | Sapling gap tree |
| `gaptree-orchard.bin` | Orchard gap tree |

See [`zair config`](../cli/config.md) and [`zair setup`](../cli/setup.md) for the full flag references.

Expand Down Expand Up @@ -110,11 +112,31 @@ With the chain running, submit a claim transaction using the desired account add
namada client claim-airdrop \
--base-dir .namada/validator-0 \
--source <ADDRESS> \
--seed-file-path <SEED_FILE> \
--seed-file-path <SEED_FILE_PATH> \
--account-id <ACCOUNT_ID> \
--birthday <BIRTHDAY> \
--sapling-snapshot <SAPLING_SNAPSHOT> \
--orchard-snapshot <ORCHARD_SNAPSHOT> \
--sapling-gap-tree <SAPLING_GAPTREE> \
--orchard-gap-tree <ORCHARD_GAPTREE> \
--gas-limit 300000
```

#### CLI Parameters

| Parameter | Required | Description |
| -------------------- | ----------- | ------------------------------------------------------- |
| `--source` | Yes | The claiming address |
| `--seed` | Yes | 64-byte seed as hex |
| `--account-id` | Yes | ZIP-32 account index for deriving keys |
| `--birthday` | Yes | Shielded transaction scan start height |
| `--sapling-snapshot` | Conditional | Sapling nullifier snapshot (required for Sapling pools) |
| `--orchard-snapshot` | Conditional | Orchard nullifier snapshot (required for Orchard pools) |
| `--sapling-gap-tree` | Optional | Sapling gap tree for faster claiming |
| `--orchard-gap-tree` | Optional | Orchard gap tree for faster claiming |
| `--lightwalletd-url` | Optional | lightwalletd gRPC endpoint |
| `--gas-limit` | Yes | Gas limit for the transaction |

You can verify the claim by querying the account balance before and after:

```bash
Expand Down Expand Up @@ -214,7 +236,6 @@ See [Airdrop Nullifiers](../concepts/airdrop-nullifier.md) for more details.

ZAIR supports a standard signature scheme over implementation-specific binary-encoded messages. The message format differs between the Plain and SHA256 implementations - see the respective sections below.


A claimant provides their binary-encoded message along with their proofs to ZAIR and signs the message to generate a standard signature cryptographically linking the message to the hash of the proof. The signature proves the claimant controls the private spending key associated with the proof.

### Signature Verification
Expand Down Expand Up @@ -354,5 +375,5 @@ The verification flow runs in this order:

## References

- [Plain Implementation](https://github.com/eigerco/namada/tree/main)
- [SHA256 Implementation](https://github.com/eigerco/namada/tree/sha256-value-commitment)
- [Plain Implementation](https://github.com/equilibriumco/namada/tree/main)
- [SHA256 Implementation](https://github.com/equilibriumco/namada/tree/sha256-value-commitment)
Loading