From 5126a6e873f602fc70bb6e8747bd80a29fd3ca46 Mon Sep 17 00:00:00 2001 From: iamsahu Date: Mon, 20 Feb 2023 10:44:14 +0530 Subject: [PATCH 1/4] feat: draft proposal --- YPP-0107.md | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 YPP-0107.md diff --git a/YPP-0107.md b/YPP-0107.md new file mode 100644 index 0000000..29be196 --- /dev/null +++ b/YPP-0107.md @@ -0,0 +1,114 @@ +# Proposal + +Enable `SensePT` as a collateral. + +# Background + +This would allow user to borrow DAI/ETH against `SensePT` as collateral. + +# Details + +Following steps would be taken to get `SensePT` as a collateral: + +1. Deploy IdentityOracle (no need for governance approval) +2. Deploy joins for the SensePT assets (no need for governance approval) +3. Governance Proposal + 1. Orchestrate the new join + 2. Add `SensePT` tokens as Assets + 3. Make `SensePT` token as ilk + 4. Add `SensePT` tokens as ilks in series + +Here is the configuration + +``` +export const contractDeployments: ContractDeployment[] = [ + { + addressFile: 'protocol.json', + name: IDENTITY_ORACLE, + contract: 'IdentityOracle', + args: [], + }, + { + addressFile: 'joins.json', + name: SPWSTETH2304, + contract: 'Join', + args: [() => assets.getOrThrow(SPWSTETH2304)!], + }, + { + addressFile: 'joins.json', + name: SPCDAI2307, + contract: 'Join', + args: [() => assets.getOrThrow(SPCDAI2307)!], + }, +] + +export const ilkToETH: Ilk = { + baseId: ETH, + ilkId: spwsteth2304.assetId, + asset: spwsteth2304, + collateralization: { + baseId: ETH, + ilkId: spwsteth2304.assetId, + oracle: protocol().getOrThrow(IDENTITY_ORACLE)!, + ratio: 1100000, + }, + debtLimits: { + baseId: ETH, + ilkId: spwsteth2304.assetId, + line: 150, + dust: 1, + dec: 18, + }, +} + +export const ilkToDAI: Ilk = { + baseId: DAI, + ilkId: spcdai2307.assetId, + asset: spcdai2307, + collateralization: { + baseId: DAI, + ilkId: spcdai2307.assetId, + oracle: protocol().getOrThrow(IDENTITY_ORACLE)!, + ratio: 1100000, + }, + debtLimits: { + baseId: DAI, + ilkId: spcdai2307.assetId, + line: 250000, + dust: 1000, + dec: 18, + }, +} + +export const ilks: Ilk[] = [ilkToETH, ilkToDAI] + +export const ethSeries: Series[] = [ + { + seriesId: FYETH2303, + fyToken: { assetId: FYETH2303, address: fyTokens.getOrThrow(FYETH2303)! }, + chiOracle: '', + pool: nullAsset, + ilks: [ilkToETH], + }, +] + +export const daiSeries: Series[] = [ + { + seriesId: FYDAI2306, + fyToken: { assetId: FYDAI2306, address: fyTokens.getOrThrow(FYDAI2306)! }, + chiOracle: '', + pool: nullAsset, + ilks: [ilkToDAI], + }, +] + +export const newSeries: Series[] = [...ethSeries, ...daiSeries] +``` + +# Testing + +The change has been deployed on a mainnet fork with the following output. + +``` + +``` From ceb7496077fad50894825e579344cbcee41308ea Mon Sep 17 00:00:00 2001 From: iamsahu Date: Mon, 20 Feb 2023 11:14:25 +0530 Subject: [PATCH 2/4] feat: added testing --- YPP-0107.md | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 135 insertions(+), 1 deletion(-) diff --git a/YPP-0107.md b/YPP-0107.md index 29be196..a5cc109 100644 --- a/YPP-0107.md +++ b/YPP-0107.md @@ -110,5 +110,139 @@ export const newSeries: Series[] = [...ethSeries, ...daiSeries] The change has been deployed on a mainnet fork with the following output. ``` - ++ npx hardhat run --network tenderly ./scripts/governance/add/addCollateral/addSensePTCollateral/../../../../../shared/deploy.ts +Deploying identityOracle IdentityOracle with + Contract at 0x6d49270f46af10dacc678f815959182442c6c8e8 verified. +identityOracle IdentityOracle deployed at 0x6d49270f46aF10dACC678F815959182442C6C8E8 +Deploying SPWSTETH2304 Join with 0x161406b993C4200F8089918840D9055368e0C675 +identityOracle at 0x6d49270f46aF10dACC678F815959182442C6C8E8 verified on tenderly + Contract at 0xe27a58494bd2953f8cdd28216a7dcea9faa90518 verified. +SPWSTETH2304 Join deployed at 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 +SPWSTETH2304 at 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 verified on tenderly +SPWSTETH2304.grantRoles(ROOT, timelock) +Deploying SPCDAI2307 Join with 0x9C5eDebb6fE50C9447828A30a2414c061C74Cd77 + Contract at 0x9c6ab6915a94e33d1b1ec9d631246c479b8188bc verified. +SPCDAI2307 Join deployed at 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC +SPCDAI2307 at 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC verified on tenderly +SPCDAI2307.grantRoles(ROOT, timelock) ++ npx hardhat run --network tenderly ./scripts/governance/add/addCollateral/addSensePTCollateral/addSensePT.ts +Impersonated 0xC7aE076086623ecEA2450e364C838916a043F9a8 + +ORCHESTRATE_JOIN + + REVOKE_ROOT + 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 revokeRole(ROOT 0x05e2071814991c65647850EEa8c4bf23D35f9189) + + ADD_AS_HOST_TO_CLOAK + +GRANT_ROOT +0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 grantRole(ROOT 0x82375994C79e902286D347C9eDE644eA12659FCC) +join.grantRoles(gov, timelock) + +ADD_ASSET +Using asset at 0x161406b993C4200F8089918840D9055368e0C675 +Using join at 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 + + MAKE_ASSET + Make asset: SPWSTETH2304: 0x161406b993C4200F8089918840D9055368e0C675, + + ADD_JOIN_TO_LADLE + cloak.add(ladle join and exit SPWSTETH2304) + Adding SPWSTETH2304 join to Ladle using 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 + +ORCHESTRATE_JOIN + + REVOKE_ROOT + 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC revokeRole(ROOT 0x05e2071814991c65647850EEa8c4bf23D35f9189) + + ADD_AS_HOST_TO_CLOAK + +GRANT_ROOT +0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC grantRole(ROOT 0x82375994C79e902286D347C9eDE644eA12659FCC) +join.grantRoles(gov, timelock) + +ADD_ASSET +Using asset at 0x9C5eDebb6fE50C9447828A30a2414c061C74Cd77 +Using join at 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC + + MAKE_ASSET + Make asset: SPCDAI2307: 0x9C5eDebb6fE50C9447828A30a2414c061C74Cd77, + + ADD_JOIN_TO_LADLE + cloak.add(ladle join and exit SPCDAI2307) + Adding SPCDAI2307 join to Ladle using 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC + +MAKE_ILK + + UPDATE_COLLATERALIZATION + Spot oracle for 0x303000000000/0x403017000289 set to 0x6d49270f46aF10dACC678F815959182442C6C8E8 with ratio 1100000 + UPDATE_DEBT_LIMITS + ┌─────────┬──────────────────┐ + │ (index) │ Values │ + ├─────────┼──────────────────┤ + │ base │ 'ETH' │ + │ ilk │ 'SPWSTETH2304' │ + │ baseId │ '0x303000000000' │ + │ ilkId │ '0x403017000289' │ + │ line │ 150 │ + │ dust │ 1 │ + │ dec │ 18 │ + └─────────┴──────────────────┘ + +MAKE_ILK + + UPDATE_COLLATERALIZATION + Spot oracle for 0x303100000000/0x40311700028C set to 0x6d49270f46aF10dACC678F815959182442C6C8E8 with ratio 1100000 + UPDATE_DEBT_LIMITS + ┌─────────┬──────────────────┐ + │ (index) │ Values │ + ├─────────┼──────────────────┤ + │ base │ 'DAI' │ + │ ilk │ 'SPCDAI2307' │ + │ baseId │ '0x303100000000' │ + │ ilkId │ '0x40311700028C' │ + │ line │ 250000 │ + │ dust │ 1000 │ + │ dec │ 18 │ + └─────────┴──────────────────┘ + +ADD_ILK_TO_SERIES +addIlks FYETH2303: SPWSTETH2304 + +ADD_ILK_TO_SERIES +addIlks FYDAI2306: SPCDAI2307 +Impersonated 0xC7aE076086623ecEA2450e364C838916a043F9a8 +Proposal: 0x13f45f903c435e20c2f16b36b8da79062efcb20b5e34e33c1e396a16a6c5f9b2 +Proposing +Developer: 0xC7aE076086623ecEA2450e364C838916a043F9a8 + +Calldata: +0xca02753a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000005c000000000000000000000000000000000000000000000000000000000000006e00000000000000000000000000000000000000000000000000000000000000840000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000a800000000000000000000000000000000000000000000000000000000000000b800000000000000000000000000000000000000000000000000000000000000c400000000000000000000000000000000000000000000000000000000000000d600000000000000000000000000000000000000000000000000000000000000ec00000000000000000000000000000000000000000000000000000000000000f80000000000000000000000000000000000000000000000000000000000000108000000000000000000000000000000000000000000000000000000000000011a000000000000000000000000000000000000000000000000000000000000012a000000000000000000000000000000000000000000000000000000000000013c000000000000000000000000000000000000000000000000000000000000014c0000000000000000000000000e27a58494bd2953f8cdd28216a7dcea9faa905180000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004444faded0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005e2071814991c65647850eea8c4bf23d35f918900000000000000000000000000000000000000000000000000000000000000000000000000000000e27a58494bd2953f8cdd28216a7dcea9faa9051800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000044de02cde7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082375994c79e902286d347c9ede644ea12659fcc00000000000000000000000000000000000000000000000000000000000000000000000000000000e27a58494bd2953f8cdd28216a7dcea9faa9051800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000084effae35300000000000000000000000000000000000000000000000000000000000000400000000000000000000000003b870db67a45611cf4723d44487eaf398fac51e30000000000000000000000000000000000000000000000000000000000000001f06c2dfc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca86700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000044e665f9e44030170002890000000000000000000000000000000000000000000000000000000000000000000000000000161406b993c4200f8089918840d9055368e0c67500000000000000000000000000000000000000000000000000000000000000000000000000000000e27a58494bd2953f8cdd28216a7dcea9faa90518000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a4effae35300000000000000000000000000000000000000000000000000000000000000400000000000000000000000006cb18ff2a33e981d1e38a663ca056c0a5265066a0000000000000000000000000000000000000000000000000000000000000002ceae3abd0000000000000000000000000000000000000000000000000000000012e5ff77000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082375994c79e902286d347c9ede644ea12659fcc000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e4f92bcb0d0000000000000000000000006cb18ff2a33e981d1e38a663ca056c0a5265066a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e27a58494bd2953f8cdd28216a7dcea9faa90518ceae3abd00000000000000000000000000000000000000000000000000000000000000000000000000000000e27a58494bd2953f8cdd28216a7dcea9faa9051812e5ff7700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cb18ff2a33e981d1e38a663ca056c0a5265066a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004449c29d2b4030170002890000000000000000000000000000000000000000000000000000000000000000000000000000e27a58494bd2953f8cdd28216a7dcea9faa90518000000000000000000000000000000000000000000000000000000000000000000000000000000009c6ab6915a94e33d1b1ec9d631246c479b8188bc0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004444faded0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005e2071814991c65647850eea8c4bf23d35f9189000000000000000000000000000000000000000000000000000000000000000000000000000000009c6ab6915a94e33d1b1ec9d631246c479b8188bc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000044de02cde7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082375994c79e902286d347c9ede644ea12659fcc000000000000000000000000000000000000000000000000000000000000000000000000000000009c6ab6915a94e33d1b1ec9d631246c479b8188bc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000084effae35300000000000000000000000000000000000000000000000000000000000000400000000000000000000000003b870db67a45611cf4723d44487eaf398fac51e30000000000000000000000000000000000000000000000000000000000000001f06c2dfc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca86700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000044e665f9e440311700028c00000000000000000000000000000000000000000000000000000000000000000000000000009c5edebb6fe50c9447828a30a2414c061c74cd77000000000000000000000000000000000000000000000000000000000000000000000000000000009c6ab6915a94e33d1b1ec9d631246c479b8188bc000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a4effae35300000000000000000000000000000000000000000000000000000000000000400000000000000000000000006cb18ff2a33e981d1e38a663ca056c0a5265066a0000000000000000000000000000000000000000000000000000000000000002ceae3abd0000000000000000000000000000000000000000000000000000000012e5ff77000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082375994c79e902286d347c9ede644ea12659fcc000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e4f92bcb0d0000000000000000000000006cb18ff2a33e981d1e38a663ca056c0a5265066a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000009c6ab6915a94e33d1b1ec9d631246c479b8188bcceae3abd000000000000000000000000000000000000000000000000000000000000000000000000000000009c6ab6915a94e33d1b1ec9d631246c479b8188bc12e5ff7700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cb18ff2a33e981d1e38a663ca056c0a5265066a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004449c29d2b40311700028c00000000000000000000000000000000000000000000000000000000000000000000000000009c6ab6915a94e33d1b1ec9d631246c479b8188bc00000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca867000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000848ef6bdfa303000000000000000000000000000000000000000000000000000000000000040301700028900000000000000000000000000000000000000000000000000000000000000000000000000006d49270f46af10dacc678f815959182442c6c8e8000000000000000000000000000000000000000000000000000000000010c8e000000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca867000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a4d3fc152b3030000000000000000000000000000000000000000000000000000000000000403017000289000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca867000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000848ef6bdfa303100000000000000000000000000000000000000000000000000000000000040311700028c00000000000000000000000000000000000000000000000000000000000000000000000000006d49270f46af10dacc678f815959182442c6c8e8000000000000000000000000000000000000000000000000000000000010c8e000000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca867000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a4d3fc152b303100000000000000000000000000000000000000000000000000000000000040311700028c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003d09000000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca8670000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008453eecb77303030390000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001403017000289000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c88191f8cb8e6d4a668b047c1c8503432c3ca8670000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008453eecb770031ff00028b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000140311700028c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +Proposed 0x13f45f903c435e20c2f16b36b8da79062efcb20b5e34e33c1e396a16a6c5f9b2 ++ npx hardhat run --network tenderly ./scripts/governance/add/addCollateral/addSensePTCollateral/../../../../../shared/approve.ts +Impersonated 0xd659565b84bcfcb23b02ee13e46cb51429f4558a +Proposal: 0x13f45f903c435e20c2f16b36b8da79062efcb20b5e34e33c1e396a16a6c5f9b2 +Approving +Approved: 0x13f45f903c435e20c2f16b36b8da79062efcb20b5e34e33c1e396a16a6c5f9b2 +advancing time by 172800 seconds (2 days) to 1677217301 ++ npx hardhat run --network tenderly ./scripts/governance/add/addCollateral/addSensePTCollateral/../../../../../shared/execute.ts +Impersonated 0xC7aE076086623ecEA2450e364C838916a043F9a8 +Proposal: 0x13f45f903c435e20c2f16b36b8da79062efcb20b5e34e33c1e396a16a6c5f9b2 +Executing +Estimated gas: 919904 - ETH Balance: 1.0 +Executed 0x13f45f903c435e20c2f16b36b8da79062efcb20b5e34e33c1e396a16a6c5f9b2 +TxHash: 0x64174b9ffd0a8291c4db09a66d95ac9c420edf21de667488233e05b2ff4ef453 ++ npx hardhat run --network tenderly ./scripts/governance/add/addCollateral/addSensePTCollateral/../../../../../shared/standardBorrowingTest.ts +Impersonated 0xC7aE076086623ecEA2450e364C838916a043F9a8 +Impersonated 0xB6462B67fe692223DFFb61C8DC8Ad080CBa180Cc +series: 0x303030390000 +ilk.ilkId: 0x403017000289 +hardhat-tenderly: Warning: No new contracts have been verified. + Contract not eligible for verification FYToken, IERC3156FlashBorrower, IERC3156FlashLender, AccessControl, IERC20, IERC20Metadata, AddressStringUtil, SafeERC20Namer, WMul, WDivUp, ERC20, IERC2612, ERC20Permit, IJoin, IOracle, IERC5095, IFYToken, CastU256U32, Constants, CastU256U128, WDiv, +vault: 0xf59c1ca3f855661af4925bef +posting 1111000000000000000 ilk.ilkId out of 10211904313030322110 +borrowing 1000000000000000000 FYETH2303 +posted and borrowed +repaying 1000000000000000000 FYETH2303 and withdrawing 1111000000000000000 ilk.ilkId +repaid and withdrawn ``` From 583827d8a68f217c9135e038d68cf4ace62a8507 Mon Sep 17 00:00:00 2001 From: iamsahu Date: Thu, 23 Feb 2023 22:41:19 +0530 Subject: [PATCH 3/4] feat: removed ETH --- YPP-0107.md | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/YPP-0107.md b/YPP-0107.md index a5cc109..5e69c95 100644 --- a/YPP-0107.md +++ b/YPP-0107.md @@ -28,12 +28,6 @@ export const contractDeployments: ContractDeployment[] = [ contract: 'IdentityOracle', args: [], }, - { - addressFile: 'joins.json', - name: SPWSTETH2304, - contract: 'Join', - args: [() => assets.getOrThrow(SPWSTETH2304)!], - }, { addressFile: 'joins.json', name: SPCDAI2307, @@ -42,25 +36,6 @@ export const contractDeployments: ContractDeployment[] = [ }, ] -export const ilkToETH: Ilk = { - baseId: ETH, - ilkId: spwsteth2304.assetId, - asset: spwsteth2304, - collateralization: { - baseId: ETH, - ilkId: spwsteth2304.assetId, - oracle: protocol().getOrThrow(IDENTITY_ORACLE)!, - ratio: 1100000, - }, - debtLimits: { - baseId: ETH, - ilkId: spwsteth2304.assetId, - line: 150, - dust: 1, - dec: 18, - }, -} - export const ilkToDAI: Ilk = { baseId: DAI, ilkId: spcdai2307.assetId, @@ -80,17 +55,7 @@ export const ilkToDAI: Ilk = { }, } -export const ilks: Ilk[] = [ilkToETH, ilkToDAI] - -export const ethSeries: Series[] = [ - { - seriesId: FYETH2303, - fyToken: { assetId: FYETH2303, address: fyTokens.getOrThrow(FYETH2303)! }, - chiOracle: '', - pool: nullAsset, - ilks: [ilkToETH], - }, -] +export const ilks: Ilk[] = [ilkToDAI] export const daiSeries: Series[] = [ { @@ -102,7 +67,7 @@ export const daiSeries: Series[] = [ }, ] -export const newSeries: Series[] = [...ethSeries, ...daiSeries] +export const newSeries: Series[] = [...daiSeries] ``` # Testing From 25f47348ad8a5accfd7cd542063fba799941a3ba Mon Sep 17 00:00:00 2001 From: iamsahu Date: Fri, 24 Feb 2023 15:06:54 +0530 Subject: [PATCH 4/4] Update YPP-0107.md --- YPP-0107.md | 61 +---------------------------------------------------- 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/YPP-0107.md b/YPP-0107.md index 5e69c95..9a784aa 100644 --- a/YPP-0107.md +++ b/YPP-0107.md @@ -4,7 +4,7 @@ Enable `SensePT` as a collateral. # Background -This would allow user to borrow DAI/ETH against `SensePT` as collateral. +This would allow user to borrow DAI against `SensePT` as collateral. # Details @@ -79,12 +79,8 @@ The change has been deployed on a mainnet fork with the following output. Deploying identityOracle IdentityOracle with Contract at 0x6d49270f46af10dacc678f815959182442c6c8e8 verified. identityOracle IdentityOracle deployed at 0x6d49270f46aF10dACC678F815959182442C6C8E8 -Deploying SPWSTETH2304 Join with 0x161406b993C4200F8089918840D9055368e0C675 identityOracle at 0x6d49270f46aF10dACC678F815959182442C6C8E8 verified on tenderly Contract at 0xe27a58494bd2953f8cdd28216a7dcea9faa90518 verified. -SPWSTETH2304 Join deployed at 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 -SPWSTETH2304 at 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 verified on tenderly -SPWSTETH2304.grantRoles(ROOT, timelock) Deploying SPCDAI2307 Join with 0x9C5eDebb6fE50C9447828A30a2414c061C74Cd77 Contract at 0x9c6ab6915a94e33d1b1ec9d631246c479b8188bc verified. SPCDAI2307 Join deployed at 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC @@ -93,28 +89,6 @@ SPCDAI2307.grantRoles(ROOT, timelock) + npx hardhat run --network tenderly ./scripts/governance/add/addCollateral/addSensePTCollateral/addSensePT.ts Impersonated 0xC7aE076086623ecEA2450e364C838916a043F9a8 -ORCHESTRATE_JOIN - - REVOKE_ROOT - 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 revokeRole(ROOT 0x05e2071814991c65647850EEa8c4bf23D35f9189) - - ADD_AS_HOST_TO_CLOAK - -GRANT_ROOT -0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 grantRole(ROOT 0x82375994C79e902286D347C9eDE644eA12659FCC) -join.grantRoles(gov, timelock) - -ADD_ASSET -Using asset at 0x161406b993C4200F8089918840D9055368e0C675 -Using join at 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 - - MAKE_ASSET - Make asset: SPWSTETH2304: 0x161406b993C4200F8089918840D9055368e0C675, - - ADD_JOIN_TO_LADLE - cloak.add(ladle join and exit SPWSTETH2304) - Adding SPWSTETH2304 join to Ladle using 0xe27A58494Bd2953F8cdD28216A7dCea9fAA90518 - ORCHESTRATE_JOIN REVOKE_ROOT @@ -137,23 +111,6 @@ Using join at 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC cloak.add(ladle join and exit SPCDAI2307) Adding SPCDAI2307 join to Ladle using 0x9c6AB6915A94E33D1B1ec9d631246c479B8188bC -MAKE_ILK - - UPDATE_COLLATERALIZATION - Spot oracle for 0x303000000000/0x403017000289 set to 0x6d49270f46aF10dACC678F815959182442C6C8E8 with ratio 1100000 - UPDATE_DEBT_LIMITS - ┌─────────┬──────────────────┐ - │ (index) │ Values │ - ├─────────┼──────────────────┤ - │ base │ 'ETH' │ - │ ilk │ 'SPWSTETH2304' │ - │ baseId │ '0x303000000000' │ - │ ilkId │ '0x403017000289' │ - │ line │ 150 │ - │ dust │ 1 │ - │ dec │ 18 │ - └─────────┴──────────────────┘ - MAKE_ILK UPDATE_COLLATERALIZATION @@ -171,9 +128,6 @@ MAKE_ILK │ dec │ 18 │ └─────────┴──────────────────┘ -ADD_ILK_TO_SERIES -addIlks FYETH2303: SPWSTETH2304 - ADD_ILK_TO_SERIES addIlks FYDAI2306: SPCDAI2307 Impersonated 0xC7aE076086623ecEA2450e364C838916a043F9a8 @@ -197,17 +151,4 @@ Executing Estimated gas: 919904 - ETH Balance: 1.0 Executed 0x13f45f903c435e20c2f16b36b8da79062efcb20b5e34e33c1e396a16a6c5f9b2 TxHash: 0x64174b9ffd0a8291c4db09a66d95ac9c420edf21de667488233e05b2ff4ef453 -+ npx hardhat run --network tenderly ./scripts/governance/add/addCollateral/addSensePTCollateral/../../../../../shared/standardBorrowingTest.ts -Impersonated 0xC7aE076086623ecEA2450e364C838916a043F9a8 -Impersonated 0xB6462B67fe692223DFFb61C8DC8Ad080CBa180Cc -series: 0x303030390000 -ilk.ilkId: 0x403017000289 -hardhat-tenderly: Warning: No new contracts have been verified. - Contract not eligible for verification FYToken, IERC3156FlashBorrower, IERC3156FlashLender, AccessControl, IERC20, IERC20Metadata, AddressStringUtil, SafeERC20Namer, WMul, WDivUp, ERC20, IERC2612, ERC20Permit, IJoin, IOracle, IERC5095, IFYToken, CastU256U32, Constants, CastU256U128, WDiv, -vault: 0xf59c1ca3f855661af4925bef -posting 1111000000000000000 ilk.ilkId out of 10211904313030322110 -borrowing 1000000000000000000 FYETH2303 -posted and borrowed -repaying 1000000000000000000 FYETH2303 and withdrawing 1111000000000000000 ilk.ilkId -repaid and withdrawn ```