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

feat: deployment #10

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 50 additions & 0 deletions broadcast/DeploySiloFactory.s.sol/1/run-1722544362.json

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions broadcast/DeploySiloFactory.s.sol/1/run-1722546634.json

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions broadcast/DeploySiloFactory.s.sol/1/run-1722546820.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions broadcast/DeploySiloFactory.s.sol/1/run-latest.json

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions script/DeploySiloFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,25 @@ import "forge-std/Script.sol";
// forge script script/DeploySiloFactory.s.sol:DeploySiloFactory --verify --legacy --etherscan-api-key $KEY --rpc-url $RPC_URL --broadcast

// verify:
// --constructor-args $(cast abi-encode "constructor(address,address,address)" 0x8658047e48CC09161f4152c79155Dac1d710Ff0a 0x1dcAD21ccD74b7A8A7BC7D19894de8Af41D9ea03 0x5C1E6bA712e9FC3399Ee7d5824B6Ec68A0363C02)
// --constructor-args $(cast abi-encode "constructor(address,address,address)" 0xbACBBefda6fD1FbF5a2d6A79916F4B6124eD2D49 0x6A16CFA0dF474f3cB1BF5bBa595248EEfb404e2b 0x318d0059efE546b5687FA6744aF4339391153981)
// forge verify-contract --etherscan-api-key $KEY --watch --chain-id 42161 --compiler-version v0.8.18+commit.87f61d96 --verifier-url https://api.arbiscan.io/api 0x9a5eca1b228e47a15BD9fab07716a9FcE9Eebfb5 src/ERC404/BaseERC404.sol:BaseERC404

// - acceptManagement()
// - setEmergencyAdmin() to 0x6346282DB8323A54E840c6C772B4399C9c655C0d
// - setMaxProfitUnlockTime to 86400
// - setKeeper to 0xE0D19f6b240659da8E87ABbB73446E7B4346Baee
// - addToken for ARB => USDC.e

contract DeploySiloFactory is Script {

// address private constant MANAGEMENT = 0x16388463d60FFE0661Cf7F1f31a7D658aC790ff7; // mainnet
address private constant MANAGEMENT = 0x1dcAD21ccD74b7A8A7BC7D19894de8Af41D9ea03; // arbitrum
address private constant MANAGEMENT = 0x6A16CFA0dF474f3cB1BF5bBa595248EEfb404e2b; // mainnet
// address private constant MANAGEMENT = 0x1dcAD21ccD74b7A8A7BC7D19894de8Af41D9ea03; // arbitrum
address private constant PERFORMANCE_FEE_RECIPIENT = 0x318d0059efE546b5687FA6744aF4339391153981; // yearn deployer

// ISiloRepository private constant REPO = ISiloRepository(0xBCd67f35c7A2F212db0AD7f68fC773b5aC15377c); // https://devdocs.silo.finance/security/smart-contracts#silo-llama-ethereum
// ISiloRepository private constant REPO = ISiloRepository(0xd998C35B7900b344bbBe6555cc11576942Cf309d); // https://devdocs.silo.finance/security/smart-contracts#silo-legacy-ethereum
ISiloRepository private constant REPO = ISiloRepository(0x8658047e48CC09161f4152c79155Dac1d710Ff0a); // https://devdocs.silo.finance/security/smart-contracts#silo-arbitrum
ISiloRepository private constant REPO = ISiloRepository(0xbACBBefda6fD1FbF5a2d6A79916F4B6124eD2D49); // https://devdocs.silo.finance/security/smart-contracts#silo-legacy-ethereum
// ISiloRepository private constant REPO = ISiloRepository(0x8658047e48CC09161f4152c79155Dac1d710Ff0a); // https://devdocs.silo.finance/security/smart-contracts#silo-arbitrum

function run() external {
vm.startBroadcast(vm.envUint("PRIVATE_KEY"));
Expand Down
34 changes: 27 additions & 7 deletions src/strategies/silo/deployments/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
------------ NOTES ------------

poolpi deployments - https://hackmd.io/qyPSHxCWT-G4jfMvAPzSqg
yHaaS Network Guide - https://hackmd.io/@mil0xeth/B1Ux3cLKR

Set up (arbitrum):
- acceptManagement() from committee multisig
- setEmergencyAdmin() to 0x6346282DB8323A54E840c6C772B4399C9c655C0d
- setMaxProfitUnlockTime to 86400 (1 day)
- setTradeFactory to whatever the trade factory address is...
- addToken for ARB => USDC.e
- setKeeper to 0xE0D19f6b240659da8E87ABbB73446E7B4346Baee (see yHaaS Network Guide)

Set up (mainnet):
- acceptManagement() from committee multisig
- setEmergencyAdmin() to XXX
- setMaxProfitUnlockTime to 86400 (1 day)
- setTradeFactory to whatever the trade factory address is...
- addToken for SILO => USDC
- setKeeper to 0x604e586F17cE106B64185A7a0d2c1Da5bAce711E (see yHaaS Network Guide)


------------ Mainnet ------------

Expand All @@ -13,6 +31,12 @@ Factory Llama Edition:
Factory Silo Legacy:
- 0xBa230f4Bf34E48D04e65dE9a0F6Fe5EcDAa0c17A

Factory Silo New:
- 0xbAF4Cb2A7182e5bD4abb54C6F116d56c0E8b588C

Stratagies Silo New:
- Silo Lender: USDC/PT-ezETH (26 Sep) - 0x8783C4aAf81B9312AdCCCcC09fa7B36b9d1f624f (need to set up)

------------ Arbitrum ------------

Vaults:
Expand All @@ -21,10 +45,6 @@ Vaults:
Factory:
- 0xDd737dADA46F3A111074dCE29B9430a7EA000092

Stratagies (deprecated):
- Silo Lender: USDC.e/wstETH - 0x034f12A217405D54bf2654b66A96fa74aD715951 -- update fee reciever
- Silo Lender: USDC.e/SILO - 0x9a5eca1b228e47a15BD9fab07716a9FcE9Eebfb5 -- REPLACE (outdated incentives controller)
- Staking Rewards Autocompounder: TODO

Staking:
- TODO
Stratagies:
- Silo Lender: USDC.e/wstETH - 0x127A7F610cc704Be6122dfa76eb61E84C9cb0Efd
- Silo Lender: USDC.e/wBTC - 0x2d25Ce68AAd6Ffef1585ff05bC621db1F9F2E499
4 changes: 2 additions & 2 deletions src/test/utils/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ contract Setup is Strategies, IEvents {
_setTokenAddrs();

// Set asset
// asset = ERC20(tokenAddrs["crvUSD"]);
asset = ERC20(tokenAddrs["USDC.e - Arbi"]);
asset = ERC20(tokenAddrs["crvUSD"]);
// asset = ERC20(tokenAddrs["USDC.e - Arbi"]);
// asset = ERC20(tokenAddrs["USDC.e - OP"]);

// Set decimals
Expand Down
25 changes: 13 additions & 12 deletions src/test/utils/Strategies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ contract Strategies is ExtendedTest {
address private constant _siloRepositoryARB = 0x8658047e48CC09161f4152c79155Dac1d710Ff0a;
address private constant _usdc = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; // 6 decimals
address private constant _incentivesControllerARB = 0x7e5BFBb25b33f335e34fa0d78b878092931F8D20; // SILO rewards
// 0xCC4933B0405Ae9DDFE05a54d20f56A0447c9EBcF // ARB rewards
address private constant _wstETH = 0x5979D7b546E38E414F7E9822514be443A4800529;
address private constant _crvArb = 0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978;

Expand All @@ -48,20 +49,20 @@ contract Strategies is ExtendedTest {
address private _borrower = address(420);

// Ethereum
// address private constant silo = _crvUSDYFISilo;
// address private constant borrowedAsset = _crvUSD;
// address private constant collateralAsset = _yfi;
// address private constant incentivesController = _incentivesControllerLlama;
// address private constant siloRepository = _siloRepositoryLlama;
// address private constant _crv = _crvEth;
address private constant silo = _crvUSDYFISilo;
address private constant borrowedAsset = _crvUSD;
address private constant collateralAsset = _yfi;
address private constant incentivesController = _incentivesControllerLlama;
address private constant siloRepository = _siloRepositoryLlama;
address private constant _crv = _crvEth;

// Arbitrum
address private constant silo = _usdcwstETHSilo;
address private constant borrowedAsset = _usdc;
address private constant collateralAsset = _wstETH;
address private constant incentivesController = _incentivesControllerARB;
address private constant siloRepository = _siloRepositoryARB;
address private constant _crv = _crvArb;
// address private constant silo = _usdcwstETHSilo;
// address private constant borrowedAsset = _usdc;
// address private constant collateralAsset = _wstETH;
// address private constant incentivesController = _incentivesControllerARB;
// address private constant siloRepository = _siloRepositoryARB;
// address private constant _crv = _crvArb;

// Optimism
// address private constant silo = _usdcwBTCSilo;
Expand Down
Loading