What is StackGate?
StackGate is a decentralized access control system built on the
Stacks blockchain. It allows projects to manage
who can access features, launches, or private resources
using on-chain smart contracts instead of centralized databases.
Why StackGate?
- On-chain access control (no Web2 trust)
- Transparent and auditable permissions
- Admin-controlled approval flow
- Easy frontend integration
- Real on-chain transactions (not fake activity)
Core Architecture
StackGate is modular and built using multiple smart contracts:
- Allowlist Contract – Grants or revokes access
- Access Request Contract – Records user requests on-chain
- Frontend – Connects wallets and enforces gating logic
Allowlist Contract
The allowlist contract is the core gatekeeper. Only the admin can add or
remove wallets.
add-wallet – Admin grants access
remove-wallet – Admin revokes access
is-allowed – Anyone can check access
This contract is unchanged and acts as the final authority.
Access Request Contract
This contract allows users to request access directly on-chain.
Each request is a real blockchain transaction.
- Users can request access multiple times
- Each request updates on-chain stats
- No automatic approval (admin decides)
Stored data per wallet:
- Request count
- Last request block height
Access Flow (How It Works)
User Wallet
|
| request-access() (transaction)
v
Access Request Contract
|
| admin reviews requests (read-only)
v
Admin Decision
|
| add-wallet() (transaction)
v
Allowlist Contract
|
| is-allowed() check
v
Access Granted
Frontend Integration
The frontend connects a Stacks wallet and performs:
- Wallet connection (Hiro / Xverse)
- Read-only access checks
- Request access transactions
- Admin-only allowlist actions
Access is granted only if the wallet is allowlisted.
Why This Design Is Correct
- No automatic approvals (security first)
- Clear separation of concerns
- Scalable and modular
- Reviewer-friendly architecture
- Legitimate on-chain activity
Use Cases
- Token launch allowlists
- Early access programs
- DAO membership gating
- Private beta features
- Community onboarding