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: Aave v2 cap adapters for stables #19

Merged
merged 12 commits into from
Apr 18, 2024
Merged
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ deploy-scroll :; forge script scripts/DeployScroll.s.sol:DeployScroll --rpc-url

deploy-weeth-mainnet :; forge script scripts/DeployEthereumWeEth.s.sol:DeployWeEthEthereum --rpc-url mainnet $(common-flags)

deploy-mainnet-v2 :; forge script scripts/AaveV2/DeployEthereum.s.sol:DeployEthereum --rpc-url mainnet $(common-flags)
deploy-avalanche-v2 :; forge script scripts/AaveV2/DeployAvalanche.s.sol:DeployAvalanche --rpc-url avalanche $(common-flags)
deploy-polygon-v2 :; forge script scripts/AaveV2/DeployPolygon.s.sol:DeployPolygon --rpc-url polygon $(common-flags)


# Utilities
download :; cast etherscan-source --chain ${chain} -d src/etherscan/${chain}_${address} ${address}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## Reserve changes

### Reserve altered

#### USDC.e ([0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664](https://snowscan.xyz/address/0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0xF096872672F44d6EBA71458D74fe67F9a77a23B9](https://snowscan.xyz/address/0xF096872672F44d6EBA71458D74fe67F9a77a23B9) | [0xD8277249e871BE9A402fa286C2C5ec16046dC512](https://snowscan.xyz/address/0xD8277249e871BE9A402fa286C2C5ec16046dC512) |
| oracleDescription | USDC / USD | Capped USDC/USD |


#### USDT.e ([0xc7198437980c041c805A1EDcbA50c1Ce5db95118](https://snowscan.xyz/address/0xc7198437980c041c805A1EDcbA50c1Ce5db95118))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0xEBE676ee90Fe1112671f19b6B7459bC678B67e8a](https://snowscan.xyz/address/0xEBE676ee90Fe1112671f19b6B7459bC678B67e8a) | [0x39185f2236A6022b682e8BB93C040d125DA093CF](https://snowscan.xyz/address/0x39185f2236A6022b682e8BB93C040d125DA093CF) |
| oracleDescription | USDT / USD | Capped USDt/USD |


#### DAI.e ([0xd586E7F844cEa2F87f50152665BCbc2C279D8d70](https://snowscan.xyz/address/0xd586E7F844cEa2F87f50152665BCbc2C279D8d70))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x51D7180edA2260cc4F6e4EebB82FEF5c3c2B8300](https://snowscan.xyz/address/0x51D7180edA2260cc4F6e4EebB82FEF5c3c2B8300) | [0xf82da795727633aFA9BB0f1B08A87c0F6A38723f](https://snowscan.xyz/address/0xf82da795727633aFA9BB0f1B08A87c0F6A38723f) |
| oracleDescription | DAI / USD | Capped DAI.e/USD |


## Raw diff

```json
{
"reserves": {
"0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664": {
"oracle": {
"from": "0xF096872672F44d6EBA71458D74fe67F9a77a23B9",
"to": "0xD8277249e871BE9A402fa286C2C5ec16046dC512"
},
"oracleDescription": {
"from": "USDC / USD",
"to": "Capped USDC/USD"
}
},
"0xc7198437980c041c805A1EDcbA50c1Ce5db95118": {
"oracle": {
"from": "0xEBE676ee90Fe1112671f19b6B7459bC678B67e8a",
"to": "0x39185f2236A6022b682e8BB93C040d125DA093CF"
},
"oracleDescription": {
"from": "USDT / USD",
"to": "Capped USDt/USD"
}
},
"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70": {
"oracle": {
"from": "0x51D7180edA2260cc4F6e4EebB82FEF5c3c2B8300",
"to": "0xf82da795727633aFA9BB0f1B08A87c0F6A38723f"
},
"oracleDescription": {
"from": "DAI / USD",
"to": "Capped DAI.e/USD"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
## Reserve changes

### Reserve altered

#### TUSD ([0x0000000000085d4780B73119b644AE5ecd22b376](https://etherscan.io/address/0x0000000000085d4780B73119b644AE5ecd22b376))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x3886BA987236181D98F2401c507Fb8BeA7871dF2](https://etherscan.io/address/0x3886BA987236181D98F2401c507Fb8BeA7871dF2) | [0x5D0024263550c6522b73ED3eeA1025a24E496373](https://etherscan.io/address/0x5D0024263550c6522b73ED3eeA1025a24E496373) |
| oracleDescription | TUSD / ETH | Capped TUSD / USD / ETH |
| oracleLatestAnswer | 0.000284513896475516 | 0.00028404906289655 |


#### DPI ([0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b](https://etherscan.io/address/0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x029849bbc0b1d93b85a8b6190e979fd38F5760E2](https://etherscan.io/address/0x029849bbc0b1d93b85a8b6190e979fd38F5760E2) | [0x279aC97a50a1C1480cF9b2d08Ca01744c12DFeB9](https://etherscan.io/address/0x279aC97a50a1C1480cF9b2d08Ca01744c12DFeB9) |
| oracleDescription | DPI / ETH | DPI / USD / ETH |
| oracleLatestAnswer | 0.03491106932610522 | 0.035093704852082601 |


#### BUSD ([0x4Fabb145d64652a948d72533023f6E7A623C7C53](https://etherscan.io/address/0x4Fabb145d64652a948d72533023f6E7A623C7C53))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x614715d2Af89E6EC99A233818275142cE88d1Cfd](https://etherscan.io/address/0x614715d2Af89E6EC99A233818275142cE88d1Cfd) | [0x2699ffd2c812304271cE9B46c3DFD4B73d580176](https://etherscan.io/address/0x2699ffd2c812304271cE9B46c3DFD4B73d580176) |
| oracleDescription | BUSD / ETH | Capped BUSD (fdUSD) / USD / ETH |
| oracleLatestAnswer | 0.000285701188899661 | 0.000284274771225545 |


#### sUSD ([0x57Ab1ec28D129707052df4dF418D58a2D46d5f51](https://etherscan.io/address/0x57Ab1ec28D129707052df4dF418D58a2D46d5f51))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x8e0b7e6062272B5eF4524250bFFF8e5Bd3497757](https://etherscan.io/address/0x8e0b7e6062272B5eF4524250bFFF8e5Bd3497757) | [0x0Fd4Ca2E51e6b0529af3F27f7f6e20eF4c97C153](https://etherscan.io/address/0x0Fd4Ca2E51e6b0529af3F27f7f6e20eF4c97C153) |
| oracleDescription | SUSD / ETH | Capped sUSD / USD / ETH |
| oracleLatestAnswer | 0.000285960464657471 | 0.00028596046397328 |


#### LUSD ([0x5f98805A4E8be255a32880FDeC7F6728C6568bA0](https://etherscan.io/address/0x5f98805A4E8be255a32880FDeC7F6728C6568bA0))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x60c0b047133f696334a2b7f68af0b49d2F3D4F72](https://etherscan.io/address/0x60c0b047133f696334a2b7f68af0b49d2F3D4F72) | [0xa6c81aA52E6879e9C8bB69f9184EB19de3d1E0E6](https://etherscan.io/address/0xa6c81aA52E6879e9C8bB69f9184EB19de3d1E0E6) |
| oracleDecimals | null | 18 |
| oracleDescription | null | Capped LUSD / USD / ETH |


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

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x773616E4d11A78F511299002da57A0a94577F1f4](https://etherscan.io/address/0x773616E4d11A78F511299002da57A0a94577F1f4) | [0xC3BE72D2f3E1AC4A1b6AAc02c576Ef981FD5F606](https://etherscan.io/address/0xC3BE72D2f3E1AC4A1b6AAc02c576Ef981FD5F606) |
| oracleDescription | DAI / ETH | Capped DAI / USD / ETH |
| oracleLatestAnswer | 0.00028532016362552 | 0.000284164993132333 |


#### FRAX ([0x853d955aCEf822Db058eb8505911ED77F175b99e](https://etherscan.io/address/0x853d955aCEf822Db058eb8505911ED77F175b99e))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x14d04Fff8D21bd62987a5cE9ce543d2F1edF5D3E](https://etherscan.io/address/0x14d04Fff8D21bd62987a5cE9ce543d2F1edF5D3E) | [0x81A16348fC271392DcEB1834639aD243c2b190D6](https://etherscan.io/address/0x81A16348fC271392DcEB1834639aD243c2b190D6) |
| oracleDescription | FRAX / ETH | Capped FRAX / USD / ETH |
| oracleLatestAnswer | 0.000285387645323707 | 0.000283129046205915 |


#### USDP ([0x8E870D67F660D95d5be530380D0eC0bd388289E1](https://etherscan.io/address/0x8E870D67F660D95d5be530380D0eC0bd388289E1))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x3a08ebBaB125224b7b6474384Ee39fBb247D2200](https://etherscan.io/address/0x3a08ebBaB125224b7b6474384Ee39fBb247D2200) | [0x5153d110716F9B7676b283Afaf2AEaED90F2fB8c](https://etherscan.io/address/0x5153d110716F9B7676b283Afaf2AEaED90F2fB8c) |
| oracleDescription | PAX / ETH | Capped USDP / USD / ETH |
| oracleLatestAnswer | 0.00028495467795847 | 0.000284192045509828 |


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

| description | value before | value after |
| --- | --- | --- |
| oracle | [0x986b5E1e1755e3C2440e960477f25201B0a8bbD4](https://etherscan.io/address/0x986b5E1e1755e3C2440e960477f25201B0a8bbD4) | [0x5D65A5e42aE6253b8B873aa3Db1AB609d2731679](https://etherscan.io/address/0x5D65A5e42aE6253b8B873aa3Db1AB609d2731679) |
| oracleDescription | USDC / ETH | Capped USDC / USD / ETH |
| oracleLatestAnswer | 0.00028424045352138 | 0.000284169539750399 |


#### UST ([0xa693B19d2931d498c5B318dF961919BB4aee87a5](https://etherscan.io/address/0xa693B19d2931d498c5B318dF961919BB4aee87a5))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0xa20623070413d42a5C01Db2c8111640DD7A5A03a](https://etherscan.io/address/0xa20623070413d42a5C01Db2c8111640DD7A5A03a) | [0xDe69c028373e9082f8Fd2b6Febd8e16923fd0d7a](https://etherscan.io/address/0xDe69c028373e9082f8Fd2b6Febd8e16923fd0d7a) |
| oracleDescription | UST / ETH | Capped UST / USD / ETH |
| oracleLatestAnswer | 0.000007115563516272 | 0.000007115562414381 |


#### USDT ([0xdAC17F958D2ee523a2206206994597C13D831ec7](https://etherscan.io/address/0xdAC17F958D2ee523a2206206994597C13D831ec7))

| description | value before | value after |
| --- | --- | --- |
| oracle | [0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46](https://etherscan.io/address/0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46) | [0xB7FBECA042B821b7d3ed4b322A3CCA6C1a232Cfb](https://etherscan.io/address/0xB7FBECA042B821b7d3ed4b322A3CCA6C1a232Cfb) |
| oracleDescription | USDT / ETH | Capped USDT / USD / ETH |
| oracleLatestAnswer | 0.000284260455001846 | 0.000284146579329164 |


## Raw diff

```json
{
"reserves": {
"0x0000000000085d4780B73119b644AE5ecd22b376": {
"oracle": {
"from": "0x3886BA987236181D98F2401c507Fb8BeA7871dF2",
"to": "0x5D0024263550c6522b73ED3eeA1025a24E496373"
},
"oracleDescription": {
"from": "TUSD / ETH",
"to": "Capped TUSD / USD / ETH"
},
"oracleLatestAnswer": {
"from": 284513896475516,
"to": 284049062896550
}
},
"0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b": {
"oracle": {
"from": "0x029849bbc0b1d93b85a8b6190e979fd38F5760E2",
"to": "0x279aC97a50a1C1480cF9b2d08Ca01744c12DFeB9"
},
"oracleDescription": {
"from": "DPI / ETH",
"to": "DPI / USD / ETH"
},
"oracleLatestAnswer": {
"from": "34911069326105220",
"to": "35093704852082601"
}
},
"0x4Fabb145d64652a948d72533023f6E7A623C7C53": {
"oracle": {
"from": "0x614715d2Af89E6EC99A233818275142cE88d1Cfd",
"to": "0x2699ffd2c812304271cE9B46c3DFD4B73d580176"
},
"oracleDescription": {
"from": "BUSD / ETH",
"to": "Capped BUSD (fdUSD) / USD / ETH"
},
"oracleLatestAnswer": {
"from": 285701188899661,
"to": 284274771225545
}
},
"0x57Ab1ec28D129707052df4dF418D58a2D46d5f51": {
"oracle": {
"from": "0x8e0b7e6062272B5eF4524250bFFF8e5Bd3497757",
"to": "0x0Fd4Ca2E51e6b0529af3F27f7f6e20eF4c97C153"
},
"oracleDescription": {
"from": "SUSD / ETH",
"to": "Capped sUSD / USD / ETH"
},
"oracleLatestAnswer": {
"from": 285960464657471,
"to": 285960463973280
}
},
"0x5f98805A4E8be255a32880FDeC7F6728C6568bA0": {
"oracle": {
"from": "0x60c0b047133f696334a2b7f68af0b49d2F3D4F72",
"to": "0xa6c81aA52E6879e9C8bB69f9184EB19de3d1E0E6"
},
"oracleDecimals": {
"from": null,
"to": 18
},
"oracleDescription": {
"from": null,
"to": "Capped LUSD / USD / ETH"
}
},
"0x6B175474E89094C44Da98b954EedeAC495271d0F": {
"oracle": {
"from": "0x773616E4d11A78F511299002da57A0a94577F1f4",
"to": "0xC3BE72D2f3E1AC4A1b6AAc02c576Ef981FD5F606"
},
"oracleDescription": {
"from": "DAI / ETH",
"to": "Capped DAI / USD / ETH"
},
"oracleLatestAnswer": {
"from": 285320163625520,
"to": 284164993132333
}
},
"0x853d955aCEf822Db058eb8505911ED77F175b99e": {
"oracle": {
"from": "0x14d04Fff8D21bd62987a5cE9ce543d2F1edF5D3E",
"to": "0x81A16348fC271392DcEB1834639aD243c2b190D6"
},
"oracleDescription": {
"from": "FRAX / ETH",
"to": "Capped FRAX / USD / ETH"
},
"oracleLatestAnswer": {
"from": 285387645323707,
"to": 283129046205915
}
},
"0x8E870D67F660D95d5be530380D0eC0bd388289E1": {
"oracle": {
"from": "0x3a08ebBaB125224b7b6474384Ee39fBb247D2200",
"to": "0x5153d110716F9B7676b283Afaf2AEaED90F2fB8c"
},
"oracleDescription": {
"from": "PAX / ETH",
"to": "Capped USDP / USD / ETH"
},
"oracleLatestAnswer": {
"from": 284954677958470,
"to": 284192045509828
}
},
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": {
"oracle": {
"from": "0x986b5E1e1755e3C2440e960477f25201B0a8bbD4",
"to": "0x5D65A5e42aE6253b8B873aa3Db1AB609d2731679"
},
"oracleDescription": {
"from": "USDC / ETH",
"to": "Capped USDC / USD / ETH"
},
"oracleLatestAnswer": {
"from": 284240453521380,
"to": 284169539750399
}
},
"0xa693B19d2931d498c5B318dF961919BB4aee87a5": {
"oracle": {
"from": "0xa20623070413d42a5C01Db2c8111640DD7A5A03a",
"to": "0xDe69c028373e9082f8Fd2b6Febd8e16923fd0d7a"
},
"oracleDescription": {
"from": "UST / ETH",
"to": "Capped UST / USD / ETH"
},
"oracleLatestAnswer": {
"from": 7115563516272,
"to": 7115562414381
}
},
"0xdAC17F958D2ee523a2206206994597C13D831ec7": {
"oracle": {
"from": "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46",
"to": "0xB7FBECA042B821b7d3ed4b322A3CCA6C1a232Cfb"
},
"oracleDescription": {
"from": "USDT / ETH",
"to": "Capped USDT / USD / ETH"
},
"oracleLatestAnswer": {
"from": 284260455001846,
"to": 284146579329164
}
}
}
}
```
Loading
Loading