Skip to content

Commit 5b8856c

Browse files
committed
Merge branch 'master' into DanielVF/ousd-rebasing-migration-tidy
2 parents 2f63c44 + 19feba2 commit 5b8856c

File tree

148 files changed

+2201
-673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2201
-673
lines changed

brownie/runlogs/2023_03_strategist.py

Lines changed: 317 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# --------------------------------
3-
# Feb 28, 2023 - Weekly allocation
3+
# Mar 10, 2023 - Weekly allocation
44
#
55

66
from addresses import *
@@ -56,4 +56,319 @@
5656
# safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC')
5757
# safe_tx = safe.multisend_from_receipts(txs)
5858
# safe.sign_with_frame(safe_tx)
59-
# r = safe.post_transaction(safe_tx)
59+
# r = safe.post_transaction(safe_tx)
60+
61+
62+
63+
# --------------------------------
64+
# March 10, 2023 - USDC Depeg
65+
#
66+
67+
from addresses import *
68+
from world import *
69+
from allocations import *
70+
from ape_safe import ApeSafe
71+
72+
votes = """
73+
Morpho Aave USDT 39.04%
74+
Convex OUSD+3Crv 32.18%
75+
Morpho Aave DAI 9.23%
76+
Morpho Aave USDC 9.23%
77+
Convex DAI+USDC+USDT 4.96%
78+
Aave USDT 1.02%
79+
Compound USDC 1.02%
80+
Morpho Compound DAI 1.02%
81+
Morpho Compound USDC 1.02%
82+
Morpho Compound USDT 1.02%
83+
Convex LUSD+3Crv 0.3%
84+
Existing Allocation 0%
85+
Aave DAI 0%
86+
Aave USDC 0%
87+
Compound DAI 0%
88+
Compound USDT 0%
89+
"""
90+
91+
with TemporaryForkWithVaultStats(votes):
92+
before_votes = with_target_allocations(load_from_blockchain(), votes)
93+
94+
txs = []
95+
txs.extend(auto_take_snapshot())
96+
97+
# From
98+
txs.append(vault_admin.withdrawAllFromStrategy(LUSD_3POOL_STRAT, {'from': STRATEGIST}))
99+
txs.append(vault_admin.withdrawAllFromStrategy(CONVEX_STRAT, {'from': STRATEGIST}))
100+
101+
txs.extend(auto_check_snapshot())
102+
103+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
104+
105+
106+
safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC')
107+
safe_tx = safe.multisend_from_receipts(txs)
108+
safe.sign_with_frame(safe_tx)
109+
r = safe.post_transaction(safe_tx)
110+
111+
112+
113+
# --------------------------------
114+
# March 10, 2023 - USDC Depeg
115+
#
116+
117+
from addresses import *
118+
from world import *
119+
from allocations import *
120+
from ape_safe import ApeSafe
121+
122+
votes = """
123+
Morpho Aave USDT 39.04%
124+
Convex OUSD+3Crv 32.18%
125+
Morpho Aave DAI 9.23%
126+
Morpho Aave USDC 9.23%
127+
Convex DAI+USDC+USDT 4.96%
128+
Aave USDT 1.02%
129+
Compound USDC 1.02%
130+
Morpho Compound DAI 1.02%
131+
Morpho Compound USDC 1.02%
132+
Morpho Compound USDT 1.02%
133+
Convex LUSD+3Crv 0.3%
134+
Existing Allocation 0%
135+
Aave DAI 0%
136+
Aave USDC 0%
137+
Compound DAI 0%
138+
Compound USDT 0%
139+
"""
140+
141+
with TemporaryForkWithVaultStats(votes):
142+
before_votes = with_target_allocations(load_from_blockchain(), votes)
143+
144+
txs = []
145+
txs.extend(auto_take_snapshot())
146+
147+
# From
148+
txs.append(vault_admin.withdrawAllFromStrategy(OUSD_METASTRAT, {'from': STRATEGIST}))
149+
150+
txs.extend(auto_check_snapshot())
151+
152+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
153+
154+
155+
safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC')
156+
safe_tx = safe.multisend_from_receipts(txs)
157+
safe.sign_with_frame(safe_tx)
158+
r = safe.post_transaction(safe_tx)
159+
160+
161+
162+
# --------------------------------
163+
# March 10, 2023 - USDC Depeg
164+
#
165+
166+
from addresses import *
167+
from world import *
168+
from allocations import *
169+
from ape_safe import ApeSafe
170+
171+
votes = """
172+
Morpho Aave USDT 39.04%
173+
Convex OUSD+3Crv 32.18%
174+
Morpho Aave DAI 9.23%
175+
Morpho Aave USDC 9.23%
176+
Convex DAI+USDC+USDT 4.96%
177+
Aave USDT 1.02%
178+
Compound USDC 1.02%
179+
Morpho Compound DAI 1.02%
180+
Morpho Compound USDC 1.02%
181+
Morpho Compound USDT 1.02%
182+
Convex LUSD+3Crv 0.3%
183+
Existing Allocation 0%
184+
Aave DAI 0%
185+
Aave USDC 0%
186+
Compound DAI 0%
187+
Compound USDT 0%
188+
"""
189+
190+
with TemporaryForkWithVaultStats(votes):
191+
before_votes = with_target_allocations(load_from_blockchain(), votes)
192+
193+
txs = []
194+
txs.extend(auto_take_snapshot())
195+
196+
# From
197+
# txs.append(vault_admin.withdrawAllFromStrategy(LUSD_3POOL_STRAT, {'from': STRATEGIST}))
198+
txs.append(vault_admin.withdrawAllFromStrategy(CONVEX_STRAT, {'from': STRATEGIST}))
199+
200+
txs.extend(auto_check_snapshot())
201+
202+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
203+
204+
205+
safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC')
206+
safe_tx = safe.multisend_from_receipts(txs)
207+
safe.sign_with_frame(safe_tx)
208+
r = safe.post_transaction(safe_tx)
209+
210+
211+
212+
# --------------------------------
213+
# March 10, 2023 - More Depeg
214+
#
215+
216+
from addresses import *
217+
from world import *
218+
from allocations import *
219+
from ape_safe import ApeSafe
220+
221+
votes = """
222+
Morpho Aave USDT 39.04%
223+
Convex OUSD+3Crv 32.18%
224+
Morpho Aave DAI 9.23%
225+
Morpho Aave USDC 9.23%
226+
Convex DAI+USDC+USDT 4.96%
227+
Aave USDT 1.02%
228+
Compound USDC 1.02%
229+
Morpho Compound DAI 1.02%
230+
Morpho Compound USDC 1.02%
231+
Morpho Compound USDT 1.02%
232+
Convex LUSD+3Crv 0.3%
233+
Existing Allocation 0%
234+
Aave DAI 0%
235+
Aave USDC 0%
236+
Compound DAI 0%
237+
Compound USDT 0%
238+
"""
239+
240+
with TemporaryForkWithVaultStats(votes):
241+
before_votes = with_target_allocations(load_from_blockchain(), votes)
242+
243+
txs = []
244+
# txs.extend(auto_take_snapshot())
245+
246+
# From
247+
txs.append(from_strat(MORPHO_COMP_STRAT, [[483_083, dai], [526_766, usdc], [3_155_766, usdt]]))
248+
txs.append(from_strat(MORPHO_AAVE_STRAT, [ [3_155_766, usdt]]))
249+
250+
# txs.extend(auto_check_snapshot())
251+
252+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
253+
254+
255+
safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC')
256+
safe_tx = safe.multisend_from_receipts(txs)
257+
safe.sign_with_frame(safe_tx)
258+
r = safe.post_transaction(safe_tx)
259+
260+
261+
# --------------------------------
262+
# March 11, 2023 - Depeg IN
263+
#
264+
265+
from addresses import *
266+
from world import *
267+
from allocations import *
268+
from ape_safe import ApeSafe
269+
270+
votes = """
271+
Morpho Aave USDT 39.04%
272+
Convex OUSD+3Crv 32.18%
273+
Morpho Aave DAI 9.23%
274+
Morpho Aave USDC 9.23%
275+
Convex DAI+USDC+USDT 4.96%
276+
Aave USDT 1.02%
277+
Compound USDC 1.02%
278+
Morpho Compound DAI 1.02%
279+
Morpho Compound USDC 1.02%
280+
Morpho Compound USDT 1.02%
281+
Convex LUSD+3Crv 0.3%
282+
Existing Allocation 0%
283+
Aave DAI 0%
284+
Aave USDC 0%
285+
Compound DAI 0%
286+
Compound USDT 0%
287+
"""
288+
289+
with TemporaryForkWithVaultStats(votes):
290+
before_votes = with_target_allocations(load_from_blockchain(), votes)
291+
292+
txs = []
293+
txs.extend(auto_take_snapshot())
294+
295+
# From
296+
txs.append(to_strat(OUSD_METASTRAT, [[1_000_000, usdc]]))
297+
298+
txs.extend(auto_check_snapshot())
299+
300+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
301+
302+
303+
safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC')
304+
safe_tx = safe.multisend_from_receipts(txs)
305+
safe.sign_with_frame(safe_tx)
306+
r = safe.post_transaction(safe_tx)
307+
308+
309+
310+
# --------------------------------
311+
# March 16, 2023 - Weekly allocation
312+
#
313+
314+
from addresses import *
315+
from world import *
316+
from allocations import *
317+
from ape_safe import ApeSafe
318+
319+
votes = """
320+
Convex OUSD+3Crv 32.08%
321+
Morpho Compound USDT 27.97%
322+
Existing Allocation 11.92%
323+
Morpho Aave USDT 9.59%
324+
Aave USDT 8.88%
325+
Morpho Compound DAI 3.58%
326+
Morpho Compound USDC 3.58%
327+
Morpho Aave DAI 1.19%
328+
Morpho Aave USDC 1.19%
329+
Aave DAI 0%
330+
Aave USDC 0%
331+
Compound DAI 0%
332+
Compound USDC 0%
333+
Compound USDT 0%
334+
Convex DAI+USDC+USDT 0%
335+
Convex LUSD+3Crv 0%
336+
"""
337+
338+
with TemporaryForkWithVaultStats(votes):
339+
before_votes = with_target_allocations(load_from_blockchain(), votes)
340+
341+
txs = []
342+
txs.extend(auto_take_snapshot())
343+
344+
# From
345+
txs.append(vault_admin.withdrawAllFromStrategy(COMP_STRAT, {'from':STRATEGIST}))
346+
# the minus 721_000 is because we can't deploy those funds to MORPHO_COMP_STRAT
347+
# because the USDC is paused in there
348+
txs.append(from_strat(MORPHO_AAVE_STRAT, [[4_660_800, dai], [5_576_000, usdc], [5_923_000, usdt]]))
349+
350+
# Swap
351+
txs.append(to_strat(CONVEX_STRAT, [[3_943_000, dai]]))
352+
txs.append(from_strat(CONVEX_STRAT, [[3_933_000, usdt]]))
353+
354+
# To
355+
txs.append(to_strat(OUSD_METASTRAT, [[5_910_000, usdc]]))
356+
txs.append(to_strat(AAVE_STRAT, [[2_233_000, usdt]]))
357+
358+
txs.append(to_strat(MORPHO_COMP_STRAT, [[721_000, dai], [7_600_000, usdt]]))
359+
#txs.append(to_strat(COMP_STRAT, [[323_000, usdc]]))
360+
#txs.append(to_strat(AAVE_STRAT, [[323_000, usdt]]))
361+
#txs.append(to_strat(CONVEX_STRAT, [[257_000, dai], [257_000, usdc], [257_000, usdt]]))
362+
363+
# # Defaults
364+
# txs.append(vault_admin.setAssetDefaultStrategy(dai, MORPHO_AAVE_STRAT,{'from':STRATEGIST}))
365+
366+
txs.extend(auto_check_snapshot())
367+
368+
print("Est Gas Max: {:,}".format(1.10*sum([x.gas_used for x in txs])))
369+
370+
371+
# safe = ApeSafe('0xF14BBdf064E3F67f51cd9BD646aE3716aD938FDC')
372+
# safe_tx = safe.multisend_from_receipts(txs)
373+
# safe.sign_with_frame(safe_tx)
374+
# r = safe.post_transaction(safe_tx)

contracts/contracts/buyback/Buyback.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
import { Strategizable } from "../governance/Strategizable.sol";

contracts/contracts/compensation/CompensationClaims.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contracts/contracts/crytic/PropertiesOUSDTransferable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
import "./interfaces.sol";

contracts/contracts/crytic/TestOUSDTransferable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
import "./PropertiesOUSDTransferable.sol";

contracts/contracts/crytic/interfaces.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
contract CryticInterface {

contracts/contracts/flipper/Flipper.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
import "../governance/Governable.sol";

contracts/contracts/governance/Governable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
/**

contracts/contracts/governance/Governor.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
import "./../timelock/Timelock.sol";

contracts/contracts/governance/InitializableGovernable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: agpl-3.0
1+
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

44
/**

0 commit comments

Comments
 (0)