Skip to main content

Ethereum Contracts

Overview

The Audius Ethereum contracts are meant to accomplish the following goals for the Audius protocol:

  • Create the Audius token through an ERC-20
  • Keep track of different service versions
  • Allow service providers to stake and register services to run
  • Allow delegation from users holding Audius token to service providers running services on the network
  • Allow network to mint new tokens for stakers and delegators to earn staking rewards
  • Enable protocol governance to carry out protocol actions such as slash, and static value updates
info

All contracts are built on top of OpenZeppelin's Proxy pattern through AudiusAdminUpgradeabilityProxy which extends AdminUpgradeabilityProxy, enabling logic upgrades to be performed through the Governance contract.


Contracts

Github Code available here

AudiusToken

This contract defines the Audius Protocol token, $AUDIO

The $AUDIO token is a ERC-20 token contract with initial supply of 1 billion tokens, each divisible up to 18 decimal places, and is Mintable, Pausable, and Burnable.

Mainnet ContractSepolia Testnet Contract
0x18aAA7115705e8be94bfFEBDE57Af9BFc265B9980x1376180Ee935AA64A27780F4BE97726Df7B0e2B2

ClaimsManager

This contract is responsible for allocating and minting new tokens as well as managing claim rounds.

A claim round is a period of time during which service providers with valid stakes can retrieve the reward apportioned to them in the network. Claims are processed here and new value transferred to Staking for the claimer, but the values in both ServiceProviderFactory and DelegateManager are updated through calls to DelegateManager.

Mainnet ContractSepolia Testnet Contract
0x44617F9dCEd9787C3B06a05B35B4C779a2AA13340xcdFFAE230aeDC376478b16f369489A3b450fc2c8

DelegateManager

This contract is responsible for tracking delegation state, making claims, and handling slash operations.

This contract allows any Audio Token holder to delegate to an existing Node Operator, earning rewards by providing additional stake the Node Operator while allocating a known percentage of their rewards to the Node Operator.

This contract manages the proportional distribution of stake between the Node Operator and delegators.

All claim and slash operations flow through this contract in order to update values tracked outside of the Staking contract appropriately and maintain consistency between total value within the Staking contract and value tracked by the DelegateManager contract and the ServiceProviderFactory contract.

Mainnet ContractSepolia Testnet Contract
0x4d7968ebfD390D5E7926Cb3587C39eFf2F9FB2250xDA74d6FfbF268Ac441404f5a61f01103451E8697

EthRewardsManager

Mainnet ContractSepolia Testnet Contract
0x5aa6B99A2B461bA8E97207740f0A689C5C39C3b00x563483ccD66a49Ca730275F8cf37Dd3E6Da864f1

Governance

This contract allows protocol participants to change protocol direction by submitting and voting on proposals.

Each proposal represents an executable function call on a contract in the Registry. Once submitted, there is a period of time during which other participants can submit their votes - Yes or No - on the proposal.

After the voting period has concluded, the proposal outcome is calculated as a the sum of the stakes of the Yes voters minus the sum of the stakes of the No voters.

Any non-negative value results in a successful proposal, at which point the specified function call is executed, and the proposal is closed.

Only addresses that have staked in Staking.sol and are represented through the Registry can submit and vote on proposals.

Mainnet ContractSepolia Testnet Contract
0x4DEcA517D6817B6510798b7328F2314d3003AbAC0x04973b4416f7e3D62374Ef8b5ABD4a98e4dD401C

Registry

Contract through which external clients and Governance interact with the remaining contracts within the protocol. Each contract is registered using a key with which its address can be queried.

Mainnet ContractSepolia Testnet Contract
0xd976d3b4f4e22a238c1A736b6612D22f17b6f64C0xc682C2166E11690B64338e11633Cb8Bb60B0D9c0

ServiceProviderFactory

This contract is responsible for tracking Service Provider state within the Audius network.

A service provider is the account associated with a given service endpoint.

Each service provider can increase/decrease stake within dynamic bounds determined by the combination of endpoints they have registered, accept delegation from other token holders, define a reward cut for delegation, and continue registering endpoints as necessary.

This contract forwards staking requests to the actual Staking contract but tracks the amount of stake for the deployer - Staking tracks the sum of delegate stake + deployer stake.

ContractSepolia Testnet Contract Mainnet
0xD17A9bc90c582249e211a4f4b16721e7f65156c80x377BE01aD31360d0DFB16035A4515954395A8185
A Note on Terminology

Through out the Smart Contracts that define the Audius protocol, the term "service provider" is used along with the "service endpoint(s)" that they operate.

More current terminology is "Node Operator" and "Audius Node" respectively.

  • Old: Service Providers operate service endpoints
  • New: Node Operators operate Audius Nodes

ServiceTypeManager

This contract is responsible for maintaining known service types, associated versioning information and service type stake requirements within the Audius Protocol.

Service types are used to identify services being registered within the protocol, for example creator-node or discovery-provider.

Service type stake requirements enforce a minimum and maximum stake amount for each endpoint of a given type that service providers register.

Mainnet ContractSepolia Testnet Contract
0x9EfB0f4F38aFbb4b0984D00C126E97E21b8417C50x9fd76d2cD48022526F3a164541E6552291F4a862
A Note on Terminology

Through out the Smart Contracts that define the Audius protocol, the terms creator-node and discovery-provider are used to define service types.

More current terminology is content-node and discovery-node are Audius Node types respectively.

  • Old: creator-node and discovery-provider are service types
  • New: content-node and discovery-node are Audius Node types.

Staking

This contract manages token staking functions and state across the Audius Protocol

For every service provider address in Audius Protocol, this contract:

  • Stores tokens and manages account balances
  • Tracks total stake history
  • The total stake (represented as the sun of the deployer stake plus the delegate stake)
  • Tracks last claim block
Mainnet ContractSepolia Testnet Contract
0xe6D97B2099F142513be7A2a068bE040656Ae45910x5bcF21A4D5Bab9B0869B9c55D233f80135C814C6

TrustedNotifierManager

This contract serves as the on chain registry of trusted notifier services. Other services may look up and adjust their selected trusted notifier accordingly.

ContractSepolia Testnet Contract Mainnet
0x6f08105c8CEef2BC5653640fcdbBE1e7bb519D390x71f8D2aC2f63A481d597d2A6cc160787A048525C

WormholeClient

This contract serves as the interface between the Audius Protocol and Wormhole.

Mainnet ContractSepolia Testnet Contract
0x6E7a1F7339bbB62b23D44797b63e4258d283E0950x2Eb3BF862e7a724A151e78CEB1173FB332E174a0