Omniscia Olive Audit

Rewards Code Style Findings

Rewards Code Style Findings

REW-01C: Redundant Usage of SafeMath

Description:

The project's code is compiled with a compiler version beyond 0.8.X which has built-in safe arithmetics toggled on by default.

Example:

contracts/rewards/Rewards.sol
3pragma solidity 0.8.4;
4pragma experimental ABIEncoderV2;
5
6import "@openzeppelin/contracts/access/Ownable.sol";
7import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
8import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
9import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
10import "../interfaces/IRewards.sol";
11import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol";
12
13contract Rewards is Ownable, IRewards {
14 using SafeMath for uint256;

Recommendation:

We advise the codebase to omit the usage of SafeMath in favor of reduced gas costs.

Alleviation:

The redundant usage of SafeMath has been safely omitted from the codebase.