Open codehawks-bot opened 1 year ago
@return
Gas Optimization / Informational
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DSCEngine.sol
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol
NatSpec @return argument is missing
Instances (19):
File: src/DSCEngine.sol 299: function _getAccountInformation(address user) 312: function _healthFactor(address user) private view returns (uint256) { 326: function _calculateHealthFactor(uint256 totalDscMinted, uint256 collateralValueInUsd) 342: function getTokenAmountFromUsd(address token, uint256 usdAmountInWei) public view returns (uint256) { 352: function getAccountCollateralValue(address user) public view returns (uint256 totalCollateralValueInUsd) { 363: function getUsdValue(address token, uint256 amount) public view returns (uint256) { 373: function getAccountInformation(address user) 381: function getAdditionalFeedPrecision() external pure returns (uint256) { 385: function getPrecision() external pure returns (uint256) { 389: function calculateHealthFactor(uint256 totalDscMinted, uint256 collateralValueInUsd) 397: function getHealthFactor(address user) external view returns (uint256) { 401: function getLiquidationBonus() external pure returns (uint256) { 405: function getCollateralTokenPriceFeed(address token) external view returns (address) { 409: function getCollateralTokens() external view returns (address[] memory) { 413: function getMinHealthFactor() external pure returns (uint256) { 417: function getLiquidationThreshold() external pure returns (uint256) { 421: function getCollateralBalanceOfUser(address user, address token) external view returns (uint256) { 425: function getDsc() external view returns (address) {
Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DSCEngine.sol
File: src/DecentralizedStableCoin.sol 58: function mint(address _to, uint256 _amount) external onlyOwner returns (bool) {
Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol
Code Review using VSCode
Add @return NatSpec
NatSpec
@return
argument is missingSeverity
Gas Optimization / Informational
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DSCEngine.sol
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol
Summary
NatSpec
@return
argument is missingVulnerability Details
Instances (19):
Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DSCEngine.sol
Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol
Tools Used
Code Review using VSCode
Recommendations
Add
@return
NatSpec