Skip to content

Commit 39704e8

Browse files
committed
Merge upstream
2 parents b4bb545 + a89e9b7 commit 39704e8

File tree

13 files changed

+233
-72
lines changed

13 files changed

+233
-72
lines changed

.github/workflows/defi.yml

Lines changed: 54 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: DeFi
22
on:
33
pull_request:
4-
types: [opened, reopened]
5-
push:
4+
types: [opened, reopened, synchronize]
65
workflow_dispatch:
76

87
concurrency:
@@ -52,15 +51,15 @@ jobs:
5251
run: yarn run test:coverage
5352
working-directory: ./contracts
5453

55-
# - uses: actions/upload-artifact@v3
56-
# with:
57-
# name: unit-test-coverage-${{ github.head_ref }}-${{ github.sha }}
58-
# path: |
59-
# ./contracts/coverage.json
60-
# ./contracts/coverage/**/*
61-
# retention-days: 1
54+
- uses: actions/upload-artifact@v3
55+
with:
56+
name: unit-test-coverage-${{ github.sha }}
57+
path: |
58+
./contracts/coverage.json
59+
./contracts/coverage/**/*
60+
retention-days: 1
6261

63-
- uses: codecov/codecov-action@v3
62+
# - uses: codecov/codecov-action@v3
6463

6564
contracts-forktest:
6665
name: "Contracts Fork Tests"
@@ -92,31 +91,51 @@ jobs:
9291
- run: yarn run test:coverage:fork
9392
working-directory: ./contracts
9493

95-
# - uses: actions/upload-artifact@v3
96-
# with:
97-
# name: fork-test-coverage-${{ github.head_ref }}-${{ github.sha }}
98-
# path: |
99-
# ./contracts/coverage.json
100-
# ./contracts/coverage/**/*
101-
# retention-days: 1
102-
103-
# coverage-uploader:
104-
# name: "Upload Coverage Reports"
105-
# runs-on: ubuntu-latest
106-
# needs:
107-
# - contracts-test
108-
# - contracts-forktest
109-
# steps:
110-
# - uses: actions/download-artifact@v3
111-
# with:
112-
# name: fork-test-coverage-${{ github.head_ref }}-${{ github.sha }}
113-
# path: ./fork-coverage
114-
# - uses: actions/download-artifact@v3
115-
# with:
116-
# name: unit-test-coverage-${{ github.head_ref }}-${{ github.sha }}
117-
# path: ./unit-coverage
118-
119-
# - uses: codecov/codecov-action@v3
94+
- uses: actions/upload-artifact@v3
95+
with:
96+
name: fork-test-coverage-${{ github.sha }}
97+
path: |
98+
./contracts/coverage.json
99+
./contracts/coverage/**/*
100+
retention-days: 1
101+
102+
coverage-uploader:
103+
name: "Upload Coverage Reports"
104+
runs-on: ubuntu-latest
105+
needs:
106+
- contracts-test
107+
- contracts-forktest
108+
steps:
109+
- uses: actions/checkout@v3
110+
111+
- name: Use Node.js
112+
uses: actions/setup-node@v2
113+
with:
114+
node-version: "16.x"
115+
cache: "yarn"
116+
cache-dependency-path: contracts/yarn.lock
117+
118+
- uses: actions/cache@v3
119+
id: hardhat-cache
120+
with:
121+
path: contracts/cache
122+
key: ${{ runner.os }}-hardhat-${{ hashFiles('contracts/cache/*.json') }}
123+
restore-keys: |
124+
${{ runner.os }}-hardhat-cache
125+
126+
- run: yarn install --frozen-lockfile
127+
working-directory: ./contracts
128+
129+
- uses: actions/download-artifact@v3
130+
with:
131+
name: fork-test-coverage-${{ github.sha }}
132+
path: ./fork-coverage
133+
- uses: actions/download-artifact@v3
134+
with:
135+
name: unit-test-coverage-${{ github.sha }}
136+
path: ./unit-coverage
137+
138+
- uses: codecov/codecov-action@v3
120139

121140
dapp-lint:
122141
name: "OUSD DApp Linter"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Checkout our [docs](https://docs.ousd.com) for more details about the product.
55

66
| Branch | CI/CD Status |
77
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
8-
| `master` | [![OUSD](https://github.com/OriginProtocol/origin-dollar/actions/workflows/ousd.yml/badge.svg)](https://github.com/OriginProtocol/origin-dollar/actions/workflows/ousd.yml) |
9-
| `staging` | [![OUSD](https://github.com/OriginProtocol/origin-dollar/actions/workflows/ousd.yml/badge.svg?branch=staging)](https://github.com/OriginProtocol/origin-dollar/actions/workflows/ousd.yml?query=branch%3Astaging) |
10-
| `stable` | [![OUSD](https://github.com/OriginProtocol/origin-dollar/actions/workflows/ousd.yml/badge.svg?branch=stable)](https://github.com/OriginProtocol/origin-dollar/actions/workflows/ousd.yml?query=branch%3Astable) |
8+
| `master` | [![Origin DeFi](https://github.com/OriginProtocol/origin-dollar/actions/workflows/defi.yml/badge.svg)](https://github.com/OriginProtocol/origin-dollar/actions/workflows/defi.yml) |
9+
| `staging` | [![Origin DeFi](https://github.com/OriginProtocol/origin-dollar/actions/workflows/defi.yml/badge.svg?branch=staging)](https://github.com/OriginProtocol/origin-dollar/actions/workflows/defi.yml?query=branch%3Astaging) |
10+
| `stable` | [![Origin DeFi](https://github.com/OriginProtocol/origin-dollar/actions/workflows/defi.yml/badge.svg?branch=stable)](https://github.com/OriginProtocol/origin-dollar/actions/workflows/defi.yml?query=branch%3Astable) |
1111

1212
## Requirements
1313

brownie/runlogs/2023_06_strategist.py

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,115 @@
9090
print("Transaction ", idx)
9191
print("To: ", item.receiver)
9292
print("Data (Hex encoded): ", item.input, "\n")
93+
94+
95+
# --------------------------------
96+
# June 6, 2023 - OUSD Deposit to Aave
97+
# --------------------------------
98+
99+
from addresses import *
100+
from world import *
101+
from allocations import *
102+
from ape_safe import ApeSafe
103+
104+
votes = """
105+
Morpho Aave USDT 66.61%
106+
Morpho Aave DAI 8.06%
107+
Morpho Aave USDC 7.97%
108+
Convex DAI+USDC+USDT 7.71%
109+
Aave DAI 7.4%
110+
Convex OUSD+3Crv 1.84%
111+
Convex LUSD+3Crv 0.39%
112+
Existing Allocation 0%
113+
Aave USDC 0%
114+
Aave USDT 0%
115+
Compound DAI 0%
116+
Compound USDC 0%
117+
Compound USDT 0%
118+
Morpho Compound DAI 0%
119+
Morpho Compound USDC 0%
120+
Morpho Compound USDT 0%
121+
"""
122+
123+
with TemporaryForkWithVaultStats(votes):
124+
txs = []
125+
txs.extend(auto_take_snapshot())
126+
txs.append(to_strat(AAVE_STRAT, [[2_250_000, dai],[2_000_000, usdc],[14_740_000, usdt]]))
127+
128+
txs.append(vault_admin.setVaultBuffer(0, {'from':STRATEGIST}))
129+
130+
# Defaults
131+
txs.append(vault_admin.setAssetDefaultStrategy(dai, AAVE_STRAT,{'from':STRATEGIST}))
132+
txs.append(vault_admin.setAssetDefaultStrategy(usdc, AAVE_STRAT,{'from':STRATEGIST}))
133+
txs.append(vault_admin.setAssetDefaultStrategy(usdt, AAVE_STRAT,{'from':STRATEGIST}))
134+
135+
txs.extend(auto_check_snapshot())
136+
137+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
138+
139+
print("Schedule the following transactions on Gnosis Safe")
140+
for idx, item in enumerate(txs):
141+
print("Transaction ", idx)
142+
print("To: ", item.receiver)
143+
print("Data (Hex encoded): ", item.input, "\n")
144+
145+
146+
# --------------------------------
147+
# June 9th, 2023 - Allocation
148+
# --------------------------------
149+
150+
from addresses import *
151+
from world import *
152+
from allocations import *
153+
from ape_safe import ApeSafe
154+
155+
votes = """
156+
Morpho Aave USDT 40.23%
157+
Morpho Aave DAI 0%
158+
Morpho Aave USDC 0%
159+
Convex DAI+USDC+USDT 0.56%
160+
Convex OUSD+3Crv 7.05%
161+
Convex LUSD+3Crv 0.02%
162+
Existing Allocation 0%
163+
Aave DAI 1.16%
164+
Aave USDC 7.25%
165+
Aave USDT 4.02%
166+
Compound DAI 0%
167+
Compound USDC 0%
168+
Compound USDT 0%
169+
Morpho Compound DAI 0%
170+
Morpho Compound USDC 0%
171+
Morpho Compound USDT 39.71%
172+
"""
173+
174+
with TemporaryForkWithVaultStats(votes):
175+
txs = []
176+
txs.extend(auto_take_snapshot())
177+
178+
# From
179+
txs.append(from_strat(AAVE_STRAT, [[3_996_000, dai], [288_000, usdc], [13_960_000, usdt]]))
180+
txs.append(from_strat(LUSD_3POOL_STRAT, [[100_000, usdt]]))
181+
182+
# Swap
183+
txs.append(to_strat(CONVEX_STRAT, [[3_995_000, dai]]))
184+
# = 3_995_000 + 1_925_000 = 5_920_000
185+
txs.append(from_strat(CONVEX_STRAT, [[5_920_000, usdt]]))
186+
187+
# To
188+
txs.append(to_strat(MORPHO_AAVE_STRAT, [[9_955_000, usdt]]))
189+
txs.append(to_strat(OUSD_METASTRAT, [[288_000, usdc], [200_000, usdt]]))
190+
txs.append(to_strat(MORPHO_COMP_STRAT, [[9_827_000, usdt]]))
191+
192+
# Defaults
193+
txs.append(vault_admin.setAssetDefaultStrategy(usdt, MORPHO_AAVE_STRAT,{'from':STRATEGIST}))
194+
195+
txs.extend(auto_check_snapshot())
196+
197+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
198+
199+
print("Schedule the following transactions on Gnosis Safe")
200+
for idx, item in enumerate(txs):
201+
print("Transaction ", idx)
202+
print("To: ", item.receiver)
203+
print("Data (Hex encoded): ", item.input, "\n")
204+

contracts/deployments/mainnet/.migrations.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@
4646
"048_deposit_withdraw_tooling": 1675100084,
4747
"049_oeth_proxy": 1680121187,
4848
"050_woeth_proxy": 1680301283,
49+
"051_upgrade_buyback": 1683206771,
4950
"053_oeth": 1681746345,
5051
"054_woeth": 1681746545,
52+
"055_curve_amo": 1683966879,
5153
"056_oeth_zapper_again": 1682535005,
5254
"058_oeth_vault_value_checker": 1683419766,
53-
"055_curve_amo": 1683966879,
54-
"056_harvest_crv_limit": 17287144,
55+
"059_harvest_crv_limit": 1684421507,
56+
"060_harvest_crv_limit_2": 1684798511,
5557
"061_oeth_timelock_part_1": 1685054965,
5658
"062_oeth_timelock_part_2": 1685054965,
5759
"063_oeth_harvest_crv_limit": 1685178827,
38.5 KB
Loading
74.6 KB
Loading
-38.6 KB
Loading
34.5 KB
Loading
58.1 KB
Loading
45.3 KB
Loading

0 commit comments

Comments
 (0)