ak1
high
mintWithEth function will be used to accept the ETH from user and mint the UXD tokens.
When the UXDController has the function receive to receive the any ETH directly sent to contract by user. But it does not mint the UXD token for those caller.
UXDController.sol#L87-L89 - UXDController has the receive function.
/// @notice Fallback function for this contract to receive ETH
// solhint-disable-next-line no-empty-blocks
receive() external payable {}
The contract will not be minting any UXD token for an user who directly send the ether.
ETH would be locked into the contract due to un accounting.
Manual Review
We would suggest following approaches on directly receiving the ETH into the contract.
If the contract want to receive the ETH through the receive then call the mintWithEth
inside the receive function.
otherwise, revert the call inside the receive function if contract does not want to account the ETH directly sent by this call.