Core Responsibilities
Permission management and delegation system for all RTA events. EventManager is upgradable and acts as the sole authorized caller for EventFactory’s restricted post-minting functions and operations.Permission Validation
EventManager centralizes all authorization logic for event operations:- NFT Owner: Current holder of the event NFT
- Event Delegate: Address specifically authorized for the event
- Global Whitelist: Platform-wide authorized agents
Delegation Proxy System
EventManager deploys lightweight proxy contracts for event-specific delegation:Delegation Implementation
Proxy Deployment
The system uses OpenZeppelin’s Clones library for gas-efficient proxy deployment:Master Implementation
The Delegation contract serves as a simple stateful record:Authorized Operations
Metadata Management
EventManager provides controlled access to event metadata updates:Reserve Price Updates
Price modifications are allowed only before event start:Event Finalization
The manager handles the complex finalization process:Global Whitelist System
Platform-Wide Permissions
EventManager maintains a global whitelist for trusted operators:CreationWrapper Integration
Batched Operations
EventManager works with CreationWrapper for atomic event creation and delegation:Upgradeability Pattern
UUPS Implementation
EventManager uses OpenZeppelin’s UUPSUpgradeable pattern:Upgrade Considerations
- Delegation proxies continue working with new EventManager versions
- Storage layout must be preserved between upgrades
- Owner controls all upgrade decisions
Permission Flow Examples
Standard Delegation Flow
Global Whitelist Flow
Gas Optimization
Minimal Proxy Pattern
Using Clones instead of full contract deployment saves significant gas:- Full Delegation contract deployment: ~200,000 gas
- Minimal proxy deployment: ~40,000 gas
- Gas savings: ~80% per delegation setup
Storage Layout
Efficient mapping structure minimizes storage reads:Design Advantages
- Separation of Concerns: Permission logic separated from core event functionality
- Gas Efficient: Minimal proxies reduce delegation setup costs by 80%
- Flexible Authorization: Three-tier permission system accommodates different use cases
- Upgradeable: UUPS pattern allows for permission system improvements
- Platform Integration: Global whitelist enables automated platform operations
Risk Considerations
Upgrade Risks
- UUPS upgrades could introduce bugs affecting all events, this will be fixed easily on main net through community-led dispute resolution and multi-sigs. In testnet, in case of upgrade-specific bugs or disputes, can be mitigated by swapping the upgrade-proxy with the base implementation.
- Owner has unilateral upgrade authority without timelock, this will be decentralized through community governance on main net.
Authorization Risk
- Global whitelist provides extensive power over all events to Curation Agents. This will be improved in a V2/V3 release by dockerizing agents in TEE environment with contract registration on a per-worker/per-instance basis.
Trust assumptions
- Creator must trust delegate-agent not to perform malicious actions. The
TEE->per-worker-registration->dynamic-addresspattern can ensure action-specific confinment for the multi-agent system. - No built-in dispute resolution for delegation conflicts, this will be resolved with the UUPS pattern described above.