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 wUSDM as collateral to USDT market on Optimism #945

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

MishaShWoof
Copy link
Contributor

No description provided.

combinedScale = signed256(10 ** (rateProviderDecimals + underlyingDecimals));
description = description_;

if (decimals_ > 18) revert BadDecimals();

Choose a reason for hiding this comment

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

nit: having this comparison at the beginning might be better for readability

uint256 rate = IERC4626(rateProvider).convertToAssets(10**rateProviderDecimals);
(uint80 roundId_, int256 underlyingPrice, uint256 startedAt_, uint256 updatedAt_, uint80 answeredInRound_) = AggregatorV3Interface(underlyingPriceFeed).latestRoundData();

if (rate <= 0 || underlyingPrice <= 0) return (roundId_, 0, startedAt_, updatedAt_, answeredInRound_);

Choose a reason for hiding this comment

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

nit: since rate is unit256, == can be used instead of <= to avoid misunderstand.

@vitalii-woof-software vitalii-woof-software force-pushed the woof-software/add-wusdm-to-optimism-usdt branch 2 times, most recently from b404262 to 7e4a0f3 Compare November 7, 2024 14:22
@vitalii-woof-software vitalii-woof-software force-pushed the woof-software/add-wusdm-to-optimism-usdt branch from 7e4a0f3 to 6116139 Compare November 7, 2024 14:34
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.

3 participants