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

Add AIP for GHO Cross-Chain Launch #350

Merged
merged 33 commits into from
Jun 14, 2024

Conversation

miguelmtzinf
Copy link
Contributor

parth-15 and others added 15 commits December 5, 2023 23:04
* chore: add payload and deploy script for update of GHO variable debt token

* forge install: gho-core

* chore: add gho-core to dependency

* test: Add tests for update of gho variable token

* test: Add tests for update of gho variable token

* fix: add modifier in method of interface

* fix: remove gho dependency from repo and fix test

* fix: Remove unnecesary dependency

* fix: Add latest details

---------

Co-authored-by: miguelmtzinf <miguelmtz.mail@gmail.com>
* fix: Make new impl constant

* fix: Fix AIP text
@miguelmtzinf miguelmtzinf marked this pull request as ready for review June 3, 2024 11:08
miguelmtzinf and others added 2 commits June 10, 2024 10:51
* feat: Add sophhisticated defensive aave seed

* fix: Allows AaveDefensive contract remove itself as facilitator

* fix: Add docs and reduce bytecode size
listings[0] = IAaveV3ConfigEngine.Listing({
asset: GHO,
assetSymbol: 'GHO',
priceFeed: 0x3c786e934F23375Ca345C9b8D5aD54838796E8e7,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miguelmtzinf With the v3 ethereum market pricing GHO on primary market (fixed $1) and the v3 arbitrum pricing GHO on secondary market price could any discrepancies arise? Wanted to understand a bit deeper on why we are pricing GHO on arbitrum using secondary market price over primary (fixed $1).

In case we go ahead and use the secondary market price for GHO, I think it is a good idea if we use the cap adapters for the feed: https://github.com/bgd-labs/aave-capo/blob/main/src/contracts/PriceCapAdapterStable.sol

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GHO price is fixed at $1 on Ethereum because GHO is being issued by the Aave Pool and acts as a stabilizing mechanism. GHO on Arbitrum Aave Pool works as any other listed asset.

This price feed is the Chainlink GHO/USD price oracle, VWAP across chains, so mainly using secondary market on Ethereum and CEXes atm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added capped gho / usd price feed in 0c2e4cc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why from the Aave protocol perspective GHO should have a different price in Arbitrum than Ethereum? The question is not about the nature of being deposited vs minted, it is about the high-level implications.
For example, in which situation of only-borrowable GHO having 1:1 creates a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GHO works as a regular asset across chains, while specific features of GHO like price stability or backing are kept on Ethereum.

I do not see any problem on not using a fixed price on Arbitrum, specially taking into consideration it will not be collateral. The expansion of GHO to other networks and Aave Pools will be monitored and config can be adjusted by the DAO if needed.

@AsafHochstadtCertora
Copy link

After reviewing the changes, the fixes seem ok to me

@ianflexa
Copy link
Contributor

for the GHO capo adapter I would recommend to also create a PR in aave-capo

@miguelmtzinf
Copy link
Contributor Author

@ianflexa just pushed bgd-labs/aave-capo#34

proxy = ICreate3Factory(MiscArbitrum.CREATE_3_FACTORY).create(GHO_DEPLOY_SALT, creationCode);
}

function deployCcipTokenPool(address ghoToken) external returns (address imple, address proxy) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this potentially make the whole execution revert?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is safe given that create3 address depends on the executor's signer

actions[1] = GovV3Helpers.buildAction(payload1);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way there will be two actions and a single payload, so payload 0 and payload 1 would be executed in a single tx which is not what we wish.
For payload0 and payload1 lets deploy separate payloads, for reference you can check here.
Also proposal creation script should be updated accordingly as well.

@miguelmtzinf
Copy link
Contributor Author

Moved GHO listing out of this AIP so it can be executed after Chainlink lane activation.
AIP for GHO onboard to Arbitrum Aave V3 Pool here: #356

@brotherlymite brotherlymite merged commit 7725647 into bgd-labs:main Jun 14, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants