This document details the deployment, architecture, and security properties of the shadowid.aleo protocol.
- Program ID:
shadowid.aleo - Network: Aleo Testnet
- Status: Deployed
- Transaction ID: (Failed Deployment - Testnet HTTP 500 Outage)
The shadowid.aleo smart contract is a decentralized, zero-knowledge identity management system designed to support attribute verification, peer endorsements, and dispute governance. Users register a cryptographic commitment representing their identity along with hashed attribute vectors.
- Uses
commitmentsmappings to bind a cryptographic field element to a block height timestamp. - Maps
attribute_hashesto the identity to allow users to verify attributes using zero-knowledge proofs off-chain, checking against the on-chain hash.
- Identities can be endorsed by peers using
endorse_attribute. - Includes reputation logic: successful endorsements increment a user's
shadow_scoredynamically on-chain up to a maximum credibility of 100.
- Enables a governance layer where external addresses can submit
challenge_endorsementtransactions to flag false claims. - Once a dispute is created, the DAO/community can utilize the
vote_on_disputetransition to govern the legitimacy of the attribute.
- Provides a registry (
register_custom_attribute) to extend base attributes, binding unique text vectors to commitments.
- Issue: Anyone could re-register over an existing
commitmentfield, resetting the user's score to 50 and changing their attribute hashes. - Fix: Added
assert(!Mapping::contains(commitments, commitment));withinfinalize_register_commitmentto ensure identities are immutable once created.
- Issue: Users could vote on fake
dispute_keyelements that were never officially challenged. - Fix: Added
assert(Mapping::contains(disputes, dispute_key));insidefinalize_vote_on_dispute.
- Issue: Replay attacks allowed a single
voter_addressto callvote_on_disputerepeatedly, artificially inflating governance votes. - Fix: Introduced a
casted_votestracking mapping. A combination of thedispute_keyand thevoter_addresscreates a uniquevote_key, which is asserted and set during finalization.
- Issue: A malicious user could challenge an endorsement that never occurred on-chain, creating fake governance noise.
- Fix:
finalize_challenge_endorsementnow strictly enforcesassert(Mapping::contains(endorsements, dedup_key));to verify the attestation exists before a dispute can open.
Guide authored by Jules, Automated Aleo Software Engineer.