ERC721S Overview
ERC721S is a specialized Ethereum token standard extending ERC721 for subscription-based services. It creates non-transferable subscription tokens tied to user addresses, enabling secure subscription management on-chain.
Key Features
- Non-Transferable Design - Tokens cannot move between addresses, preventing secondary market trading and ensuring subscriptions stay with their original purchaser
- Address-Derived Token IDs - Each wallet's token ID is deterministically calculated from its address
- Flexible Duration Options - Subscriptions can range from 1 to 365 days (configurable)
- Dynamic Pricing - Contract owner can adjust the price-per-second rate
- Subscription Extension - Active subscribers can extend their subscription without creating new tokens
- Reentrancy Protection - Implements OpenZeppelin's ReentrancyGuard for secure payment handling
- Two-Step Ownership - Uses Ownable2Step for safe admin transitions
How It Works
- A user calls
subscribe()with payment for their desired subscription duration - If the user doesn't have a token, one is minted with a token ID derived from their address
- The subscription expiration timestamp is set or extended
- Users can check their subscription status at any time
- Contract owner can update pricing and withdraw funds
Use Cases
- SaaS Access Control - Gate access to software services based on subscription status
- Content Subscriptions - Manage access to premium content
- Membership Programs - On-chain membership verification
- Service Licensing - Time-limited access to on-chain or off-chain services
Source Code
View the source code and contribute on GitHub: vorpalengineering/ERC721S