-
Notifications
You must be signed in to change notification settings - Fork 39
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
multiple new collateral pricefeeds #318
base: development
Are you sure you want to change the base?
Conversation
|
||
import "contracts/feeds/IPriceFeedsExt.sol"; | ||
|
||
contract ATokenPriceHelper_ARB is IPriceFeedHelper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could use mapping and few configuration transactions instead of hardcode all these addresses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapping is going to be more expensive to use
contracts/feeds/pricehelpers/arbitrum/ITokenPriceFeedHelperV2_ARB.sol
Outdated
Show resolved
Hide resolved
contracts/feeds/pricehelpers/arbitrum/ITokenPriceFeedHelperV2_ARB.sol
Outdated
Show resolved
Hide resolved
IAToken private constant aArbWETH = IAToken(0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8); | ||
|
||
address private constant DAI = 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1; | ||
address private constant ERUS = 0xD22a58f79e9481D1a88e00c343885A588b34b68B; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is EURS, not ERUS
function latestAnswer(address token) external view returns (uint256) { | ||
require(token == CURVE_USDT_USDC_TOKEN, "unsupported"); | ||
uint256 balanceUSD = USDT.balanceOf(CURVE_USDT_USDC_TOKEN) * uint256(USDT_PRICE_FEED.latestAnswer()) / 1e8; | ||
balanceUSD += USDC.balanceOf(CURVE_USDT_USDC_TOKEN) * uint256(USDC_PRICE_FEED.latestAnswer()) / 1e8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to value by using the virtual price and using the lowest priced token, whether that is USDT or USDC to value the virtual price
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fully agree
No description provided.