Skip to main content

Delegation System

The VibeFactory implements a ProxyAdmin-based delegation system that allows RTA creators to authorize others to manage their vibestreams without transferring NFT ownership.

Overview

Delegation enables creators to grant management permissions for specific RTAs to trusted parties while retaining ownership of the underlying NFT. This is useful for:
  • Management Services: Hiring third parties to manage vibestreams
  • Team Collaboration: Allowing team members to operate vibestreams
  • Automation: Delegating to smart contracts or bots
  • Temporary Access: Granting time-limited management rights

Permission Hierarchy

The delegation system implements a multi-level permission hierarchy:
graph TD A[Contract Owner] —> B[ProxyAdmin] A —> C[Authorized Addresses] B —> D[Per-RTA Delegates] C —> D E[RTA Creator] —> Dstyle A fill:#ff9999 style B fill:#99ccff style C fill:#99ff99 style D fill:#ffcc99 style E fill:#cc99ff

1. Contract Owner

  • Full administrative control
  • Can set ProxyAdmin address
  • Can manage authorized addresses
  • Emergency controls

2. ProxyAdmin

  • Can set/remove delegates for any RTA
  • Manages global delegation operations
  • Typically a multisig or governance contract

3. Authorized Addresses

  • Global whitelist of trusted addresses
  • Can perform delegation operations across all RTAs
  • Managed by owner or ProxyAdmin

4. RTA Creator

  • Can manage their own RTAs through authorized addresses
  • Retains NFT ownership
  • Can request delegation during RTA creation

5. Delegates

  • Authorized to manage specific RTAs
  • Can update metadata and finalize RTAs
  • Cannot transfer ownership

Core Functions

Setting Delegates

Direct Delegation (ProxyAdmin Only)

Sets a delegate for a specific RTA. Only callable by ProxyAdmin or ProxyAdmin owner.

Delegation During Creation

Creates an RTA and sets up delegation in a single transaction.

Removing Delegates

Removes the current delegate for an RTA.

Authorization Management

Adding Authorized Addresses

Adds an address to the global authorized list. Callable by ProxyAdmin or owner.

Removing Authorized Addresses

Removes an address from the global authorized list.

Access Control Implementation

Permission Checking

The canModifyVibestream modifier implements comprehensive permission checking:

ProxyAdmin Validation

ProxyAdmin permissions are validated through multiple pathways:

Delegated Operations

Delegates can perform the following operations on assigned RTAs:

Metadata Management

Updates the metadata URI for an RTA.

Finalization

Marks an RTA as finalized (irreversible operation).

State Tracking

Delegation Mappings

View Functions

Events

Delegation Events

Security Considerations

Delegation Isolation

Each delegation is isolated to a specific RTA:

Owner Protection

RTA creators retain ultimate control:
  • NFT ownership cannot be transferred by delegates
  • Only specific management functions are delegated
  • Creators can work through authorized addresses to manage delegation

Emergency Controls

Contract owner maintains emergency capabilities:
  • Can update ProxyAdmin address
  • Can modify authorized address list
  • Can pause contract operations if needed

Usage Examples

Creating RTA with Delegation

Setting Delegate After Creation

Delegate Operations

Authorization Management

Integration Patterns

Management Services

Delegation enables professional management services:
  1. Creator creates RTA with delegation to service
  2. Service manages day-to-day operations
  3. Creator retains ownership and ultimate control
  4. Revenue flows directly to creator

Team Collaboration

Teams can collaborate on vibestream management:
  1. Add team members to authorized addresses
  2. Team members can delegate specific RTAs
  3. Distributed management with centralized oversight

Automated Management

Smart contracts can be delegated for automation:
  1. Deploy management contract with specific logic
  2. Delegate RTAs to management contract
  3. Automated operations based on predefined rules

Delegation Flow Diagram

sequenceDiagram participant Creator participant VibeFactory participant ProxyAdmin participant DelegateCreator->>VibeFactory: createVibestreamWithDelegate() VibeFactory->>VibeFactory: mint RTA NFT VibeFactory->>VibeFactory: set delegate mapping VibeFactory—>>Creator: vibeIdNote over Delegate: Can now manage RTADelegate->>VibeFactory: setMetadataURI() VibeFactory->>VibeFactory: check canModifyVibestream VibeFactory—>>Delegate: successProxyAdmin->>VibeFactory: removeDelegate() VibeFactory->>VibeFactory: clear delegate mapping VibeFactory—>>ProxyAdmin: successNote over Delegate: No longer has access

Best Practices

For Creators

  1. Verify Delegates: Only delegate to trusted addresses
  2. Monitor Activity: Track delegate actions through events
  3. Use Authorized Services: Work with established management services
  4. Retain Control: Keep ultimate oversight through ownership

For Delegates

  1. Respect Boundaries: Only perform authorized operations
  2. Communicate Changes: Inform creators of significant actions
  3. Maintain Security: Protect delegate private keys
  4. Follow Guidelines: Adhere to creator’s management preferences

For ProxyAdmin

  1. Governance: Implement proper governance for delegation decisions
  2. Transparency: Make delegation operations visible
  3. Security: Use multisig or timelock for ProxyAdmin operations
  4. Documentation: Maintain clear delegation policies

Next Steps

Contract Flows

See complete interaction diagrams

Deployed Contracts

View contract addresses and setup