Skip to content

Commit

Permalink
Merge pull request #148 from valory-xyz/finalize_docs
Browse files Browse the repository at this point in the history
doc: readme-s
  • Loading branch information
kupermind authored May 23, 2024
2 parents 65a47eb + c3f6f79 commit a2231b3
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 31 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ This repository contains the tokenomics part of Autonolas onchain-protocol contr

A graphical overview is available here:

![architecture](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/docs/On-chain_architecture_v5.png?raw=true)
![architecture](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/docs/On-chain_architecture_v5.png)

An overview of the Autonolas tokenomics model, a high-level description of smart contacts, and a full set of smart contract
specifications are provided [here](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/docs/Autonolas_tokenomics_audit.pdf?raw=true).
An overview of the Autonolas tokenomics model is provided [here](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/docs/Autonolas_tokenomics_audit.pdf). A description of the tokenomics contracts related to Olas staking is provided [here](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/docs/StakingSmartContracts.pdf).

Details on tokenomics model and Olas Staking can be found [here](https://olas.network/documents/whitepaper/Autonolas_Tokenomics_Core_Technical_Document.pdf) and [here](https://staking.olas.network/poaa-whitepaper.pdf).

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, and the logic that regulates the discount factor for bonds.
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:
Expand All @@ -21,6 +22,22 @@ The Tokenomics contract is deployed via the proxy contract, such that it is poss
- [Tokenomics](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/Tokenomics.sol)
- [TokenomicsProxy](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/TokenomicsProxy.sol)
- [Treasury](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/Treasury.sol)

- Staking related contracts:
- [DefaultDepositProcessorL1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/DefaultDepositProcessorL1.sol)
- [DefaultTargetDispenserL2](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/DefaultTargetDispenserL2.sol)
- [EthereumDepositProcessor.sol](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/EthereumDepositProcessor.sol.sol)
- [ArbitrumDepositProcessorL1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/ArbitrumDepositProcessorL1.sol)
- [ArbitrumTargetDispenserL2](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/ArbitrumTargetDispenserL2.sol)
- [GnosisDepositProcessorL1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/GnosisDepositProcessorL1.sol)
- [GnosisTargetDispenserL2](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/GnosisTargetDispenserL2.sol)
- [OptimismDepositProcessorL1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/OptimismDepositProcessorL1.sol)
- [OptimismTargetDispenserL2](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/OptimismTargetDispenserL2.sol)
- [PolygonDepositProcessorL1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/PolygonDepositProcessorL1.sol)
- [PolygonTargetDispenserL2](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/PolygonTargetDispenserL2.sol)
- [WormholeDepositProcessorL1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/WormholeDepositProcessorL1.sol)
- [WormholeTargetDispenserL2](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/staking/WormholeTargetDispenserL2.sol)

- Auxiliary contracts:
- [DonatorBlacklist](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/DonatorBlacklist.sol)
- [GenericBondCalculator](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/contracts/GenericBondCalculator.sol)
Expand Down Expand Up @@ -66,7 +83,7 @@ forge test --hh -vv

### Audits
The audit is provided as development matures. The latest audit reports can be found here: [audits](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits).
A list of known vulnerabilities can be found here: [Vulnerabilities list tokenomics](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/docs/Vulnerabilities_list_tokenomics.pdf?raw=true).
A list of known vulnerabilities can be found here: [Vulnerabilities list tokenomics](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/docs/Vulnerabilities_list_tokenomics.pdf).

### Linters
- [`ESLint`](https://eslint.org) is used for JS code.
Expand Down
Binary file added docs/StakingSmartContracts.pdf
Binary file not shown.
Binary file modified docs/Vulnerabilities_list_tokenomics.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/solmate
10 changes: 5 additions & 5 deletions scripts/analyzers/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Code analyzer script
- [analyzeContracts.js script](https://github.com/valory-xyz/autonolas-tokenomucs/blob/main/scripts/analyzers/analyzeContracts.js) provides a report of solidity code lines for some contracts. This script can be run as follows:

- [analyzeContracts script](https://github.com/valory-xyz/autonolas-tokenomucs/blob/main/scripts/analyzers/analyzeContracts.js)
provides a report of solidity code lines for some contracts. This script can be run as follows:
```
node scripts/analyzers/analyzeContracts.js
```

- [analyzeContractInterface.js script](https://github.com/valory-xyz/autonolas-tokenomucs/blob/main/scripts/analyzers/analyzeContractInterface.js) provides a report of solidity files interfacs for some contracts. This script can be run as follows:

- [analyzeContractInterface.sh script](https://github.com/valory-xyz/autonolas-tokenomucs/blob/main/scripts/analyzers/analyzeContractInterface.js)
provides a report of solidity files interfaces for some contracts. This script can be run as follows:
```
./scripts/analyzers/analyzeContractInterface.js
./scripts/analyzers/analyzeContractInterface.sh
```

39 changes: 20 additions & 19 deletions scripts/analyzers/code_line_report.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
| Contract | CodeLine |
----------------------------------------------------------------------------------------------------------------------------------------------
1 | contracts/staking/ArbitrumDepositProcessorL1.sol | 89 |
2 | contracts/staking/ArbitrumTargetDispenserL2.sol | 25 |
3 | contracts/staking/DefaultDepositProcessorL1.sol | 91 |
4 | contracts/staking/DefaultTargetDispenserL2.sol | 180 |
5 | contracts/staking/GnosisDepositProcessorL1.sol | 32 |
6 | contracts/staking/GnosisTargetDispenserL2.sol | 24 |
7 | contracts/staking/OptimismDepositProcessorL1.sol | 67 |
8 | contracts/staking/OptimismTargetDispenserL2.sol | 31 |
9 | contracts/staking/PolygonDepositProcessorL1.sol | 45 |
10 | contracts/staking/PolygonTargetDispenserL2.sol | 24 |
11 | contracts/staking/WormholeDepositProcessorL1.sol | 64 |
12 | contracts/staking/WormholeTargetDispenserL2.sol | 75 |
13 | contracts/TokenomicsConstants.sol | 59 |
14 | contracts/Tokenomics.sol | 702 |
15 | contracts/Dispenser.sol | 357 |
16 | contracts/interfaces/IDonatorBlacklist.sol | 4 |
17 | contracts/interfaces/IErrorsTokenomics.sol | 31 |
18 | contracts/interfaces/IBridgeErrors.sol | 0 |
1 | contracts/staking/ArbitrumDepositProcessorL1.sol | 98 |
2 | contracts/staking/ArbitrumTargetDispenserL2.sol | 33 |
3 | contracts/staking/DefaultDepositProcessorL1.sol | 112 |
4 | contracts/staking/DefaultTargetDispenserL2.sol | 253 |
5 | contracts/staking/EthereumDepositProcessor.sol | 87 |
6 | contracts/staking/GnosisDepositProcessorL1.sol | 48 |
7 | contracts/staking/GnosisTargetDispenserL2.sol | 50 |
8 | contracts/staking/OptimismDepositProcessorL1.sol | 69 |
9 | contracts/staking/OptimismTargetDispenserL2.sol | 45 |
10 | contracts/staking/PolygonDepositProcessorL1.sol | 58 |
11 | contracts/staking/PolygonTargetDispenserL2.sol | 34 |
12 | contracts/staking/WormholeDepositProcessorL1.sol | 78 |
13 | contracts/staking/WormholeTargetDispenserL2.sol | 88 |
14 | contracts/TokenomicsConstants.sol | 60 |
15 | contracts/Tokenomics.sol | 733 |
16 | contracts/Dispenser.sol | 641 |
17 | contracts/interfaces/IDonatorBlacklist.sol | 4 |
18 | contracts/interfaces/IErrorsTokenomics.sol | 31 |
19 | contracts/interfaces/IBridgeErrors.sol | 23 |
----------------------------------------------------------------------------------------------------------------------------------------------
18 | All Tokenomics contract | 1900 |
19 | All Tokenomics contract | 2545 |

0 comments on commit a2231b3

Please sign in to comment.