Skip to content

Commit

Permalink
Merge branch 'main' into feat/feed-update
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlymite committed Dec 3, 2024
2 parents 11ba7b2 + a01d449 commit 09bfeb8
Show file tree
Hide file tree
Showing 242 changed files with 15,801 additions and 3,085 deletions.
1 change: 0 additions & 1 deletion .assets/20b02c78bc8b99547929074a8d98940dc76ac4e3.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/237c21391c0b67eb1236e3875c882cd6115a3758.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/3b30aea0d7ed061d9d9b0eeecb2e4835c7844ba5.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/4f7a3ee47355f466dc627787f8cd371573621162.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/59f72276d32ba1eeba45953b23c84ea37048e299.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/5e92a6663aeee25254a2740f3a545f211faeacbf.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/75cdb567a41d55d63ab2bb1326ea702df0bfacf4.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/873d4c8affcd41504dffeb1e9750d8e5357e2775.svg

This file was deleted.

1 change: 0 additions & 1 deletion .assets/92cd89f015c573a55ccf57593f88a74f7b8bc050.svg

This file was deleted.

34 changes: 20 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@ LEDGER_SENDER=
PRIVATE_KEY=

# Test rpc_endpoints
RPC_MAINNET=https://eth.llamarpc.com
RPC_AVALANCHE=https://api.avax.network/ext/bc/C/rpc
RPC_OPTIMISM=https://optimism.llamarpc.com
RPC_POLYGON=https://polygon.llamarpc.com
RPC_ARBITRUM=https://arbitrum.llamarpc.com
RPC_FANTOM=https://rpc.ftm.tools
RPC_HARMONY=https://api.harmony.one
RPC_METIS=https://andromeda.metis.io/?owner=1088
RPC_BASE=https://base.llamarpc.com
RPC_ZKEVM=https://zkevm-rpc.com
RPC_GNOSIS=https://rpc.ankr.com/gnosis
RPC_BNB=https://binance.llamarpc.com
RPC_SCROLL=https://rpc.scroll.io
RPC_ZKSYNC=https://mainnet.era.zksync.io
# To generate RPCs based on you api keys, you can use
# export ALCHEMY_API_KEY=yourAlchemyKey && npx @bgd-labs/rpc-env
RPC_MAINNET=
RPC_AVALANCHE=
RPC_OPTIMISM=
RPC_POLYGON=
RPC_ARBITRUM=
RPC_FANTOM=
RPC_HARMONY=
RPC_METIS=
RPC_BASE=
RPC_ZKEVM=
RPC_GNOSIS=
RPC_BNB=
RPC_SCROLL=
RPC_ZKSYNC=

# Etherscan api keys for verification & download utils
# Dedicated api keys for each chain are required when using foundry verification
ETHERSCAN_API_KEY_MAINNET=
ETHERSCAN_API_KEY_POLYGON=
ETHERSCAN_API_KEY_AVALANCHE=
Expand All @@ -35,6 +38,9 @@ ETHERSCAN_API_KEY_BNB=
ETHERSCAN_API_KEY_SCROLL=
ETHERESCAN_API_KEY_ZKSYNC=

# Catapulta verify uses etherscan v2 api, therefore adding a single api key is good enough
ETHERSCAN_API_KEY=

# Simulation/fork creation
TENDERLY_ACCESS_TOKEN=
TENDERLY_ACCOUNT=
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ on:
jobs:
test:
uses: bgd-labs/github-workflows/.github/workflows/comment.yml@main
secrets: inherit
secrets:
READ_ONLY_PAT: ${{ secrets.READ_ONLY_PAT }}
9 changes: 1 addition & 8 deletions .github/workflows/ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ jobs:
ref: ${{ inputs.myCommit }}
persist-credentials: true

- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile
- uses: bgd-labs/github-workflows/.github/actions/setup-node@main

- name: Get all changed *.md file(s)
id: changed-files
Expand Down
66 changes: 43 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,54 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile
- uses: bgd-labs/github-workflows/.github/actions/setup-node@main

- name: Enforce linting
run: yarn lint --check
run: npm run lint --check

test-sol:
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
secrets: inherit
with:
mode: "CHANGED"

test-sol-zksync:
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
secrets: inherit
with:
mode: "CHANGED"
zksync: true
ROOT_DIR: "zksync"
name: Foundry build n test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: bgd-labs/action-rpc-env@main
with:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}

# we simply use foundry zk for all jobs in this repo
- name: Run Foundry setup
uses: bgd-labs/github-workflows/.github/actions/foundry-setup@main
with:
ZKSYNC: "true"

- name: Run Forge tests
id: test
uses: bgd-labs/github-workflows/.github/actions/foundry-test@main
with:
MODE: "CHANGED"

- name: Run ZK tests
id: zktest
uses: bgd-labs/github-workflows/.github/actions/foundry-test@main
with:
MODE: "CHANGED"
ZKSYNC: true
ROOT_DIR: "zksync"

- name: Run Forge tests
uses: bgd-labs/github-workflows/.github/actions/comment-artifact@main

# we let failing tests pass so we can log them in the comment, still we want the ci to fail
- name: Post test
if: ${{ steps.test.outputs.testStatus != 0 || steps.zktest.outputs.testStatus != 0 }}
run: |
echo "tests failed"
exit 1
test-js:
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main
secrets: inherit
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ zkout/
# editors
.idea

# well, looks strange to ignore package-lock, but we have only pretter and it's temproray
package-lock.json
node_modules
yarn.lock

# ignore foundry deploy artifacts
broadcast/
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ The template ships with sensible default so you can use default `foundry` comman
```sh
cp .env.example .env
forge install
yarn
npm i
```

### Create an aip

This repository includes a generator to help you bootstrap the required files for an `AIP`.
To generate a proposal you need to run: `yarn generate`
To generate a proposal you need to run: `npm run generate`

To get a full list of available commands run `yarn generate --help`
To get a full list of available commands run `npm run generate -- --help`

```sh
yarn generate --help
yarn run v1.22.19
npm run generate -- --help
$ tsx generator/cli --help
Usage: proposal-generator [options]

Expand Down Expand Up @@ -108,7 +107,8 @@ If for whatever reason verification fails, there's a good chance the error is on
To retry a specific verification you can follow the following steps:

1. copy verify.example.json to verify.json
2. replace the `chain` with the appropriate chainId
3. replace the `hash` with the transaction hash of the deployment transaction (make sure it's the deployment transaction, not the one registering the payload on the payloadscontroller)
4. run `FOUNDRY_PROFILE=<chainAlias> forge build --force`
5. run `FOUNDRY_PROFILE=<chainAlias> npx catapulta-verify -b verify.json`
2. enter an `ETHERSCAN_API_KEY` in your `.env`
3. replace the `chain` with the appropriate chainId
4. replace the `hash` with the transaction hash of the deployment transaction (make sure it's the deployment transaction, not the one registering the payload on the payloadscontroller)
5. run `FOUNDRY_PROFILE=<chainAlias> forge build --force`
6. run `FOUNDRY_PROFILE=<chainAlias> npx catapulta-verify -b verify.json`
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@
| --- | --- | --- |
| interestRateStrategy | [0x79715aB77F637C95a8c28804F56f98946B332851](https://polygonscan.com/address/0x79715aB77F637C95a8c28804F56f98946B332851) | [0xAF5917cFc2F376eCD6c4df91C9AC5965Beaf5AfA](https://polygonscan.com/address/0xAF5917cFc2F376eCD6c4df91C9AC5965Beaf5AfA) |
| variableRateSlope1 | 11.25 % | 12 % |
| interestRate | ![before](/.assets/6915e7063266167ef15bdb78b210c78b61a3ee71.svg) | ![after](/.assets/677bb3d52a3dee35bd995572dcfcda026d303815.svg) |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=112500000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=480000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=120000000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=480000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) |

#### WBTC ([0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6](https://polygonscan.com/address/0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6))

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0xbbEA829b9E104733Cf69b6e96E7Ff810cBcfae38](https://polygonscan.com/address/0xbbEA829b9E104733Cf69b6e96E7Ff810cBcfae38) | [0x3465528BE493a61629234C259b62b9539817d8e7](https://polygonscan.com/address/0x3465528BE493a61629234C259b62b9539817d8e7) |
| variableRateSlope1 | 9.25 % | 10 % |
| interestRate | ![before](/.assets/6650d384c2b8469b66743178da45ac5b7d37de2c.svg) | ![after](/.assets/6efc2be6d186d0f9ec95cd884ac9775e328507e7.svg) |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=92500000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=370000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=100000000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=370000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) |

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

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0xf98258ea0C095157c2c390E9f6d914847d7fbACf](https://polygonscan.com/address/0xf98258ea0C095157c2c390E9f6d914847d7fbACf) | [0x4309B0d719a0Dfb526EE9C0E58b77635B2971cC4](https://polygonscan.com/address/0x4309B0d719a0Dfb526EE9C0E58b77635B2971cC4) |
| variableRateSlope1 | 14.25 % | 15 % |
| interestRate | ![before](/.assets/dfecd97a09cb209cb661ea90b029bd58db92a066.svg) | ![after](/.assets/b747c0090de2cc213d7d5ef6dc8d35034bd6fabe.svg) |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=142500000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=770000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=150000000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=770000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) |

#### WETH ([0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619](https://polygonscan.com/address/0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619))

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0x9C9f4C39952848FBA513d44B356c7855F504B1cd](https://polygonscan.com/address/0x9C9f4C39952848FBA513d44B356c7855F504B1cd) | [0xd141820D89840C9A3b0AE46c041D70B98F15928F](https://polygonscan.com/address/0xd141820D89840C9A3b0AE46c041D70B98F15928F) |
| variableRateSlope1 | 9.25 % | 10 % |
| interestRate | ![before](/.assets/6f7a87524bb74b6a49faabc68d32cf5bb1e16899.svg) | ![after](/.assets/6975d921b3c041277e54308467fc64285fc75196.svg) |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=92500000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=400000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=100000000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=400000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) |

#### DAI ([0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063](https://polygonscan.com/address/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063))

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0x5c9B09Bb260BCa51f4C5476013eE5949F2C4f397](https://polygonscan.com/address/0x5c9B09Bb260BCa51f4C5476013eE5949F2C4f397) | [0xDa6b70b725404A0c6bb116B1584fb88Eb7d7ED6d](https://polygonscan.com/address/0xDa6b70b725404A0c6bb116B1584fb88Eb7d7ED6d) |
| variableRateSlope1 | 14.25 % | 15 % |
| interestRate | ![before](/.assets/1cc370116b8869617805acb375f6e4ea0388878c.svg) | ![after](/.assets/fe8490c89960dd4c0d4597cb152f4ce0485c673c.svg) |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=142500000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=710000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=150000000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=710000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) |

#### USDT ([0xc2132D05D31c914a87C6611C10748AEb04B58e8F](https://polygonscan.com/address/0xc2132D05D31c914a87C6611C10748AEb04B58e8F))

| description | value before | value after |
| --- | --- | --- |
| interestRateStrategy | [0xDC220F1d8EA6910BDBbb48c4AdFb7cE565500D08](https://polygonscan.com/address/0xDC220F1d8EA6910BDBbb48c4AdFb7cE565500D08) | [0xAb85FD7DCBFdD40e822321DAc4D5fD3cf08b2542](https://polygonscan.com/address/0xAb85FD7DCBFdD40e822321DAc4D5fD3cf08b2542) |
| variableRateSlope1 | 14.25 % | 15 % |
| interestRate | ![before](/.assets/97e2d5a39dbc577e317098062838a03c4c79b1a5.svg) | ![after](/.assets/91fc38e72a46271f6e68f56fa46bf6c3060ae70a.svg) |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=142500000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=520000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=150000000000000000000000000&variableRateSlope2=1340000000000000000000000000&optimalUsageRatio=520000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=undefined) |

## Raw diff

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
| reserveFactor | 45 % [4500] | 50 % [5000] |


## Emodes changes

## Raw diff

```json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Reserve changes

### Reserve altered

#### LUSD ([0x93b346b6BC2548dA6A1E7d98E9a421B42541425b](https://arbiscan.io/address/0x93b346b6BC2548dA6A1E7d98E9a421B42541425b))

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 106,435.1469 LUSD [106435146991153500610108] | 92,219.4613 LUSD [92219461394279151682363] |
| virtualBalance | 106,434.9878 LUSD [106434987881929276913954] | 92,219.3022 LUSD [92219302285054927986209] |


#### USDC ([0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8](https://arbiscan.io/address/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8))

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 523,273.5575 USDC [523273557554] | 471,041.9823 USDC [471041982302] |
| virtualBalance | 523,161.0279 USDC [523161027996] | 470,929.4527 USDC [470929452744] |


## Raw diff

```json
{
"reserves": {
"0x93b346b6BC2548dA6A1E7d98E9a421B42541425b": {
"aTokenUnderlyingBalance": {
"from": "106435146991153500610108",
"to": "92219461394279151682363"
},
"virtualBalance": {
"from": "106434987881929276913954",
"to": "92219302285054927986209"
}
},
"0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8": {
"aTokenUnderlyingBalance": {
"from": "523273557554",
"to": "471041982302"
},
"virtualBalance": {
"from": "523161027996",
"to": "470929452744"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Emodes changes

## Raw diff

```json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Reserve changes

### Reserves altered

#### WBTC ([0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f](https://arbiscan.io/address/0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f))

| description | value before | value after |
| --- | --- | --- |
| reserveFactor | 20 % [2000] | 50 % [5000] |
| optimalUsageRatio | 45 % | 80 % |
| interestRate | ![before](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=450000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) | ![after](https://dash.onaave.com/api/static?variableRateSlope1=40000000000000000000000000&variableRateSlope2=3000000000000000000000000000&optimalUsageRatio=800000000000000000000000000&baseVariableBorrowRate=0&maxVariableBorrowRate=3040000000000000000000000000) |

## Emodes changed

### EMode: Stablecoins(id: 1)



### EMode: ETH correlated(id: 2)



## Raw diff

```json
{
"reserves": {
"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f": {
"reserveFactor": {
"from": 2000,
"to": 5000
}
}
},
"strategies": {
"0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f": {
"optimalUsageRatio": {
"from": "450000000000000000000000000",
"to": "800000000000000000000000000"
}
}
}
}
```
Loading

0 comments on commit 09bfeb8

Please sign in to comment.