SPL Governance voter weight plugin for IAM Protocol. Adds human liveness verification to DAO governance on Solana.
DAOs on Realms can configure this plugin to require voters to be recently verified humans with sustained behavioral history. Bots, automated scripts, and dormant wallets are excluded from governance.
Designed to layer on top of existing voter weight plugins. Chain IAM with token-voter to require both token holdings and proof of human presence. Chain with quadratic voting for verified-human quadratic weights.
- DAO admin calls
create_registrarwith a minimum Trust Score and maximum verification age - Each voter calls
create_voter_weight_recordto initialize their record - Before voting, the voter calls
update_voter_weight_recordwhich reads their IAM IdentityState PDA cross-program and checks:- Trust Score >= minimum configured by the DAO (proves sustained behavioral history)
- Last verification is recent enough (proves the human is actively engaged)
- If both pass, voter_weight is set to 1 with a short expiry (~40 seconds)
- The governance program reads the VoterWeightRecord and allows the vote
The voter weight expires after ~100 slots, forcing the update to happen in the same transaction as the governance action. This prevents stale weight records from being reused.
| Instruction | Purpose |
|---|---|
create_registrar |
DAO admin configures min Trust Score and max verification age |
update_registrar |
DAO admin updates configuration parameters |
close_registrar |
DAO admin closes the registrar and reclaims rent |
create_voter_weight_record |
Initialize a voter's weight record (born expired) |
update_voter_weight_record |
Read IAM IdentityState, validate trust score and recency, set voter_weight = 1 |
close_voter_weight_record |
Voter closes their record and reclaims rent |
create_max_voter_weight_record |
DAO admin initializes quorum tracking (realm authority required) |
update_max_voter_weight_record |
DAO admin sets the max voter weight (never expires, admin-managed) |
Voter wants to cast a vote
→ calls update_voter_weight_record
→ plugin reads IAM IdentityState PDA (cross-program, no CPI)
→ checks trust_score >= min_trust_score
→ checks verification age < max_verification_age
→ sets voter_weight = 1, expiry = current_slot + 100
→ governance program reads VoterWeightRecord
→ vote is accepted
The plugin reads the IAM IdentityState account via raw byte deserialization (not Anchor CPI) to avoid version coupling with the IAM Anchor program.
Devnet: 99nwXzcugse3x8kxE9v6mxZiq8T9gHDoznaaG6qcw534
anchor buildRequires:
- Anchor 0.31.1
- Solana CLI 2.2.1
- Rust 1.91.0
# Generate test fixtures (one-time)
npx tsx scripts/generate-test-fixtures.ts
# Start local validator with genesis programs and fixture accounts
solana-test-validator \
--bpf-program 99nwXzcugse3x8kxE9v6mxZiq8T9gHDoznaaG6qcw534 target/deploy/iam_voter_weight.so \
--bpf-program GZYwTp2ozeuRA5Gof9vs4ya961aANcJBdUzB7LN6q4b2 tests/fixtures/iam_anchor.so \
--bpf-program GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw tests/fixtures/spl_governance.so \
--account 63cKuvoe9WuNH9Ds6aXF7iSc4jHmJc4ZkxdHTaitJ5tr tests/fixtures/identity-state-a.json \
--account 73gAPp8WuNzdHh4E5ySQNFR3jpw8qs5YFaYPp8iyt6FZ tests/fixtures/identity-state-b.json \
--reset --quiet
# Run all tests (in a separate terminal)
npx ts-mocha -p ./tsconfig.json -t 120000 tests/**/*.ts38 tests: 20 unit tests (byte layout, PDA derivation, validation logic) + 18 integration tests (real transactions against local validator with IAM Anchor and spl-governance loaded as genesis programs).
| Crate | Version | Purpose |
|---|---|---|
| anchor-lang | 0.31.1 | Anchor framework |
| spl-governance-mythic | 3.1.2 | Realm data validation |
| spl-governance-addin-api-mythic | 0.1.6 | VoterWeightRecord type |
| solana-program | 2.2.1 | Solana runtime |
The Realms V2 UI supports custom voter weight plugins. Any DAO admin can configure IAM as their voter weight addin by pasting the program ID (99nwXzcugse3x8kxE9v6mxZiq8T9gHDoznaaG6qcw534) in the "Custom voting program ID" field in the realm settings. No frontend changes required.
- IAM Protocol -- behavioral proof-of-humanity on Solana
- Pulse SDK -- client-side verification SDK
- Protocol Core -- on-chain identity programs
- Governance Program Library -- reference voter weight plugins
MIT