expose aave (helper) addresses
sakulstra opened this issue · comments
Issue
Currently there's no easy way to figure out the aave addresses (aka there's no package one can import to get the currently up to date addresses). Also there's no easy way to get notified in case an address was updated.
What currently get's closest to this is:
https://github.com/aave/aave-addresses with jsons per network https://aave.github.io/aave-addresses/kovan.json
This is lacking helper contracts though as they are not registered at the protocol.
Proposed solution
For helper contracts I think it would be reasonable to have a static addresses = {[Network]: string}
on the service so that people can simply access the address.
Alternative solution
We could also have a @aave/constants
package or similar containing the addresses. This package could contain all the "generatable addresses" and all the helper contract addresses.
apparently can only assign one person @sendra , @aschmidt20 , @joshstevens19 would appreciate feedback on this issue as it's along outstanding issue we should finally tackle imo.
Definitely think this would be a nice package to add. This would be my suggestion for a schema:
core: {
lendingPoolAddressProvider: CoreContract
lendingPoolAddressProviderRegistry: CoreContract
LendingPool: CoreContract
LendingPoolCollateralManager: CoreContract
LendingPoolConfigurator: CoreContract
LendingRateOracle: CoreContract
PriceOracle: CoreContract
PoolAdmin: CoreContract
EmergencyAdmin: CoreContract
ProtocolDataProvider: CoreContract
WETHGateway: CoreContract
}
interface CoreContract{
[Network]: {
[Market] : string
}
}
helpers: {
walletBalanceProvider: HelperContract
uiPoolDataProvider: HelperContract
uiIncentiveDataProvider: HelperContract
}
interface HelperContract{
[Network]: string
}
governance: {
AaveGovernanceV2: HelperContract
ExecutorLong: HelperContract
ExecutorShort: HelperContract
ExecutorLowThresh: HelperContract
GovernanceStrategy: HelperContract
GovernanceV2Helper: HelperContract
}
tokens: {
AAVE: ReserveToken
AMPL: ReserveToken
...
YFI: ReserveToken
ZRX: ReserveToken
}
interface ReserveToken{
[Network]: {
underlyingAssetAddress: string
[Market]: {
aTokenAddress: string
variableDebtTokenAddress: string
stableDebtTokenAddress: string
interestRateStrategy: string
}
}
}
I think for this to be useful, it needs to be automated, taken directly from the blockchain, if not it will be again the same problem that we need to manually update it. at lest for the protocol addresses. For helpers maybe for now it could be hardcoded as we dont have any automated registry for them