valory-xyz
autonolas-tokenomics
Solidity

This repository contains the Autonolas tokenomics part of the autonolas-v1 protocol.

Last updated Jul 2, 2026
18
Stars
16
Forks
2
Issues
0
Stars/day
Attention Score
69
Language breakdown
No language data available.
Files click to expand
README

Autonolas Tokenomics

Introduction

This repository contains the tokenomics part of Autonolas onchain-protocol contracts.

A graphical overview is available here.

For reference purposes only, an older version of the general Autonolas architecture is available here.

An overview of the Autonolas tokenomics model is provided here. A description of the tokenomics contracts related to Olas staking is provided here.

Details on tokenomics model and Olas Staking can be found here and here.

The Depository and Treasury contracts are inspired by OlympusDAO concepts. The Tokenomics contract implements the brunt of the reward logic for component and agent owners, the logic that regulates the discount factor for bonds, and Olas staking emissions. The Tokenomics contract is deployed via the proxy contract, such that it is possible to update the current Tokenomics implementation.

  • Core contracts:
- Depository - Dispenser - Tokenomics - TokenomicsProxy - Treasury
  • Staking related contracts:
- DefaultDepositProcessorL1 - DefaultTargetDispenserL2 - EthereumDepositProcessor.sol - ArbitrumDepositProcessorL1 - ArbitrumTargetDispenserL2 - GnosisDepositProcessorL1 - GnosisTargetDispenserL2 - OptimismDepositProcessorL1 - OptimismTargetDispenserL2 - PolygonDepositProcessorL1 - PolygonTargetDispenserL2 - WormholeDepositProcessorL1 - WormholeTargetDispenserL2
  • Auxiliary contracts:
- DonatorBlacklist - GenericBondCalculator - TokenomicsConstants

Development

Prerequisites

  • This repository follows the standard Hardhat development process.
  • The code is written on Solidity starting from version 0.8.18.
  • The standard versions of Node.js along with Yarn are required to proceed further (confirmed to work with Yarn 1.22.19 and npm 10.1.0 and node v18.6.0);
  • Foundry is required to run the foundry tests.

Install the dependencies

The project has submodules to get the dependencies. Make sure you run git clone --recursive or init the submodules yourself. The dependency list is managed by the package.json file, and the setup parameters are stored in the hardhat.config.js file. Simply run the following command to install the project:
yarn install

Core components

The contracts, deploy scripts, regular scripts and tests are located in the following folders respectively:
contracts
scripts
test

Compile the code and run

Hardhat

Compile the code with Hardhat:
yarn compile
Run tests with Hardhat:
yarn test
Run coverage with Hardhat:
yarn coverage

Forge

Compile the code with Forge:
forge build
Run unit tests with Forge (no fork required):
forge test --mc Depository -vvv
forge test --mc Dispenser -vvv
forge test --mc Treasury -vvv

Oracle unit tests

forge test --mc UniswapPriceOracleConstructorTest -vvv forge test --mc UniswapPriceOracleGetPriceTest -vvv forge test --mc UniswapPriceOracleUpdatePriceTest -vvv forge test --mc UniswapPriceOracleGetTWAPTest -vvv forge test --mc BalancerPriceOracleConstructorTest -vvv forge test --mc BalancerPriceOracleGetPriceTest -vvv forge test --mc BalancerPriceOracleUpdatePriceTest -vvv forge test --mc BalancerPriceOracleGetTWAPTest -vvv

LPSwapCelo unit tests

forge test --mc LPSwapCeloConstructorTest -vvv forge test --mc LPSwapCeloSwapTest -vvv forge test --mc LPSwapCeloSlippageTest -vvv
Run fork tests with Forge (require RPC node URL for the target chain):
# Fork tests (ETH mainnet)
forge test -f $FORKETHNODE_URL --mc LiquidityManagerETH -vvv
forge test -f $FORKETHNODE_URL --mc UniswapPriceOracleETH -vvv
forge test -f $FORKETHNODE_URL --mc BuyBackBurnerUniswapETH -vvv

Fork tests (Base)

forge test -f $FORKBASENODE_URL --mc LiquidityManagerBase -vvv forge test -f $FORKBASENODE_URL --mc BalancerPriceOracleBase -vvv forge test -f $FORKBASENODE_URL --mc BuyBackBurnerBalancerBase -vvv

Fork tests (Polygon)

forge test -f $FORKPOLYGONNODE_URL --mc BuyBackBurnerBalancerPolygon -vvv

Fork tests (Arbitrum)

forge test -f $FORKARBITRUMNODE_URL --mc BuyBackBurnerBalancerArbitrum -vvv

Fork tests (Optimism)

forge test -f $FORKOPTIMISMNODE_URL --mc BuyBackBurnerTransferV3Optimism -vvv

Fork tests (Celo)

forge test -f https://forno.celo.org --mc LPSwapCeloForkTest -vvv

Audits

Static audit

The static audit checks all the deployed contracts on-chain info correctness and can be run using the following script:
node scripts/auditchains/auditcontracts_setup.js

Linters

  • ESLint is used for JS code.
  • solhint is used for Solidity linting.

Github workflows

The PR process is managed by github workflows, where the code undergoes several steps in order to be verified. Those include:
  • code installation;
  • running linters;
  • running tests.

Deployment

The deployment of contracts to the test- and main-net is split into step-by-step series of scripts for more control and checkpoint convenience. The description of deployment procedure can be found here: deployment.

The finalized contract ABIs for deployment and their number of optimization passes are located here: ABIs.

For testing purposes, the hardhat node deployment script is located here.

Deployed Protocol

The list of contract addresses for different chains and their full contract configuration can be found here.

In order to test the protocol setup on all the deployed chains, the audit script is implemented. Make sure to export required API keys for corresponding chains (see the script for more information). The audit script can be run as follows:

node scripts/auditchains/auditcontracts_setup.js

LP Token Guide

It is advised to check the following list of instructions before enabling OLAS-based LP tokens.

LP Token List

OLAS-based LP tokens eligible for bonding come from various chains. At a minimum, after OLAS has been bridged to a specific chain, the OLAS-XCHAIN_TOKEN LP token is created to provide the liquidity on that chain.

In order to participate in bonding with LPs from different chains, the LP owner needs to transfer LP tokens to the ETH mainnet and deposit via a Depository contract directly, or by using the Bonding UI.

For more information about bonding enabled LP tokens and bridging see here.

Tokenomics inflation update

Several reviews of tokenomics inflation have been performed. The up-to-date tokenomics inflation update documentation can be found here.

Acknowledgements

The tokenomics contracts were inspired and based on the following sources:

© 2026 GitRepoTrend · valory-xyz/autonolas-tokenomics · Updated daily from GitHub