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

September Funding Update Part A #531

Merged
merged 27 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6037f4c
implemented main logic
LucasWongC Nov 13, 2024
a4febdc
approve gho and weth to merit safe
LucasWongC Nov 13, 2024
bf5b453
add md content
LucasWongC Nov 14, 2024
f4cdef3
removed comment
LucasWongC Nov 20, 2024
4dddfd1
add swap part
LucasWongC Nov 21, 2024
8e4ef83
used CollectorUtils and scaledBalanceOf
LucasWongC Nov 21, 2024
e0d5b79
bugfix on checking event
LucasWongC Nov 21, 2024
547782c
swap slippage changed
LucasWongC Nov 21, 2024
61556a1
restructured codebase
LucasWongC Nov 21, 2024
463ac62
updated dai slippage
LucasWongC Nov 21, 2024
0c33682
default test on eth and fix md
LucasWongC Nov 22, 2024
7c98885
added underlying check when withdraw from v2
LucasWongC Nov 22, 2024
f6393e1
typo fix
LucasWongC Nov 22, 2024
7b1c7cf
feat: update swapper
efecarranza Nov 25, 2024
7e9e7ae
testing bugfix on swap
LucasWongC Nov 25, 2024
221c795
submodule updated
LucasWongC Nov 25, 2024
d5e478b
bugfix while rebase
LucasWongC Nov 26, 2024
aaf7a75
used balanceOf instead of scaledBalanceOf
LucasWongC Nov 26, 2024
4e966e4
used aave oracles
LucasWongC Nov 26, 2024
95dca13
used aave address book
LucasWongC Nov 27, 2024
a9c256e
Merge branch 'main' into september-update-part-a
LucasWongC Nov 28, 2024
6760be9
updated polygon
LucasWongC Nov 28, 2024
9844c27
feedback fix from bgd
LucasWongC Nov 28, 2024
c41f0e1
Merge branch 'main' into september-update-part-a
LucasWongC Nov 28, 2024
a5acb7e
aave-helpers updated
LucasWongC Nov 28, 2024
dcddfeb
bugfix on rescue part
LucasWongC Nov 28, 2024
5ea2667
bugfix on bridge
LucasWongC Nov 28, 2024
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
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
@@ -0,0 +1,66 @@
## Reserve changes

### Reserve altered

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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 15,924,528.6233 DAI [15924528623359921994863938] | 15,424,528.6233 DAI [15424528623359921994863938] |
| virtualBalance | 15,924,487.4050 DAI [15924487405080584531407384] | 15,424,487.4050 DAI [15424487405080584531407384] |


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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 137,192,431.4930 USDC [137192431493016] | 135,942,431.4930 USDC [135942431493016] |
| virtualBalance | 137,186,093.5677 USDC [137186093567742] | 135,936,093.5677 USDC [135936093567742] |


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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 199,667,226.1302 USDT [199667226130261] | 198,417,226.1302 USDT [198417226130261] |
| virtualBalance | 199,666,071.9160 USDT [199666071916049] | 198,416,071.9160 USDT [198416071916049] |


## Raw diff

```json
{
"reserves": {
"0x6B175474E89094C44Da98b954EedeAC495271d0F": {
"aTokenUnderlyingBalance": {
"from": "15924528623359921994863938",
"to": "15424528623359921994863938"
},
"virtualBalance": {
"from": "15924487405080584531407384",
"to": "15424487405080584531407384"
}
},
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": {
"aTokenUnderlyingBalance": {
"from": "137192431493016",
"to": "135942431493016"
},
"virtualBalance": {
"from": "137186093567742",
"to": "135936093567742"
}
},
"0xdAC17F958D2ee523a2206206994597C13D831ec7": {
"aTokenUnderlyingBalance": {
"from": "199667226130261",
"to": "198417226130261"
},
"virtualBalance": {
"from": "199666071916049",
"to": "198416071916049"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Reserve changes

### Reserve altered

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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 546,549.4039 USDC [546549403932] | 495,281.6742 USDC [495281674219] |
| virtualBalance | 546,472.3570 USDC [546472357070] | 495,204.6273 USDC [495204627357] |


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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 50,745.9305 LUSD [50745930580778611947683] | 47,352.8754 LUSD [47352875460535625271531] |
| virtualBalance | 50,745.9305 LUSD [50745930580778611947683] | 47,352.8754 LUSD [47352875460535625271531] |


## Raw diff

```json
{
"reserves": {
"0x7F5c764cBc14f9669B88837ca1490cCa17c31607": {
"aTokenUnderlyingBalance": {
"from": "546549403932",
"to": "495281674219"
},
"virtualBalance": {
"from": "546472357070",
"to": "495204627357"
}
},
"0xc40F949F8a4e094D1b49a23ea9241D289B7b2819": {
"aTokenUnderlyingBalance": {
"from": "50745930580778611947683",
"to": "47352875460535625271531"
},
"virtualBalance": {
"from": "50745930580778611947683",
"to": "47352875460535625271531"
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
## Reserve changes

### Reserve altered

#### WPOL ([0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270](https://polygonscan.com/address/0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270))

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 52,650,750.6758 WPOL [52650750675856200640974187] | 52,667,562.2081 WPOL [52667562208106867321829248] |
| virtualBalance | 52,650,750.6758 WPOL [52650750675856200640974187] | 52,667,562.2081 WPOL [52667562208106867321829248] |


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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 1,707,045.0579 USDC [1707045057954] | 1,609,614.1753 USDC [1609614175343] |
| virtualBalance | 1,706,866.8345 USDC [1706866834534] | 1,609,435.9519 USDC [1609435951923] |


#### LINK ([0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39](https://polygonscan.com/address/0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39))

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 760,821.4170 LINK [760821417069511886594222] | 760,872.1296 LINK [760872129635541295966141] |
| virtualBalance | 760,821.4105 LINK [760821410547668237659103] | 760,872.1231 LINK [760872123113697647031022] |


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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 15,758.8942 WETH [15758894219160674399387] | 15,767.0373 WETH [15767037334375620833165] |
| virtualBalance | 15,758.8942 WETH [15758894219160674399387] | 15,767.0373 WETH [15767037334375620833165] |


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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 796,729.9585 DAI [796729958523072652649220] | 1,065,764.4509 DAI [1065764450949738388580093] |
| virtualBalance | 796,569.0625 DAI [796569062545281907932762] | 1,065,603.5549 DAI [1065603554971947643863635] |


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

| description | value before | value after |
| --- | --- | --- |
| aTokenUnderlyingBalance | 3,912,929.3134 USDT [3912929313459] | 4,296,001.3224 USDT [4296001322402] |
| virtualBalance | 3,912,857.1847 USDT [3912857184739] | 4,295,929.1936 USDT [4295929193682] |


## Raw diff

```json
{
"reserves": {
"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": {
"aTokenUnderlyingBalance": {
"from": "52650750675856200640974187",
"to": "52667562208106867321829248"
},
"virtualBalance": {
"from": "52650750675856200640974187",
"to": "52667562208106867321829248"
}
},
"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174": {
"aTokenUnderlyingBalance": {
"from": "1707045057954",
"to": "1609614175343"
},
"virtualBalance": {
"from": "1706866834534",
"to": "1609435951923"
}
},
"0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39": {
"aTokenUnderlyingBalance": {
"from": "760821417069511886594222",
"to": "760872129635541295966141"
},
"virtualBalance": {
"from": "760821410547668237659103",
"to": "760872123113697647031022"
}
},
"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619": {
"aTokenUnderlyingBalance": {
"from": "15758894219160674399387",
"to": "15767037334375620833165"
},
"virtualBalance": {
"from": "15758894219160674399387",
"to": "15767037334375620833165"
}
},
"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063": {
"aTokenUnderlyingBalance": {
"from": "796729958523072652649220",
"to": "1065764450949738388580093"
},
"virtualBalance": {
"from": "796569062545281907932762",
"to": "1065603554971947643863635"
}
},
"0xc2132D05D31c914a87C6611C10748AEb04B58e8F": {
"aTokenUnderlyingBalance": {
"from": "3912929313459",
"to": "4296001322402"
},
"virtualBalance": {
"from": "3912857184739",
"to": "4295929193682"
}
}
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity ^0.8.0;
import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol';
import {IACLManager} from 'aave-address-book/AaveV3.sol';
import {MiscArbitrum} from 'aave-address-book/MiscArbitrum.sol';
import {GhoArbitrum} from 'aave-address-book/GhoArbitrum.sol';
import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol';
import {IAccessControl} from '@openzeppelin/contracts/access/IAccessControl.sol';
import {ITransparentUpgradeableProxy} from 'solidity-utils/contracts/transparent-proxy/TransparentUpgradeableProxy.sol';
Expand Down Expand Up @@ -35,7 +36,7 @@ contract AaveV3Arbitrum_GHOStewardV2Upgrade_20241007 is IProposalGenericExecutor
function execute() external {
// New CCIP Token Pool
ILegacyProxyAdmin(MiscArbitrum.PROXY_ADMIN).upgrade(
ITransparentUpgradeableProxy(payable(MiscArbitrum.GHO_CCIP_TOKEN_POOL)),
ITransparentUpgradeableProxy(payable(GhoArbitrum.GHO_CCIP_TOKEN_POOL)),
NEW_CCIP_POOL_IMPL
);

Expand All @@ -46,7 +47,7 @@ contract AaveV3Arbitrum_GHOStewardV2Upgrade_20241007 is IProposalGenericExecutor
);

address[] memory controlledFacilitators = new address[](1);
controlledFacilitators[0] = MiscArbitrum.GHO_CCIP_TOKEN_POOL;
controlledFacilitators[0] = GhoArbitrum.GHO_CCIP_TOKEN_POOL;
IGhoBucketSteward(GHO_BUCKET_STEWARD).setControlledFacilitator(controlledFacilitators, true);

// Gho Aave Steward
Expand All @@ -56,7 +57,7 @@ contract AaveV3Arbitrum_GHOStewardV2Upgrade_20241007 is IProposalGenericExecutor
);

// Gho CCIP Steward
IUpgradeableLockReleaseTokenPool(MiscArbitrum.GHO_CCIP_TOKEN_POOL).setRateLimitAdmin(
IUpgradeableLockReleaseTokenPool(GhoArbitrum.GHO_CCIP_TOKEN_POOL).setRateLimitAdmin(
GHO_CCIP_STEWARD
);
}
Expand Down
Loading
Loading