zendetsu
v0.1.0
Published
> This program is currently deployed on Solana Devnet. Mainnet deployment is in progress.
Downloads
96
Readme
Zendetsu Protocol
This program is currently deployed on Solana Devnet. Mainnet deployment is in progress.
Zendetsu is a trustless escrow protocol built on Solana. The core idea is simple — two parties want to transact but neither wants to go first. Zendetsu holds the funds on-chain and releases them only when the conditions both parties agreed to are met. No middleman, no bank, no lawyer needed.
The protocol is open source and built for developers. Integrate it into your dApp using @zende/sdk and your users get trustless escrow without you having to write a single Rust instruction. Escrow and trustless settlement are foundational to almost every dApp being built today — marketplaces, freelance platforms, gaming, DAOs, DeFi. Most teams end up rebuilding this from scratch every time. Zendetsu solves it once for the entire Solana ecosystem.
Program ID: GuDNhDbxfmpAt3zDg9TSPdzAYvARifeFTqUhQRtsmjuC (Devnet)
SDK: npm install @zende/sdk — npmjs.com/package/@zende/sdk
Site: zendetsu.vercel.app
Author: @web3pr0digydev
Escrow Modes
| Mode | How it works | |---|---| | Simple | Depositor locks funds. Both parties confirm and funds release instantly. If the timelock expires, the recipient can claim without waiting for the depositor. | | Milestone | Funds split across milestones by percentage. Depositor approves each one. Reject 3 times and the escrow auto-escalates to dispute. | | Timed | Funds release automatically at a set Unix timestamp. Recipient calls claim_release after the timer with no confirmation needed. | | MultiParty | Multi-sig escrow for group arrangements. Majority confirmation triggers release. |
Instructions
| Instruction | Who calls it | What it does | |---|---|---| | initialize_escrow | Depositor | Creates escrow and funds dual vaults (main and fee) | | confirm_release | Depositor or Recipient | Confirms release — both confirmed means instant payout | | claim_release | Recipient | Claims after timelock expires or release_at passes | | cancel_escrow | Depositor | Cancels and refunds — blocked once recipient joins | | ping | Either party | Resets inactivity timer | | claim_inactivity | Recipient | Claims if depositor goes inactive past timeout | | dispute_escrow | Either party | Freezes escrow and opens dispute | | resolve_dispute | Authority | Resolves with full payout to either party or a custom split | | approve_milestone | Depositor | Releases proportional funds for a milestone | | reject_milestone | Depositor | Increments rejection count and auto-disputes at the limit |
Architecture
Each escrow creates two PDAs. The Vault holds the principal amount going to the recipient. The Fee Vault holds the platform fee, paid out to treasury on settlement. Separating them at deposit time means fee collection is atomic with escrow creation and user funds never mix with protocol revenue.
Speed settings (Standard, Express, Instant) let both parties agree to shorten the timelock. One party alone cannot force it — both have to signal it.
Disputes go to a designated authority wallet which can send full funds to either side or split by any percentage.
Running the Tests
# Install dependencies
yarn install
# Build the program
anchor build
# Deploy to devnet
anchor program deploy
# Run the full test suite (17 tests)
anchor test --skip-deployAll 17 tests cover initialization, confirmation flows, cancel, ping, dispute, partial splits, milestone approve/reject, and timed release.
Project Structure
programs/zendetsu/src/
├── lib.rs # Program entry point and instruction routing
├── state/ # Escrow account structs and enums
├── instructions/
│ ├── initialize.rs
│ ├── confirm.rs
│ ├── claim.rs
│ ├── cancel.rs
│ ├── ping.rs
│ ├── inactivity.rs
│ ├── dispute.rs
│ ├── resolve.rs
│ └── milestone.rs
├── errors.rs
└── constants.rs
sdk/ # TypeScript SDK — npm install @zende/sdk
tests/
└── zendetsu.ts # Full integration test suitePart of the Zende ecosystem. Trustless escrow for anything that needs one.
