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

07 24 2023 update #14

Open
wants to merge 18 commits into
base: gauntlet-generator
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ ETHERSCAN_API_KEY_FANTOM=
ETHERSCAN_API_KEY_OPTIMISM=
ETHERSCAN_API_KEY_ARBITRUM=

# IPFS Uploading
PINATA_KEY=
PINATA_SECRET=

# Simulation/fork creation
TENDERLY_ACCESS_TOKEN=
TENDERLY_ACCOUNT=
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

#### SNX ([0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F](https://etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F))

| description | value before | value after |
| --- | --- | --- |
| liquidationThreshold | 62 % | 59 % |


## Raw diff

```json
{
"reserves": {
"0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F": {
"liquidationThreshold": {
"from": 6200,
"to": 5900
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

#### WETH ([0x82aF49447D8a07e3bd95BD0d56f35241523fBab1](https://https://arbiscan.io/address/0x82aF49447D8a07e3bd95BD0d56f35241523fBab1))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 35,280 WETH | 45,001 WETH |


## Raw diff

```json
{
"reserves": {
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1": {
"supplyCap": {
"from": 35280,
"to": 45001
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Reserve changes

### Reserves altered

#### LINK ([0xf97f4df75117a78c1A5a0DBb814Af92458539FB4](https://arbiscan.io/address/0xf97f4df75117a78c1A5a0DBb814Af92458539FB4))

| description | value before | value after |
| --- | --- | --- |
| liquidationThreshold | 75 % | 77.5 % |


## Raw diff

```json
{
"reserves": {
"0xf97f4df75117a78c1A5a0DBb814Af92458539FB4": {
"liquidationThreshold": {
"from": 7500,
"to": 7750
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Reserve changes

### Reserve altered

#### CRV ([0xD533a949740bb3306d119CC777fa900bA034cd52](https://etherscan.io/address/0xD533a949740bb3306d119CC777fa900bA034cd52))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 51,000,000 CRV | 51,000,001 CRV |


#### rETH ([0xae78736Cd615f374D3085123A210448E74Fc6393](https://etherscan.io/address/0xae78736Cd615f374D3085123A210448E74Fc6393))

| description | value before | value after |
| --- | --- | --- |
| supplyCap | 20,000 rETH | 20,001 rETH |


## Raw diff

```json
{
"reserves": {
"0xD533a949740bb3306d119CC777fa900bA034cd52": {
"supplyCap": {
"from": 51000000,
"to": 51000001
}
},
"0xae78736Cd615f374D3085123A210448E74Fc6393": {
"supplyCap": {
"from": 20000,
"to": 20001
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Reserve changes

### Reserve altered

#### DAI ([0x6B175474E89094C44Da98b954EedeAC495271d0F](https://etherscan.io/address/0x6B175474E89094C44Da98b954EedeAC495271d0F))

| description | value before | value after |
| --- | --- | --- |
| ltv | 67 % | 77 % |


#### wstETH ([0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0](https://etherscan.io/address/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0))

| description | value before | value after |
| --- | --- | --- |
| liquidationBonus | 7 % | 6 % |


#### USDC ([0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48](https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48))

| description | value before | value after |
| --- | --- | --- |
| liquidationThreshold | 79 % | 80 % |


## Raw diff

```json
{
"reserves": {
"0x6B175474E89094C44Da98b954EedeAC495271d0F": {
"ltv": {
"from": 6700,
"to": 7700
}
},
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0": {
"liquidationBonus": {
"from": 10700,
"to": 10600
}
},
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": {
"liquidationThreshold": {
"from": 7900,
"to": 8000
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## Reserve changes

### Reserve altered

#### USDC ([0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174](https://polygonscan.com/address/0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174))

| description | value before | value after |
| --- | --- | --- |
| ltv | 82.5 % | 80 % |


#### miMATIC ([0xa3Fa99A148fA48D14Ed51d610c367C61876997F1](https://polygonscan.com/address/0xa3Fa99A148fA48D14Ed51d610c367C61876997F1))

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0xA9F3C3caE095527061e6d270DBE163693e6fda9D](https://polygonscan.com/address/0xA9F3C3caE095527061e6d270DBE163693e6fda9D) | [0xA6459195d60A797D278f58Ffbd2BA62Fb3F7FA1E](https://polygonscan.com/address/0xA6459195d60A797D278f58Ffbd2BA62Fb3F7FA1E) |
| baseVariableBorrowRate | 0 % | 1 % |
| variableRateSlope1 | 4 % | 3.8 % |
| variableRateSlope2 | 75 % | 80 % |
| baseStableBorrowRate | 5 % | 6.8 % |
| stableRateSlope1 | 0.5 % | 4 % |
| stableRateSlope2 | 75 % | 80 % |
| interestRate | ![before](/.assets/8d9de32bf30b1c9dcf71f07a13b228c69a71a4ce.svg) | ![after](/.assets/25b7cbb97d2012b141455f46ee9b3f7e0e40a4b0.svg) |

## Raw diff

```json
{
"reserves": {
"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174": {
"ltv": {
"from": 8250,
"to": 8000
}
},
"0xa3Fa99A148fA48D14Ed51d610c367C61876997F1": {
"interestRateStrategy": {
"from": "0xA9F3C3caE095527061e6d270DBE163693e6fda9D",
"to": "0xA6459195d60A797D278f58Ffbd2BA62Fb3F7FA1E"
}
}
},
"strategies": {
"0xA6459195d60A797D278f58Ffbd2BA62Fb3F7FA1E": {
"from": null,
"to": {
"baseStableBorrowRate": "68000000000000000000000000",
"baseVariableBorrowRate": "10000000000000000000000000",
"maxExcessStableToTotalDebtRatio": "800000000000000000000000000",
"maxExcessUsageRatio": "200000000000000000000000000",
"optimalStableToTotalDebtRatio": "200000000000000000000000000",
"optimalUsageRatio": "800000000000000000000000000",
"stableRateSlope1": "40000000000000000000000000",
"stableRateSlope2": "800000000000000000000000000",
"variableRateSlope1": "38000000000000000000000000",
"variableRateSlope2": "800000000000000000000000000"
}
}
}
}
```
52 changes: 52 additions & 0 deletions generator/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import {AllUpdates, govHelperNetworkNames, Networks} from './index.js';

export function generateDeployFile(updateDate: string, updates: AllUpdates): string {
// Avalanche payloads are not yet called from main governance
const networksOtherThanGuardian = Object.keys(updates).filter(
(network) => network !== 'Avalanche'
);

const hasEthereum = Object.keys(updates).includes('Ethereum');

return `// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovHelpers} from 'aave-helpers/GovHelpers.sol';
import {
${!hasEthereum ? ` EthereumScript,\n` : ''}${Object.keys(updates)
.map((network) => ` ${network}Script`)
.join(',\n')}
} from 'aave-helpers/ScriptUtils.sol';
import {
${Object.keys(updates)
.map((network) => ` AaveV3${network}Update${updateDate}Payload`)
.join(',\n')}
} from './AaveV3Update_${updateDate}.sol';

contract CreateProposal is EthereumScript {
function run() external broadcast {
GovHelpers.Payload[] memory payloads = new GovHelpers.Payload[](${
networksOtherThanGuardian.length
});
${networksOtherThanGuardian
.map((network, index) => {
return ` payloads[${index}] = GovHelpers.build${
govHelperNetworkNames[network as Networks]
}(address(0));`;
})
.join('\n')}
GovHelpers.createProposal(payloads, '');
}
}

${Object.keys(updates)
.map((network) => {
return `contract Deploy${updateDate}Payload${network} is ${network}Script {
function run() external broadcast {
new AaveV3${network}Update${updateDate}Payload();
}
}`;
})
.filter((x) => x)
.join('\n\n')}`;
}
Loading