Skip to content

ConstantRateProviderFactory on Base and Arbitrum #290

@sschuldenzucker

Description

@sschuldenzucker

Type of Smart Contract

Other

Additional Contract Information

  • Does this rate provider pertain to an ERC4626 contract?
  • If so, is the intention for this ERC4626 asset to be boosted?
  • If so, shall the underlying asset be used to add/remove liquidity in a pool if possible? (i.e. add USDC for waUSDC)
  • If so, shall the wrapped asset also be used to add/remove liquidity in a pool? (i.e. add waUSDC directly)

Type of Smart Contract (if Other)

Factory for rate providers that quote a constant rate

Contract Source Code

https://basescan.org/address/0xc0555b555857AAf2b5b28601eaAcFba2F8BBFB09#code

Asset Contract Source Code

No response

Additional Links

https://basescan.org/address/0xc0555b555857AAf2b5b28601eaAcFba2F8BBFB09#code
https://arbiscan.io/address/0xF502791715F287989374c452Fa78b475A3194a90

Protocol Documentation

No response

Protocol Audits

No response

Terms and Conditions

  • The protocol to be integrated has been audited by at least one security firm or independent researcher.
  • If deployed, the contract & all involved downstream contracts are verified on etherscan.
  • The contract does not rely upon an EOA to supply any critical data (e.g., price).
  • If upgradeable, the contract's administrator is not an EOA.

Additional Comments & Clarifications

This is a factory that creates ConstantRateProvider contracts. These are rate providers that always quote the same value. They are used as a scaling rate to scale the order of magnitude of (e.g.,) WETH amounts into the order of magnitude of (e.g.,) USD amounts for Gyro volatile pools. The pool curve itself is responsible for representing the actual price, not the rateprovider.

We made this factory to reduce review effort for future ConstantRateProvider deployments, under the assumption that future constant rateproviders deployed from the factory can be whitelisted automatically.

Operation

The factory is analogous to the pool factories. It exposes a single method, .create(uint256 value). When this is called (by anyone), the following happens:

  • A new ConstantRateProvider is deployed that always quotes the given value.
  • An event RateProviderCreated(address) is emitted with the address of the new ConstantRateProvider.
  • The new rateprovider is registered in the factory so that factory.isRateProviderFromFactory(rateprovider) will return true in the following.

State and Control

The ConstantRateProviders created by this factory do not have any mutable state and no permissioned control. The factory itself has no mutable state beyond the isRateProviderFromFactory mapping and no permissioned control.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions