Setting MintCap to a Specific Value Is Prone to Front-Running.
`Dram` stable coin is using the approval-like model to set the minting caps of different operators, thus it is prone to the same front-run issues as the approval mechanism. When using the `setMintCap` function directly operator could front-run the transaction and completely spend the old cap and then spend the new one again after setting the transaction goes through.\\n```\\nfunction setMintCap(\\n address operator,\\n uint256 amount\\n) external onlyRoleOrAdmin(ROLE\\_MANAGER\\_ROLE) {\\n \\_setMintCap(operator, amount);\\n}\\n```\\n\\nImagine the following scenario:\\nAlice has a mint cap of 10.\\nA transaction is sent to the mem-pool to set it to 5 (decrease the cap). The intent is that Alice should only be able to mint 5 tokens.\\nAlice frontruns this transaction and mints 10 tokens.\\nOnce transaction 2 goes through Alice mints 5 more tokens.\\nIn total Alice minted 15 tokens.
Avoid using setting the specific mint caps and rather use increase/decrease methods that are present in the code already.
```\\nfunction setMintCap(\\n address operator,\\n uint256 amount\\n) external onlyRoleOrAdmin(ROLE\\_MANAGER\\_ROLE) {\\n \\_setMintCap(operator, amount);\\n}\\n```\\n