Skip to content

Issue 156: Multi-Sig Merkle Batch Grant Approvals #273

@JerryIdoko

Description

@JerryIdoko

Description:
This issue optimizes the administrative overhead required to approve thousands of employee grants simultaneously.
Currently, a DAO multi-sig must individually sign and execute a transaction for every single employee onboarded.
We need to implement a batch_approve_merkle_root function to consolidate approvals into a single signature.
The admin compiles a CSV of 1,000 grants off-chain, hashes it into a Merkle tree, and submits the 32-byte root.
The core logic stores this single Approved_Root in Persistent storage, drastically reducing administrative gas costs.
Employees then call initialize_from_root, providing their specific Merkle proof to instantiate their personal schedule.
Security consideration: Prevent replay attacks where an employee uses the same proof to initialize two distinct schedules.
Handle the edge case where the admin needs to revoke a specific grant from the root before the employee initializes it.
If the submitted proof does not match the stored root hash, instantly return an Error::InvalidMerkleProof.
Emit a BatchRootApproved event, allowing off-chain indexers to notify the 1,000 employees that their grants are ready.
Optimize the Keccak256 or SHA256 verification loop in Rust to consume minimal Soroban CPU instructions.
Write unit tests generating deep Merkle trees to verify the proof validation logic scales efficiently.
Acceptance 1: Thousands of grants can be cryptographically authorized by the DAO in a single, cheap transaction.
Acceptance 2: Merkle proofs securely and flawlessly unpack into individual, immutable vesting schedules.
Acceptance 3: Employees cannot double-initialize or spoof their allocations against the published root hash.
Labels: optimization, cryptography, architecture

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions