Skip to content

Gates

The GateSDK manages the Akita gate system — a composable access control mechanism with 16 different subgate types. Gates can be used to restrict who can perform specific operations.

The gate system has two layers:

  1. Gate contract — The main gate that coordinates subgate checks
  2. Subgates — Individual contracts that check specific conditions

A gate check passes if the caller satisfies all required subgates (AND logic).

SubgateDescription
Asset GateRequires holding a minimum amount of a specific ASA
Akita Referrer GateRequires being referred by a registered referrer
Merkle Address GateRequires address to be in a merkle tree (allowlist)
Merkle Asset GateRequires holding an asset from a merkle tree set
NFD GateRequires owning a specific NFD (Non-Fungible Domain)
NFD Root GateRequires owning an NFD under a specific root
Poll GateRequires having voted in a specific poll
Social Activity GateRequires minimum social activity level
Social Follower Count GateRequires minimum follower count
Social Follower Index GateRequires following specific accounts
Social Impact GateRequires minimum social impact score
Social Moderator GateRequires moderator status
Staking Amount GateRequires staking a minimum amount
Staking Power GateRequires minimum staking power
Subscription GateRequires an active subscription to a service
Subscription Streak GateRequires a minimum subscription payment streak
import { GateSDK } from '@akta/sdk/gates'
const gate = new GateSDK({ algorand })

Use the Asset Gate to require holding a minimum token balance:

Gate + Asset Subgate (min 1000 AKTA) → Only AKTA holders

Use the Merkle Address Gate with a merkle tree of approved addresses:

Gate + Merkle Address Subgate → Only allowlisted addresses

Combine multiple social gates:

Gate + Social Impact Subgate (min 100)
+ Social Follower Count Subgate (min 50)
→ Reputable community members only
Gate + Subscription Subgate (service ID)
+ Subscription Streak Subgate (min 3 payments)
→ Active subscribers with payment history

Gates integrate with the wallet plugin system through the GatePlugin. When a gate plugin is installed on a wallet, it can gate any plugin execution:

Wallet → Gate Plugin → Check subgates → Allow/Deny → Execute plugin

See Wallet Plugins for gate plugin usage.