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

AddressProvider-ng #19

Closed
4 tasks
bout3fiddy opened this issue Mar 18, 2024 · 0 comments · Fixed by #20
Closed
4 tasks

AddressProvider-ng #19

bout3fiddy opened this issue Mar 18, 2024 · 0 comments · Fixed by #20
Assignees
Labels
enhancement New feature or request

Comments

@bout3fiddy
Copy link
Collaborator

Background

Currently Curve has an Address Provider contract on most chains (not all), deployed deterministically at: 0x0000000022d53366457f9d5e68ec105046fc4383. This contract is a simply 'entrypoint' contract that guides integrators to other assets belonging to curve, such that they could use it as an on-chain API of on-chain APIs.

New AddressProvider entries are added via add_new_id, callable only by the admin, which is currently a thin proxy contract deployed at 0xEdf2C58E16Cc606Da1977e79E1e69e79C54fe242, owned by Curve Core Devs.

Each new ID added to the AddressProvider cannot be unset.

Challenges

  1. The current deployer used to deploy the AddressProvider is unavailable. This means AddressProvider contracts cannot be deterministically deployed to new chains.
  2. The AddressProvider contract does have a method to unset an address set at a particular ID but not change its description. This means that ID (s) cannot be repurposed.

Proposed Solution

  1. We re-do the AddressProvider with create2 deployer. Optionally, we can mine salts for vanity addresses using CreateXCrunch.
  2. New IDs in the improved AddressProvider contract can be re-purposed entirely such that the description of an existing ID can be changed as well.
  3. The newly deployed AddressProvider IDs shall have the same ID designation across all chains. This could perhaps be achieved by changing the index of the ID hashmap from uint256 to bytes32, where the generated bytes32 is a keccak hash of the name of the contract.

Task List

  • Add a new method to AddressProvider to change the description of an ID
  • (optional) mine salts for create2 deployment
  • deploy across all networks Curve has presence
  • set AddressProvider IDs to be the same across all chains.
@bout3fiddy bout3fiddy added the enhancement New feature or request label Mar 18, 2024
@bout3fiddy bout3fiddy linked a pull request Mar 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants