Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Develop -> Master #17

Merged
merged 1,199 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1199 commits
Select commit Hold shift + click to select a range
713b458
More specific errors
0xLienid Aug 30, 2023
8286e76
fix: reduce Operator bytecode size under limit without changing funct…
Oighty Sep 12, 2023
926d65c
testnet deployment
0xrusowsky Sep 13, 2023
9bab949
audit fixes
0xrusowsky Sep 14, 2023
85cb62b
Adjust deploy script for deployment
0xLienid Sep 14, 2023
1136ef7
Framing up burner contract
0xLienid Sep 14, 2023
ccb0455
audit fixes + etherscan verification
Sep 21, 2023
f59fb79
Working on tests
0xLienid Sep 22, 2023
f26c3ce
Simplify contract, finish tests
0xLienid Sep 26, 2023
7e876b1
Add note on replacement authority
0xLienid Sep 26, 2023
959f049
Refactor transfer function
0xLienid Sep 28, 2023
4d613cb
chore: extension patch + deployed addresses
0xrusowsky Sep 28, 2023
9d3afc4
fix: fix test cases affected by solmate dependency update
Oighty Oct 3, 2023
f9ea8d8
chore: update github CI to not check BLV fork tests
Oighty Oct 3, 2023
d278c0e
fix: cross chain fork tests error
Oighty Oct 3, 2023
8062f77
Merge branch 'develop' into feat/cooler-loans
Oighty Oct 3, 2023
c013895
fix: comment out failing fork test
Oighty Oct 3, 2023
d9d9968
chore: use a clearinghouse registry
0xrusowsky Oct 3, 2023
2019ed9
style: fix linting
0xrusowsky Oct 3, 2023
430faaa
style: fix typos
0xrusowsky Oct 3, 2023
32fb2a7
chore: prevent double accounting
0xrusowsky Oct 6, 2023
02a5c5b
fix: set current state using constructor
0xrusowsky Oct 7, 2023
307db1f
style: update comments
0xrusowsky Oct 7, 2023
35c3eae
style: linter
0xrusowsky Oct 7, 2023
a994d63
Nuke transfer from core pOHM functionality
0xLienid Oct 9, 2023
369a639
Working on external fractionalization contract
0xLienid Oct 9, 2023
0b31aaa
Merge branch 'develop' into rbs-v1-4-asymmetric
0xrusowsky Oct 10, 2023
d101185
style: improve event logging and errors
0xrusowsky Oct 10, 2023
f2b6386
style: lint
0xrusowsky Oct 10, 2023
8f47e1d
chore: deployment script
0xrusowsky Oct 11, 2023
8578b16
script: minor abi-decoding fix in CH reg deploy
Oighty Oct 11, 2023
587f0c3
fix: constructor single address to simplify logic
0xrusowsky Oct 11, 2023
28399db
Update way max to transfer is calculated
0xLienid Oct 12, 2023
856c9bc
Merge branch 'rbs-v1-4-asymmetric-with-sDAI' into rbs-v1-4-asymmetric
0xrusowsky Oct 12, 2023
9a17c79
Merge pull request #192 from OlympusDAO/rbs-v1-4-asymmetric
0xrusowsky Oct 12, 2023
ab89e9c
Working through ClaimTransfer tests
0xLienid Oct 12, 2023
5e8180c
fix: minor merge adjustments + linting
0xrusowsky Oct 13, 2023
f1422f6
test: add some extra assertions
0xrusowsky Oct 13, 2023
b2e37c7
Finish claim transfer tests
0xLienid Oct 16, 2023
354f227
Validate vesting can't go awry on transfer
0xLienid Oct 16, 2023
9059141
Merge pull request #184 from OlympusDAO/rbs-v1-3-sDAI-fixed
0xrusowsky Oct 16, 2023
df7c152
feat: trigger a new rebase from the `heart.beat()`
0xrusowsky Oct 17, 2023
4560492
style: rename deployment script
0xrusowsky Oct 17, 2023
e95bd80
chore: ensure module version checks for policies
0xrusowsky Oct 22, 2023
2f9a5a8
chore: check module major for each policy
0xrusowsky Oct 23, 2023
ec8f303
fix: inform expected versions `WrongModuleCheck`
0xrusowsky Oct 23, 2023
0403be1
chore: refactor code to reduce contract size
0xrusowsky Oct 23, 2023
f1247db
style: add comments
0xrusowsky Oct 23, 2023
a95bd5e
fix: get rid of useless memory cache for regen
0xrusowsky Oct 23, 2023
5303bd7
chore: missing policies
0xrusowsky Oct 26, 2023
7721d0e
style: lint
0xrusowsky Oct 26, 2023
84f0f2b
Bulk of changes from Jem's feedback
0xLienid Oct 27, 2023
2f5ee0c
Fix deployment scripts
0xLienid Oct 27, 2023
da5a6ae
Address Jem's comments
0xLienid Oct 28, 2023
ec3082d
script: clearinghouse registry deployment
0xrusowsky Oct 31, 2023
3952dc7
fix: withdraw naked amount from wrapped reserves
0xrusowsky Nov 2, 2023
bdb3cbe
test: mock sDAI yield
0xrusowsky Nov 2, 2023
8e6b8e8
style: lint
0xrusowsky Nov 2, 2023
da4f65e
chore: use standard error by encoding the array
0xrusowsky Nov 3, 2023
bec002d
style: lint
0xrusowsky Nov 3, 2023
d8e3e57
test: setup dependencies for all policies
0xrusowsky Nov 5, 2023
18816ef
style: lint
0xrusowsky Nov 5, 2023
a9afb98
fix: expected version array length
0xrusowsky Nov 6, 2023
5ebb006
fix: informational and gas-related issues
0xrusowsky Nov 7, 2023
17fb573
fix: dependencies
0xrusowsky Nov 7, 2023
7a0902c
style: fix typo
0xrusowsky Nov 7, 2023
16f7083
Merge pull request #199 from OlympusDAO/fix/audit-rbs-v1-4-remediations
0xrusowsky Nov 8, 2023
30807be
Merge pull request #191 from OlympusDAO/chore/add-clearinghouse-registry
0xrusowsky Nov 8, 2023
fdd21cd
test: major module upd revert with non-upd policy
0xrusowsky Nov 8, 2023
aff77fd
test: e2e workflow major module upgrade
0xrusowsky Nov 8, 2023
119388e
Merge pull request #197 from OlympusDAO/chore/policy-check-module-ver…
0xrusowsky Nov 8, 2023
8a5fd0c
Merge branch 'develop' into rbs-v1-4-asymmetric-with-sDAI
0xrusowsky Nov 8, 2023
a353180
fix: merge issues
0xrusowsky Nov 8, 2023
357e403
script: deployment scripts
0xrusowsky Nov 8, 2023
0c2c81c
prettier
0xLienid Nov 8, 2023
2fc619a
update comments
0xLienid Nov 8, 2023
e61d954
script: update goerli protocol addresses
0xrusowsky Nov 9, 2023
4acee93
chore: linting
0xJem Nov 10, 2023
4842a14
Merge develop
0xLienid Nov 13, 2023
d60d49a
prettier
0xLienid Nov 13, 2023
34ea3d1
deployment contracts + verification script
0xrusowsky Nov 16, 2023
bf70d67
deployment addresses
0xrusowsky Nov 16, 2023
76b9256
Merge pull request #194 from OlympusDAO/rbs-v1-4-asymmetric-with-sDAI
0xrusowsky Nov 16, 2023
b64e85f
chore: update registry when de/activating a CH
0xrusowsky Nov 24, 2023
a9ad75d
fix: RBSv1.4 std module major checks
0xrusowsky Nov 24, 2023
90a9226
Merge branch 'develop' into feat/cooler-loans
0xrusowsky Nov 24, 2023
80233cf
fix: submodules
0xrusowsky Nov 24, 2023
f8a1f8e
fix: submodules
0xrusowsky Nov 24, 2023
9e8618d
Switch burner to fixed reward
0xLienid Nov 25, 2023
1fd8915
Merge branch 'legacy-burner' of github.com:OlympusDAO/bophades into l…
0xLienid Nov 26, 2023
ebcc600
Remove transfer from bond manager burn
0xLienid Nov 26, 2023
23afa08
Merge pull request #216 from OlympusDAO/fix/std-module-version-checks
0xrusowsky Nov 27, 2023
c87d2c0
fix: submodules
0xrusowsky Nov 27, 2023
61531e2
Merge remote-tracking branch 'refs/remotes/origin/feat/cooler-loans' …
0xrusowsky Nov 27, 2023
dd04f07
fix: merge conflict
0xrusowsky Nov 27, 2023
e905eb7
chore: gas optimization
0xrusowsky Nov 27, 2023
da53364
test: registryCount
0xrusowsky Nov 27, 2023
7583f81
fix: deployment script merge conflict
0xrusowsky Dec 1, 2023
5092ccb
fix: libraries
0xrusowsky Dec 1, 2023
4f52ab3
Merge pull request #182 from OlympusDAO/feat/cooler-loans
0xrusowsky Dec 1, 2023
72981d8
fix: remove revert in ZeroDistributor
Oighty Dec 1, 2023
ac33ecd
chore: deploy new distributor
Oighty Dec 1, 2023
22e0683
Testnet deployment stuff
0xLienid Dec 4, 2023
e804b50
Merge pull request #223 from OlympusDAO/fix-staking-revert
0xJem Dec 15, 2023
5a5bbc7
Adjust some deployment scripts
0xLienid Jan 10, 2024
932bb3c
Additional tests
0xLienid Jan 31, 2024
d6941a4
Removed unnecessary comment
0xLienid Jan 31, 2024
a46b722
Rename and deploy
0xLienid Feb 1, 2024
b8d371d
Stash deployment stuff
0xLienid Feb 5, 2024
ee4601e
feat: on-chain governance + proposal simulator (#357)
0xrusowsky Feb 23, 2024
4726f1d
fix: lcov errors (#362)
0xrusowsky Feb 26, 2024
47c2024
script: OCG deployments (#364)
0xrusowsky Feb 26, 2024
7308974
style: move cooler library into external/cooler (#365)
0xrusowsky Feb 27, 2024
369481d
Rewrite pOLY to handle migration of genesis claims
0xLienid Mar 1, 2024
340f9ef
feat: cooler utils
0xrusowsky Jul 27, 2024
9c2b65b
fix: import lib
0xrusowsky Jul 27, 2024
da484c4
fix: import lib
0xrusowsky Jul 27, 2024
3dad96c
Add test TODOs
0xJem Jul 29, 2024
0ceb5eb
WIP tests
0xJem Jul 31, 2024
6c6d225
Improve docs
0xJem Jul 31, 2024
87c6bc8
WIP tests
0xJem Jul 31, 2024
7be9893
Tests
0xJem Aug 1, 2024
1224b93
Fix test failures due to interest due
0xJem Aug 7, 2024
7a9b1ef
Fix incorrect handling of protocol fee
0xJem Aug 8, 2024
560598c
Update test TODOs. Check for dangling approvals and residual balances.
0xJem Aug 12, 2024
218e82e
Fix test failures
0xJem Aug 12, 2024
b0af34d
useFunds tests
0xJem Aug 12, 2024
998b385
Revert if there are not enough coolers
0xJem Aug 14, 2024
9a284a4
Fix tests for sDAI being passed in
0xJem Aug 14, 2024
da49ce9
Remaining tests
0xJem Aug 14, 2024
d8b12c0
Add address and bounds checks
0xJem Aug 14, 2024
a396829
Change percentage denominator to 100e2 (basis points)
0xJem Aug 14, 2024
06025f4
Use solmate Owned contract
0xJem Aug 14, 2024
461b2d2
Rename protocol fee variable
0xJem Aug 14, 2024
d624735
Revert if the caller is trying to provide more funds than needed
0xJem Aug 14, 2024
134c0cb
Transfer any remaining DAI back to the sender
0xJem Aug 14, 2024
5d13f3b
Port deployment script improvements from #203
0xJem Aug 26, 2024
9b46a6e
Port fix for deployment contract from #203
0xJem Aug 26, 2024
2d37cf8
Add deployment script and sequence for CoolerUtils
0xJem Aug 26, 2024
270afd7
Add deployment
0xJem Aug 26, 2024
f7c7f78
Adjust tests to take in collateral amount
0xJem Aug 28, 2024
3a8c9ee
Add fuzz test for rounding errors
0xJem Aug 28, 2024
fbf13a7
Fix for rounding issues
0xJem Aug 29, 2024
0f6d7bf
init: protocoloop from nicnombre
Oighty Aug 30, 2024
331ab46
feat: integrate protocol loop with default
Oighty Aug 30, 2024
978d6ae
better inventory handling
chefomi Aug 30, 2024
8d2b429
burn handling
chefomi Aug 30, 2024
a21d875
fix math
chefomi Aug 30, 2024
bad5921
sdai view consistency
chefomi Aug 30, 2024
596b77e
small reorg
chefomi Aug 30, 2024
4114746
chore: immutable -> constants
Oighty Sep 2, 2024
adbe480
chore: make addresses inputs for easier testing and modularity
Oighty Sep 2, 2024
11e3b6c
test: protocoloop test setup
Oighty Sep 2, 2024
2d471cf
feat: supply initial yield in constructor
Oighty Sep 2, 2024
cb54d7f
test: fix test setup and call loop without errors
Oighty Sep 2, 2024
80c03ea
Add deployment addresses
0xJem Sep 3, 2024
7e955cf
Add script for testing of ClaimTransfer
0xJem Sep 3, 2024
2a4089e
chore: linting
0xJem Sep 3, 2024
135bc76
add events
chefomi Sep 3, 2024
f6446c3
inventory handling
chefomi Sep 3, 2024
0ebf2dd
test: more protocoloop tests
Oighty Sep 4, 2024
7f561ca
Add redeemableFor to ClaimTransfer
0xJem Sep 4, 2024
7392c84
Update logs in script
0xJem Sep 4, 2024
c86178f
Merge branch 'develop' into pohm
0xJem Sep 4, 2024
260dc79
Add stubs for gOHM mocks
0xJem Sep 4, 2024
1986653
Bump forge-std to 1.5.1 to add support for expectEmit
0xJem Sep 4, 2024
1354c93
Log variables when deploying
0xJem Sep 4, 2024
39ddbe6
Add deployment sequence for ClaimTransfer
0xJem Sep 4, 2024
2c541d4
Add redeemableFor to ClaimTransfer testing script
0xJem Sep 4, 2024
61cc449
Add mocking of OHM total supply in order to be able to test redeemabl…
0xJem Sep 4, 2024
455211b
Add script for fork testing CoolerUtils
0xJem Sep 5, 2024
c201a61
Updated CoolerUtils deployment
0xJem Sep 5, 2024
0e27698
Merge pull request #397 from OlympusDAO/feat/cooler-utils
0xJem Sep 6, 2024
da75677
test: add'l protocoloop unit tests
Oighty Sep 6, 2024
b6278ed
Merge branch 'develop' into pohm
0xJem Sep 9, 2024
b280f38
Updated deployment of ClaimTransfer
0xJem Sep 9, 2024
82a5331
Fix incorrect assertion in test
0xJem Sep 9, 2024
8722154
Force-enable AST output, which is required by quabi and the module fi…
0xJem Sep 9, 2024
f7adc8d
feat: add protocoloop to heart beat
Oighty Sep 9, 2024
fc49d61
chore: fix test suite compiles errors
Oighty Sep 9, 2024
088a1a5
script: fix compile errors and add protocoloop deploy function
Oighty Sep 9, 2024
2a024c2
Exit install script if there are any errors
0xJem Sep 10, 2024
f100776
Update ds-test and clones submodules
0xJem Sep 10, 2024
53ba690
Cross-port install script from #203
0xJem Sep 10, 2024
732e102
Split CoolerUtils tests into test:fork script
0xJem Sep 10, 2024
4af00d4
Add version number to CoolerUtils contract
0xJem Sep 12, 2024
9c75737
Add additional view function to determine additional collateral requi…
0xJem Sep 12, 2024
f92495b
Fix pOLY fuzz test
0xJem Sep 12, 2024
17b3a13
New deployment
0xJem Sep 12, 2024
cbce3c8
Fix cause of fork test failures: bad RPC
0xJem Sep 12, 2024
f1c2a2c
Restore pinned block
0xJem Sep 12, 2024
fef733c
Attempt to fix cross-chain fork tests
0xJem Sep 12, 2024
ae75321
Merge pull request #187 from OlympusDAO/pohm
0xJem Sep 16, 2024
dc177ed
Merge branch 'develop' into legacy-burner
0xJem Sep 16, 2024
a094aca
Add deployment addresses
0xJem Sep 16, 2024
f3195f3
chore: linting
0xJem Sep 16, 2024
76cdec9
Merge pull request #188 from OlympusDAO/legacy-burner
0xJem Sep 16, 2024
a2a0fe4
Rename & some comments
chefomi Sep 16, 2024
43a7424
initialize with function, not constructor
chefomi Sep 16, 2024
a2d2efb
use heart as distributor
chefomi Sep 16, 2024
4b3eae5
revert: heart staking changes
Oighty Sep 17, 2024
0f19036
chore: rename compile cleanup
Oighty Sep 17, 2024
d949d29
fix: port over Heart Staking sync from rbs-v2
Oighty Sep 17, 2024
ac32be2
Merge branch 'develop' into protocoloop
Oighty Sep 17, 2024
2b98afb
script: add yield repo deploy sequence
Oighty Sep 17, 2024
8b5fefe
make backing for purchased a view func
chefomi Sep 17, 2024
603892f
chore: remove redundant test file
Oighty Sep 17, 2024
cfbcb96
fix: cache balance and backing to withdraw before burning
Oighty Sep 17, 2024
2d3d67f
chore: update BatchScript library
Oighty Sep 18, 2024
20cfdba
script: minor batch script updates
Oighty Sep 18, 2024
71c46de
script: YieldRepoInstall batch scripts
Oighty Sep 18, 2024
ecef9b4
fix: use upper wall min and don't create market if min > initial
Oighty Sep 20, 2024
f70cd76
deploy: yield repo and new heart
Oighty Sep 20, 2024
01f06cd
script: add role removal txn to yrf install
Oighty Sep 20, 2024
eb4401b
script: add batch shell script
Oighty Sep 20, 2024
48881e9
chore: rename batch file
Oighty Sep 20, 2024
74e2758
chore: update env.json
Oighty Sep 20, 2024
1355211
fix: batch script compatibility issues
Oighty Sep 20, 2024
8fae30d
Merge pull request #403 from OlympusDAO/protocoloop
Oighty Sep 23, 2024
b814fd3
feat: initial OCG activation script from other PR
Oighty Sep 23, 2024
dd6e0b5
feat: modify existing script for current needs
Oighty Sep 23, 2024
d9ac463
fix: remove distributor_admin grant since it's not needed anymore
Oighty Sep 23, 2024
5a617c6
feat: add notional first OCG proposal and update batch script
Oighty Sep 25, 2024
e766289
sim: push admin prior to proposal test, success
Oighty Sep 28, 2024
7e2b6b9
chore: rename ocg test to follow convention
Oighty Sep 28, 2024
e324b2e
content: add proposal ID and description
Oighty Oct 1, 2024
4e2c6da
fix: don't depend on modified sim
Oighty Oct 4, 2024
6d45e3c
Merge pull request #411 from OlympusDAO/ocg-activation
0xJem Oct 9, 2024
1f0041e
Fix formatter used by VSCode
0xJem Oct 9, 2024
304ba1b
Avoid stalling due to formatting on save
0xJem Oct 9, 2024
13dc7f6
Extra logs in deploy script
0xJem Oct 10, 2024
0cb8445
Cross-port extensions and solidity metrics from PR #203
0xJem Oct 14, 2024
67802e5
Cross-port metrics script from PR #203
0xJem Oct 14, 2024
9bc5681
Add solidity-code-metrics dependency from PR #203
0xJem Oct 14, 2024
53d2f81
Cross-port script improvements from PR #203
0xJem Oct 16, 2024
46854cd
Update prettier ignore list
0xJem Oct 16, 2024
6645651
Add Markdown linting
0xJem Oct 16, 2024
38ac084
Improve markdownlint config
0xJem Oct 16, 2024
1c341fc
chore: linting
0xJem Oct 16, 2024
bd88440
chore: remove proposal sims from CI since they will fail after executed
Oighty Oct 16, 2024
0a37757
chore: bump node version in CI
Oighty Oct 16, 2024
d9bed1c
Fix linting error
0xJem Oct 18, 2024
ef66a20
Revert "chore: remove proposal sims from CI since they will fail afte…
0xJem Oct 18, 2024
886dbf3
Pin the OIP 166 test to a block prior to proposal, otherwise it will …
0xJem Oct 18, 2024
94effb7
Merge pull request #425 from OlympusDAO/script-improvements
0xJem Oct 22, 2024
5528adf
Merge branch 'bophades-develop' into bophades-merge
0xJem Nov 12, 2024
fd9adb2
Remove non-submodule dependencies
0xJem Nov 12, 2024
22c75ba
Re-add dependencies as submodules
0xJem Nov 12, 2024
f45cfa5
chore: linting
0xJem Nov 12, 2024
7a72e71
Merge pull request #15 from OlympusDAO/bophades-merge
0xJem Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .env.deploy.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CHAIN=goerli
GUARDIAN_ADDRESS=0x0000000000000000000000000000000000000000
POLICY_ADDRESS=0x0000000000000000000000000000000000000000
EMERGENCY_ADDRESS=0x0000000000000000000000000000000000000000
RPC_URL=CHANGEME
ETHERSCAN_KEY=CHANGEME
DEPLOYER=CHANGEME
PRIVATE_KEY=CHANGEME
89 changes: 89 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Addresses and Chain Information
PRIVATE_KEY= # Deployer private key
ETH_FROM= # Deployer
RPC_URL=
CHAIN=
FORK_RPC_URL=
BLOCK_NUMBER=
GUARDIAN_ADDRESS=
GUARDIAN_PRIVATE_KEY=
POLICY_ADDRESS=
POLICY_PRIVATE_KEY=
GOV_ADDRESS=
GOV_PRIVATE_KEY=
ETHERSCAN_KEY=
FORK_TEST_RPC_URL=

# Contracts

# Bond Contracts
BOND_AGGREGATOR_ADDRESS=
BOND_TELLER_ADDRESS=
BOND_SDA_ADDRESS=

# Tokens
# Goerli
DAI_ADDRESS=0x41e38e70a36150D08A8c97aEC194321b5eB545A5
OHM_ADDRESS=0x0595328847AF962F951a4f8F8eE9A3Bf261e4f6b
STAKING_ADDRESS=0x7263372b9ff6E619d8774aEB046cE313677E2Ec7
# Mainnet
# DAI_ADDRESS=0x6B175474E89094C44Da98b954EedeAC495271d0F
# OHM_ADDRESS=0x64aa3364F17a4D01c6f1751Fd97C2BD3D7e7f1D5
# STAKING_ADDRESS=0xB63cac384247597756545b500253ff8E607a8020

# Price Feeds
# Goerli
OHM_ETH_FEED=0x022710a589C9796dce59A0C52cA4E36f0a5e991A
DAI_ETH_FEED=0xdC8E4eD326cFb730a759312B6b1727C6Ef9ca233
# Mainnet
# OHM_ETH_FEED=0x9a72298ae3886221820B1c878d12D872087D3a23
# DAI_ETH_FEED=0x773616E4d11A78F511299002da57A0a94577F1f4

# Staking Params
REWARD_RATE=64770 # 0.006477% per OIP-119

# Bophades
KERNEL=
INSTR=
TRSRY=
MINTR=
PRICE=
RANGE=
ROLES=
CALLBACK=
OPERATOR=
HEART=
PRICECONFIG=
ROLESADMIN=
TRSRYCUSTODIAN=
DISTRIBUTOR=
FAUCET=
# Old Contracts
AUTHORITY_ADDRESS=0x4A8c9502A34962a2C6d73c5D181dAaeF3dcDc88D

# Simulation configuration items

# Setup
KEYS=1 # Number of sims per seed
EPOCHS=1095 # Number of epochs per sim, 1 year = 1095
EPOCH_DURATION=28800 # 8 hours, Duration of each epoch in seconds
REBALANCE_FREQUENCY=604800 # 7 days, Frequency, in seconds, to rebalance liquidity
MA_DURATION=2592000 # 30 days, duration of moving average in seconds

# Simulation starting values
INITIAL_PRICE=14120000000000000000 # Price of OHM in USD, 18 decimals
MOVING_AVERAGE=14170000000000000000 # 30 DAY MA price, 18 decimals
SUPPLY=25000000000000000 # in OHM, 9 decimals
RESERVES=250000000000000000000000000 # in USD, 18 decimals
LIQUIDITY=25000000000000000000000000 # in USD, 18 decimals

# RBS parameters that are not provided in params.json
CUSHION_DURATION=86400 # 1 day, Cushion duration in seconds
CUSHION_DEBT_BUFFER=100000 # 100%, Percent with 3 decimals, i.e. 1000 = 1%
CUSHION_DEPOSIT_INTERVAL=14400 # 4 hours, Duration of each cushion deposit interval in seconds
REGEN_WAIT=518400 # 6 days, in seconds, time to wait before regenerating reserves.
# This value is the same as 18 positives obs in a row so no more than required to regen on observations
REGEN_THRESHOLD=18 # Number of positive observations to regenerate wall
REGEN_OBSERVE=21 # Number of observations to make at a time to regenerate wall
THRESHOLD_FACTOR=100 # 1%, percent with 2 decimals, i.e. 100 = 1%
MAX_OUTFLOW_RATE=330 # 3.3%, percent with 2 decimals, i.e. 100 = 1%
31 changes: 26 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
- master
pull_request:

env:
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
POLYGON_MAINNET_RPC_URL: ${{ secrets.POLYGON_MAINNET_RPC_URL }}

jobs:
run-ci:
runs-on: ubuntu-latest
Expand All @@ -18,7 +14,9 @@ jobs:
with:
submodules: recursive

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v2
with:
Expand Down Expand Up @@ -53,3 +51,26 @@ jobs:

- name: Run cross-chain fork tests
run: pnpm run test:crosschainfork
env:
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
POLYGON_MAINNET_RPC_URL: ${{ secrets.POLYGON_MAINNET_RPC_URL }}

# FYI: currently version 1.14
- name: Setup lcov
uses: hrishikesh-kadam/setup-lcov@v1

- name: Run Code Coverage
run: pnpm run test:coverage

- name: Add Artifacts
uses: actions/upload-artifact@v3
with:
name: lcov.info
path: lcov.info

- name: Report Code Coverage
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
update-comment: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ src/test/sim/sims/*.t.sol
.env_deploy*
docs/
coverage/
/solidity-metrics.html
24 changes: 24 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[submodule "lib/ds-test"]
path = lib/ds-test
url = https://github.com/dapphub/ds-test
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
branch = main
[submodule "lib/solidity-examples"]
path = lib/solidity-examples
url = https://github.com/LayerZero-Labs/solidity-examples
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
branch = v4.8.0
[submodule "lib/clones-with-immutable-args"]
path = lib/clones-with-immutable-args
url = https://github.com/wighawag/clones-with-immutable-args
[submodule "lib/forge-proposal-simulator"]
path = lib/forge-proposal-simulator
url = https://github.com/OlympusDAO/forge-proposal-simulator

10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"list-marker-space": {
"ul_multi": 1,
"ul_single": 1
},
"ul-indent": {
"indent": 4
},
"MD013": false
}
6 changes: 6 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
out/
docs/
cache/
coverage/
lib/
8 changes: 6 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ src/test/lib/larping.sol
src/test/mocks/MockModuleWriter.sol
src/test/lib/quabi/Quabi.sol
src/test/sim/RangeSim.sol
src/scripts/Deploy.sol
src/scripts/DeployV2.sol
cache/
coverage/
docs/
lib/
node_modules/
out/
2 changes: 1 addition & 1 deletion .solhintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
src/test/**/*.sol
src/scripts/**/*.sol
src/scripts/**/*.sol
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"nomicfoundation.hardhat-solidity",
"gruntfuggly.todo-tree",
"ryanluker.vscode-coverage-gutters",
"github.vscode-github-actions",
"d-koppenhagen.file-tree-to-text-generator"
]
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"solidity.formatter": "prettier",
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
},
"solidity.defaultCompiler": "remote",
"solidity.compileUsingRemoteVersion": "v0.8.15+commit.e14f2714",
"solidity-metrics.file.exclusions.glob": "{**/node_modules,**/mock*,**/test*,**/migrations,**/Migrations.sol,lib,**/external,**/libraries,**/interfaces}",
"solidity.monoRepoSupport": false
}
12 changes: 7 additions & 5 deletions CODE_STD.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,23 @@ The following establishes a coding standard for the Olympus v3/Bophades repo.
- NatSpec comments use `///`
- `/// @notice Natspec comment`
- Contract and function groups or other major sections in SOURCE files should be denoted with
```
- This is to denote sections when scrolling through large files

```solidity
//============================================================================================//
// HEADER //
//============================================================================================//
```
- This is to denote sections when scrolling through large files
- All other sections should be denoted with single line header:
```// ========= HEADER ========= // ```

- All other sections should be denoted with single line header:
`// ========= HEADER ========= //`

## Principles (NOT HARD RULES)

- Aim for clear and succinct code
- Explicit over implicit
- Write code PRIMARILY for humans, not machines
- Comment on WHY, not WHAT. Code should be able to explain "what".
- Aim to write code that is self-documenting
- Meaning clear function names and variables
- Aim for gas-efficiency with above constraints
- Aim for gas-efficiency with above constraints
Loading
Loading