ravikiran.web3
medium
In the mintForToken, as a good project protecting the interest of end user, it will be good to check for Non zero address before performing the transaction. As a public function, the exposure is larger, so implementing a check and reverting incase of zero address will help.
mintForToken should check for To address to be non zero before peforming the transfer. Incase the user passes a zero address, those funds will be lost.
Passing of 0 address in "To" address can result in loss of funds.
function mintForToken(
address token,
uint256 tokenAmount,
**address to**
) public returns (uint256 stableCoinAmount) {
require(hasCollateralMint(token), "unsupported token");
Manual Review
check for to address to be non zero before transfer.