Roles And Permissions

Roles define the permissions and access levels across different contracts and modules. This page outlines the structure of roles, their functions, and the path toward full decentralization.

To maintain a secure and flexible smart contract system, we leverage roles to manage administrative tasks and define who has the authority to perform specific actions. These roles control everything from minting tokens to upgrading contracts, pausing operations, and setting governance parameters.

The central goal of this structure is to gradually decentralize power from individual wallets to the DAO (the B3TRGovernor governance contract).

Roles

This document categorizes roles and outlines their functionalities, detailing what permissions each role grants. Here's a quick summary of some common roles and what they do:

  • DEFAULT_ADMIN_ROLE: The superuser role with the ability to grant, revoke, and renounce roles.

  • PAUSER_ROLE: Controls the ability to pause and unpause contract functionality.

  • MINTER_ROLE: Allows for token minting.

  • UPGRADER_ROLE: Permits contract upgrades and modifications.

  • CONTRACTS_ADDRESS_MANAGER_ROLE: Manages critical contract addresses.

  • DECAY_SETTINGS_MANAGER_ROLE: Manages parameters surrounding cycle lengths, allocation percentages and decay rates in the Emission contract.

  • GOVERNANCE_ROLE: Involved in governance decisions, proposal management, and voting.

All roles have in common the following functionality: they can renounce that role.

Once there isn’t any address that has the DEFAULT_ADMIN_ROLE then it won’t be possible to grant or revoke any role. If some contract is upgradeable and the DAO has the UPGRADER_ROLE then the DAO could decide to upgrade the contract and assign the role to whoever they want.

Permissions

The ultimate aim is to create a self-governing system where no single entity holds absolute control. This section of the page provides a detailed plan for achieving this goal, outlining the steps for transitioning roles to the B3TRGovernor contract, removing direct admin control, and enabling decentralized governance.

Follow the outlined steps to understand the current state of role assignments and the specific actions required to achieve a more autonomous system. Through this journey, we aim to establish a resilient and community-driven ecosystem where the power of decision-making rests in the hands of the DAO and its stakeholders.

Contract: B3TR

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole

Grants or revokes roles; allows renunciation of its role

Admin Wallet

PAUSER_ROLE

Pause, Unpause

Pauses or unpauses contract operations

Admin Wallet

MINTER_ROLE

Mint

Mints new tokens

Admin Wallet, Emissions Contract

Steps for full decentralization:

Contract: B3TRGovernor

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole, cancel

Grants or revokes roles; allows renunciation of its role; cancel pending proposals;

Admin Wallet

PROPOSAL_EXECUTOR_ROLE

Execute

Executes queued proposals

Admin Wallet

PAUSER_ROLE

Pause, Unpause

Pauses or unpauses contract (no proposal creation, queuing, or execution)

Admin Wallet

GOVERNOR_FUNCTIONS_SETTINGS_ROLE

setWhitelistFunction, setWhitelistFunctions, setIsFunctionRestrictionEnabled

Whitelist function that people can trigger in their proposals, or disable this check.

Admin Wallet, BTRGovernor

CONTRACTS_ADDRESS_MANAGER_ROLE

setVoterRewards, setXAllocationVoting, updateTimelock

Manages contract addresses

Admin Wallet, BTRGovernor

onlyGovernance * not a role but a modifier that checks that the action that is going to be performed is the result of a successful proposal.

_authorizeUpgrade, relay, setDepositThreshold, setVotingThreshold, setMinVotingDelay, updateQuorumNumerator

Updates governance parameters

B3TRGovernor

Steps for full decentralization:

Contract: Emissions

Role Name

Functions

Function Descriptions

Initial Assignees

MINTER_ROLE

Bootstrap, Start, renounceRole

Allows minting of tokens, initializing processes

Admin Wallet

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole

Manages roles and contract parameters

Admin Wallet

DECAY_SETTINGS_MANAGER_ROLE

setCycleDuration, setXAllocationsDecay, setVote2EarnDecay

Sets emission cycle durations and related parameters

Admin Wallet

setXAllocationsDecayPeriod, setVote2EarnDecayPeriod

Sets decay periods for various emission-related settings

setTreasuryPercentage, setScalingFactor, setMaxVote2EarnDecay

Configures emission scaling factors and treasury settings

CONTRACTS_ADDRESS_MANAGER_ROLE

setXAllocationAddress, setVote2EarnAddress, setTreasuryAddress, setXAllocationsGovernorAddress

Configures addresses for key contracts

Admin Wallet

UPGRADER_ROLE

upgrade, renounceRole

Allows contract upgrades

Admin Wallet

Steps for full decentralization:

Contract: GalaxyMember

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

setMaxLevel, setMaxMintableLevels, setBaseURI, setB3TRtoUpgradeToLevel, setIsPublicMintingPaused

Sets contract parameters for levels, minting, and URI, Controls public minting

Admin Wallet

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

PAUSER_ROLE

Pause, Unpause

Pauses and unpauses the contract

Admin Wallet

MINTER_ROLE

Mint

Mint tokens for migration purposes

Admin Wallet

CONTRACTS_ADDRESS_MANAGER_ROLE

setXAllocationsGovernorAddress, setB3trGovernorAddress

Configures critical contract addresses

Admin Wallet

Steps for full decentralization:

Contract: Timelock

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole

Grants or revokes roles; allows renunciation of its own role

Admin Wallet, Timelock contract

Proposer

schedule, cancel

Proposes, schedules, and cancels transactions

B3TRGovernor

Executor

Execute

Executes approved proposals and transactions

B3TRGovernor

UPGRADER_ROLE

upgrade

Allows contract upgrades

Admin Wallet

Steps for full decentralization:

Contract: Treasury

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole

Grants/revokes roles; can renounce its own role

Admin Wallet

GOVERNANCE_ROLE

transferVTHO, transferB3TR, transferVOT3, transferVET

Manages VOT3, B3TR, VET and VTHO transfers

B3TRGovernor

transferTokens, transferNFT

Manages NFT and ERC20 token transfers

stakeB3TR, unstakeB3TR

Manages staking and unstaking

PAUSER_ROLE

Pause, Unpause

Pauses and unpauses contract operations

Admin Wallet

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

Steps for full decentralization:

Contract: VOT3

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole

Grants or revokes roles; allows renunciation of its role

Admin Wallet

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

PAUSER_ROLE

Pause, Unpause

Pauses or unpauses contract operations

Admin Wallet

Steps for full decentralization:

Contract: VoterRewards

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

setLevelToMultiplier, setScalingFactor

Sets reward scaling factors and levels

Admin Wallet

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

VOTE_REGISTRAR_ROLE

registerVote

Registers user votes for rewards

XAllocationVoting, B3TRGovernor

setVoteRegistrarRole

Assigns who has permission to register votes

CONTRACTS_ADDRESS_MANAGER_ROLE

setEmissions, setGalaxyMember

Sets key contract addresses

Admin Wallet

Steps for full decentralization:

Contract: X2EarnApps

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

setBaseURI, UpdateAppMetadata

Configures base URI and updates app metadata

Admin Wallet

Update receiver address/ app admin

Sets or updates app receiver address and admin

Add/Remove app moderators

Manages app moderators

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

GOVERNANCE_ROLE

Add app, setVotingEligibility

Adds new apps and defines voting eligibility

Admin Wallet

Steps for full decentralization:

NB: This contract will be upgraded to handle app endorsement, so the “Add app” functionality triggered by a GOVERNANCE_ROLE could be removed in a future release

Contract: X2EarnRewardsPool

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

Admin Wallet

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

CONTRACTS_ADDRESS_MANAGER_ROLE

setX2EarnApps

Update the contract address of X2EarnApps

Admin Wallet

Steps for full decentralization:

Contract: XAllocationPool

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole

Grants, revokes, or renounces roles

Admin Wallet

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

CONTRACTS_ADDRESS_MANAGER_ROLE

setXAllocationVotingAddress, setEmissionsAddress, setTreasuryAddress, setX2EarnAppsAddress

Manages key contract addresses

Admin Wallet

Steps for full decentralization:

Contract: XAllocationVoting

Role Name

Functions

Function Descriptions

Initial Assignees

DEFAULT_ADMIN_ROLE

grantRole, revokeRole, renounceRole

Grants, revokes, or renounces roles

Admin Wallet

UPGRADER_ROLE

Upgrade

Allows contract upgrades

Admin Wallet

ROUND_STARTER_ROLE

startNewRound

Initiates a new voting round

Emissions Contract

GOVERNANCE_ROLE

setVotingThreshold, setAppSharesCap

Sets parameters for voting

Admin Wallet, B3TRGovernor

setBaseAllocationPercentage, setVotingPeriod

Establishes voting periods and percentages

updateQuorumNumerator

Updates quorum requirements

CONTRACTS_ADDRESS_MANAGER_ROLE

setX2EarnAppsAddress, setEmissionsAddress, setVoterRewardsAddress

Manages key contract addresses

Admin Wallet

Steps for full decentralization:

Last updated