-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feat/generic harvester #117
Conversation
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.
Slither found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
function _updateLimitExposuresYieldAsset( | ||
address asset, | ||
YieldBearingParams storage yieldBearingInfo | ||
) internal virtual { | ||
uint64[] memory xFeeMint; | ||
(xFeeMint, ) = TRANSMUTER.getCollateralMintFees(collatInfo.asset); | ||
(xFeeMint, ) = transmuter.getCollateralMintFees(asset); | ||
uint256 length = xFeeMint.length; | ||
if (length <= 1) collatInfo.maxExposureYieldAsset = 1e9; | ||
else collatInfo.maxExposureYieldAsset = xFeeMint[length - 2]; | ||
if (length <= 1) yieldBearingInfo.maxExposure = 1e9; | ||
else yieldBearingInfo.maxExposure = xFeeMint[length - 2]; | ||
|
||
uint64[] memory xFeeBurn; | ||
(xFeeBurn, ) = TRANSMUTER.getCollateralBurnFees(collatInfo.asset); | ||
(xFeeBurn, ) = transmuter.getCollateralBurnFees(asset); | ||
length = xFeeBurn.length; | ||
if (length <= 1) collatInfo.minExposureYieldAsset = 0; | ||
else collatInfo.minExposureYieldAsset = xFeeBurn[length - 2]; | ||
if (length <= 1) yieldBearingInfo.minExposure = 0; | ||
else yieldBearingInfo.minExposure = xFeeBurn[length - 2]; | ||
} |
Check warning
Code scanning / Slither
Unused return Medium
function _updateLimitExposuresYieldAsset( | ||
address asset, | ||
YieldBearingParams storage yieldBearingInfo | ||
) internal virtual { | ||
uint64[] memory xFeeMint; | ||
(xFeeMint, ) = TRANSMUTER.getCollateralMintFees(collatInfo.asset); | ||
(xFeeMint, ) = transmuter.getCollateralMintFees(asset); | ||
uint256 length = xFeeMint.length; | ||
if (length <= 1) collatInfo.maxExposureYieldAsset = 1e9; | ||
else collatInfo.maxExposureYieldAsset = xFeeMint[length - 2]; | ||
if (length <= 1) yieldBearingInfo.maxExposure = 1e9; | ||
else yieldBearingInfo.maxExposure = xFeeMint[length - 2]; | ||
|
||
uint64[] memory xFeeBurn; | ||
(xFeeBurn, ) = TRANSMUTER.getCollateralBurnFees(collatInfo.asset); | ||
(xFeeBurn, ) = transmuter.getCollateralBurnFees(asset); | ||
length = xFeeBurn.length; | ||
if (length <= 1) collatInfo.minExposureYieldAsset = 0; | ||
else collatInfo.minExposureYieldAsset = xFeeBurn[length - 2]; | ||
if (length <= 1) yieldBearingInfo.minExposure = 0; | ||
else yieldBearingInfo.minExposure = xFeeBurn[length - 2]; | ||
} |
Check warning
Code scanning / Slither
Unused return Medium
No description provided.