User Verification System
Objective
To ensure that only genuine Cult NFT holders can interact with DAO logic and participate in governance decisions.
Logic
Each user has an SPL token account that holds their NFTs. The program checks if this account holds at least one Cult NFT. If so, the user is verified and granted access to governance features.
Mathematical Model
Let B(u) = NFT balance of user u
Then: Verified(u) ⇔ B(u) ≥ 1
Anchor Code
pub fn verify_user(ctx: Context<VerifyUser>) -> Result<()> {
let nft_account = &ctx.accounts.nft_account;
require!(nft_account.amount >= 1, CustomError::NotVerified);
Ok(())
}
Security Notes
Cannot be bypassed or faked; relies directly on on-chain NFT ownership.
If the NFT is transferred, verification status is automatically lost.
Uses Anchor’s built-in constraints to protect access to critical functions.
Last updated