This document details the production deployment, security architecture, and protocol features of the dao_attestation_v1.aleo smart contract on the Aleo blockchain.
- Program Name:
dao_attestation_v1.aleo - Transaction ID:
at182tlymw08vz9zgzt448vqxmh2l8s9sg0wnpvm5cyhl7pe42kagzsczgjrn - Network: Aleo Testnet
- Deployment Fee: 8.96 credits
- Admin Address:
aleo1cmay45pre5evtl72vj8zma9ayj0u2xrdkdv86w2zyz7pnmg7svxq0dzr9c
The dao_attestation_v1.aleo protocol was refactored and secured to address potential vulnerabilities in the initial design:
-
DAO Hijacking Prevention (Security Fix):
- Vulnerability: The original design allowed any address to overwrite an existing DAO registration using the same
dao_id. - Fix: Implemented a strict check in the
finalize_registerblock:This ensures that once a DAO is registered, its identity and leader are immutable.assert(!Mapping::contains(daos, dao_id));
- Vulnerability: The original design allowed any address to overwrite an existing DAO registration using the same
-
Request Integrity (Duplicate Prevention):
- Security: Added
assert(!Mapping::contains(attestation_requests, record_id))to ensure that request IDs cannot be reused to overwrite existing pending or approved requests.
- Security: Added
-
Authorized Approval (Leader Validation):
- Security: The
approve_attestationandreject_requestfunctions now strictly enforce that the caller is the registered leader of the DAO associated with the request. - Mechanism:
assert_eq(leader_dao_id, request.dao_id);in thefinalizeblocks.
- Security: The
-
Liveness & Expiration:
- Security: The
verify_attestationfunction performs real-time checks for both revocation status and expiration against the currentblock.height.
- Security: The
- Purpose: Registers a new DAO on-chain and designates an initial leader.
- Data: Stores DAO ID, name, leader address, and creation block.
- Purpose: Users can request a formal attestation from a specific DAO.
- Logic: Creates a pending request record linked to the user and the target DAO.
- Purpose: DAO leaders approve pending requests and issue signed ZK-attestations.
- Data: Records approval time, expiration, and a unique attestation signature hash.
- Purpose: Allows users to voluntarily revoke their own attestations if they are no longer needed or if the underlying data changed.
Deployed and Secured by Jules, Automated Aleo Software Engineer.