Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
80319ef
feat: initial implementation on POL active management
kupermind Sep 8, 2025
d77a52e
refactor: liquidity manager
kupermind Sep 9, 2025
3964f4f
feat: enhance pol manager
kupermind Sep 12, 2025
50678bf
feat: change pool ranges
kupermind Sep 17, 2025
0bbe5bc
feat: add decrease liquidity
kupermind Sep 18, 2025
1d5a062
feat: add decrease liquidity
kupermind Sep 18, 2025
2db15ca
feat: oracle and price calculation integration
kupermind Sep 23, 2025
9b11386
feat: continue development of POL
kupermind Sep 24, 2025
f676b9c
feat: continue development of POL
kupermind Sep 24, 2025
19d2a6c
refactor: compilation
kupermind Sep 24, 2025
143b1bd
refactor: compilation
kupermind Sep 25, 2025
98bc889
refactor: compilation
kupermind Sep 25, 2025
a6cc819
refactor: stack too deep
kupermind Sep 25, 2025
7e0d517
refactor: stack too deep
kupermind Sep 26, 2025
fc23930
refactor: continue with ticks
kupermind Sep 26, 2025
c037597
refactor: binary rebalancing of ticks
kupermind Sep 29, 2025
470694f
refactor: binary rebalancing of ticks
kupermind Sep 29, 2025
e7a23d8
refactor: binary rebalancing of ticks
kupermind Sep 29, 2025
679d973
refactor: binary rebalancing of ticks
kupermind Sep 29, 2025
3c8b462
refactor: binary rebalancing of ticks
kupermind Sep 29, 2025
41c7411
refactor: scan neighborhood added to minimize dust
kupermind Sep 30, 2025
67e206e
refactor and test: POL
kupermind Sep 30, 2025
2b05837
refactor: split into Uni, Balancer, Aero(Velo)drome
kupermind Oct 1, 2025
8f0beb3
refactor: neighborhood scan
kupermind Oct 1, 2025
64a6b26
refactor: stack too deep
kupermind Oct 1, 2025
d5fea29
refactor: neighborhood contract
kupermind Oct 1, 2025
097e2bc
refactor: ticks shifting
kupermind Oct 2, 2025
f0047d7
refactor: biundary search
kupermind Oct 3, 2025
af993aa
refactor: scan algo working
kupermind Oct 3, 2025
bed037a
refactor: code and clean up
kupermind Oct 6, 2025
fb7c4a7
refactor: code refactor and optimization
kupermind Oct 7, 2025
3cad96e
chore: celanup
kupermind Oct 7, 2025
1a645a1
chore: packages
kupermind Oct 7, 2025
d441553
fix and test: more tests
kupermind Oct 8, 2025
c0969e8
chore: comments
kupermind Oct 9, 2025
76607ee
test: fork POL testing
kupermind Oct 9, 2025
0072519
doc: added instructions to README
kupermind Oct 9, 2025
f75a5bf
chore: test contract
kupermind Oct 9, 2025
c67dfa0
doc: internal audit 8 (1.4)
Oct 10, 2025
da0d0e1
test: more tests
kupermind Oct 10, 2025
8c4c8e1
chore: updating workflow to account for coverage
kupermind Oct 10, 2025
3e020b6
chore: linter
kupermind Oct 10, 2025
db33109
Merge pull request #234 from valory-xyz/v1.4.0-internal-audit
kupermind Oct 10, 2025
5d8c4d5
Merge branch 'pol5' into pol_testing
kupermind Oct 11, 2025
7fca9ae
chore: ci to ignore fork tests
kupermind Oct 11, 2025
8bfa796
chore: console in testing
kupermind Oct 11, 2025
e9fc30c
refactor: addressin audit
kupermind Oct 13, 2025
7254502
chore: correcting reverts
kupermind Oct 14, 2025
fba35ad
chore: adding events
kupermind Oct 14, 2025
6938534
doc: adding natspec
kupermind Oct 14, 2025
8f5fd78
doc: adding natspec
kupermind Oct 14, 2025
9b2afe0
doc: adding natspec
kupermind Oct 14, 2025
3320c8a
chore: workflow
kupermind Oct 14, 2025
fb30a03
test: forge compile
kupermind Oct 14, 2025
4ef2c82
doc: natspec
kupermind Oct 15, 2025
0bdb8eb
fix: liquidity calculation
kupermind Oct 15, 2025
77a5c5c
chore: comments
kupermind Oct 15, 2025
ffaa829
chore: comments
kupermind Oct 15, 2025
bd8a129
refactor and test: several bugs and more tests
kupermind Oct 16, 2025
705f815
chore: addressing stack too deep
kupermind Oct 16, 2025
c8fd1e0
test: adding more tests
kupermind Oct 16, 2025
db83f47
test: more precise testing
kupermind Oct 17, 2025
bbc6e40
test: fixing block number shift with updated forge logic
kupermind Oct 17, 2025
84fc4fa
test: fixing block number shift with updated forge logic
kupermind Oct 17, 2025
f9ea1e8
test: adding fork tests for base
kupermind Oct 17, 2025
237a184
refactor: balancer remove liquidity
kupermind Oct 17, 2025
17248bd
refactor: balancer remove liquidity
kupermind Oct 17, 2025
932a9ff
refactor: balancer remove liquidity
kupermind Oct 17, 2025
16efa2d
chore: linter
kupermind Oct 17, 2025
de7e0f7
fix: arrays by reference
kupermind Oct 20, 2025
630fc0f
refactor: proxy and calldata
kupermind Oct 20, 2025
9fb2732
chore: variable name change
kupermind Oct 20, 2025
c209137
chore: redundant allocation
kupermind Oct 20, 2025
7accd09
refactor and chore: neighborhood fix and memory to calldata
kupermind Oct 20, 2025
22d85a2
fix: out of intermediate ranges liquidity calculation
kupermind Oct 20, 2025
d261b01
chore: optimization runs not to exceed contract size
kupermind Oct 20, 2025
60ece28
chore: code formatting
kupermind Oct 20, 2025
92fa809
chore: formatting
kupermind Oct 20, 2025
7f835d8
chore: allocation when required
kupermind Oct 20, 2025
6d2f1ad
test: add more test cases
kupermind Oct 21, 2025
1c03b90
feat: Bridge2Burner contract
kupermind Oct 21, 2025
f21daa4
chore: formatting
kupermind Oct 21, 2025
61287ba
chore: comment
kupermind Oct 21, 2025
e7e41db
test: adding Bridge2Burner testing
kupermind Oct 22, 2025
b9ac293
feat: add Bridge2BurnerGnosis
kupermind Oct 22, 2025
8a814d0
test: add more tests
kupermind Oct 23, 2025
c861347
doc: internal9 audit
Oct 23, 2025
1a7df2b
Merge pull request #239 from valory-xyz/v1.4.1-internal-audit
kupermind Oct 23, 2025
0514120
refactor: addressing internal audit
kupermind Oct 23, 2025
eadd5a3
chore: min balance correction
kupermind Oct 23, 2025
04eddd0
refactor: making bridge burner functions lighter
kupermind Oct 23, 2025
c759343
chore: CI forge test
kupermind Oct 23, 2025
8ebe8ae
Merge pull request #240 from valory-xyz/bridge2burner_address_interna…
kupermind Oct 23, 2025
bafce33
chore: update packages
kupermind Oct 23, 2025
fa42bee
chore: migrating to new eslint
kupermind Oct 23, 2025
26712f2
chore: migrating to new eslint
kupermind Oct 23, 2025
bba8be1
chore: migrating to new eslint
kupermind Oct 23, 2025
1395666
Merge pull request #238 from valory-xyz/bridge2burner
kupermind Oct 24, 2025
d08d38a
Merge pull request #237 from valory-xyz/forge_formatting
kupermind Oct 24, 2025
ae72e00
Merge pull request #236 from valory-xyz/calldata_memory
kupermind Oct 24, 2025
5564d75
Merge pull request #235 from valory-xyz/pol_testing2
kupermind Oct 24, 2025
722f0bc
Merge pull request #233 from valory-xyz/pol_testing
kupermind Oct 24, 2025
6ea14ce
Merge pull request #232 from valory-xyz/pol5
kupermind Oct 24, 2025
51c885c
Merge pull request #231 from valory-xyz/pol4
kupermind Oct 24, 2025
066b512
Merge pull request #230 from valory-xyz/pol3
kupermind Oct 24, 2025
d15ed64
Merge pull request #229 from valory-xyz/pol2
kupermind Oct 24, 2025
784485d
refactor: slot0 to extract values via assembler to be compatible
kupermind Oct 24, 2025
e11dc05
Merge pull request #241 from valory-xyz/slot0_low_level
kupermind Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

41 changes: 0 additions & 41 deletions .eslintrc.js

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:

# Compile the code
- name: Compile, adjust uniswap library hash and recompile again
run: npm run compile
run: yarn compile

# Compile the code and run hardhat tests
- name: Run hardhat tests
run: ./node_modules/.bin/hardhat test
run: yarn test

# Run hardhat coverage and upload codecov report
- name: Solidity coverage summary
run: ./node_modules/.bin/hardhat coverage
run: yarn coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand All @@ -53,9 +53,9 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: false

# Compile the code and run foundry tests
# Compile the code and run foundry tests (except for fork ones)
- name: Run foundry tests
run: forge test -vvv
run: forge test --match-contract Depository && forge test --match-contract Dispenser && forge test --match-contract Treasury

scan:
name: gitleaks
Expand Down
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,5 @@ c097d8274ab4cdbe199d0b92525aab13031d3866:scripts/deployment/globals_mainnet.json
c097d8274ab4cdbe199d0b92525aab13031d3866:scripts/deployment/globals_mainnet.json:generic-api-key:36
33fa7bba2dbef77a6d7029b12f065afaae102ed5:scripts/deployment/staking/celo/globals_celo_mainnet.json:generic-api-key:15
cc02a34e835abcc1c6fb329bd9b407883e41961f:scripts/deployment/staking/celo/globals_celo_mainnet.json:generic-api-key:15
237a184f7cd5837b76566c42f8b5680c9e5d7d0d:contracts/pol/LiquidityManagerOptimism.sol:generic-api-key:231

18 changes: 18 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
module.exports = {
skipFiles: [
"interfaces/IBridgeErrors.sol",
"interfaces/IDonatorBlacklist.sol",
"interfaces/IErrorsTokenomics.sol",
"interfaces/IGenericBondCalculator.sol",
"interfaces/IOLAS.sol",
"interfaces/IPositionManagerV3.sol",
"interfaces/IServiceRegistry.sol",
"interfaces/IToken.sol",
"interfaces/ITokenomics.sol",
"interfaces/ITreasury.sol",
"interfaces/IUniswapV2Pair.sol",
"interfaces/IUniswapV3.sol",
"interfaces/IVotingEscrow.sol",
"libraries/FixedPoint96.sol",
"libraries/FullMath.sol",
"libraries/LiquidityAmounts.sol",
"libraries/TickMath.sol",
"staking/test/BridgeRelayer.sol",
"staking/test/MockDepositProcessorL1.sol",
"staking/test/MockStakingDispenser.sol",
Expand All @@ -12,6 +29,7 @@ module.exports = {
"test/MockRegistry.sol",
"test/MockTokenomics.sol",
"test/MockVE.sol",
"test/MockVoteWeighting.sol",
"test/ReentrancyAttacker.sol",
"test/TestTokenomics.sol",
"test/UniswapFactory.sol",
Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,36 @@ test
```

### Compile the code and run
#### Hardhat
Compile the code with Hardhat:
```
npm run compile
yarn compile
```
Run tests with Hardhat:
```
npx hardhat test
yarn test
```
Compile the code with Foundry:
Run coverage with Hardhat:
```
yarn coverage
```

#### Forge
Compile the code with Forge:
```
forge build
```
Run tests with Foundry:
Run tests with Forge (skip fork testing):
```
forge test --match-contract Depository -vvv
forge test --match-contract Dispenser -vvv
forge test --match-contract Treasury -vvv
```
Run fork tests with Forge:
```
forge test
forge test -f $FORK_NODE_URL --match-contract LiquidityManagerETH -vvv
forge test -f $FORK_NODE_URL --match-contract LiquidityManagerBase -vvv
forge test -f $FORK_NODE_URL --match-contract BuyBackBurner -vvv
```

### Audits
Expand Down
4 changes: 4 additions & 0 deletions audits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ An internal audit with a focus on tokenimics inflation update is located in this

An internal audit with a focus on WithheldAmount fixing in PoAA Staking is located in this folder: [internal audit 7](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/internal7).

An internal audit with a focus on POL Manager is located in this folder: [internal audit 8](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/internal8).

An internal audit with a focus on BuyBackBurner/Bridge2Burner is located in this folder: [internal audit 9](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/internal9).

### External audit
Final audit reports are listed in their historical order:
- [v1](https://github.com/valory-xyz/autonolas-tokenomics/blob/main/audits/Autonolas%20Tokenomics%20Smart%20Contract%20Audit.pdf);
Expand Down
Loading
Loading