-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into yield-repo
# Conflicts: # src/test/policies/Heart.t.sol # src/test/policies/YieldRepurchaseFacility.t.sol # src/test/sim/RangeSim.sol
- Loading branch information
Showing
1,898 changed files
with
15,884 additions
and
311,525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: OCG Proposals | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
run-ci: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 9 | ||
|
||
- name: Install Node dependencies | ||
run: pnpm install | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
|
||
- name: Install Foundry dependencies | ||
run: pnpm run build | ||
|
||
- name: Run proposal simulation tests | ||
run: pnpm run test:proposal | ||
env: | ||
FORK_TEST_RPC_URL: ${{ secrets.FORK_TEST_RPC_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ src/test/sim/sims/*.t.sol | |
.env_deploy* | ||
docs/ | ||
coverage/ | ||
/solidity-metrics.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/ | ||
out/ | ||
docs/ | ||
cache/ | ||
coverage/ | ||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
src/test/**/*.sol | ||
src/scripts/**/*.sol | ||
src/scripts/**/*.sol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.