Omniscia AmpleSense Audit
AmplesenseVault Code Style Findings
AmplesenseVault Code Style Findings
AVT-01C: Non-Standard ERC-20 Transfer Invocation
| Type | Severity | Location |
|---|---|---|
| Code Style | Informational | AmplesenseVault.sol:L348 |
Description:
The _rebase function executes a transfer invocation wrapped by a require statement when the contract system already imports and utilizes the SafeERC20 library.
Example:
348require(eefi_token.transfer(treasury, eefi_token.balanceOf(address(this))), "AmplesenseVault: Treasury transfer failed");Recommendation:
We advise the safeTransfer function to be utilized instead of the current paradigm to ensure consistency within the codebase.
Alleviation:
The safeTransfer function of the SafeERC20 library is now properly utilized.
AVT-02C: Variable Mutability Specifiers
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | Informational | AmplesenseVault.sol:L25, L26, L27, L99, L100, L101 |
Description:
The linked variables are assigned to only once during the contract's constructor.
Example:
96constructor(IERC20 ampl_token)97AMPLRebaser(ampl_token)98Ownable() {99 eefi_token = new EEFIToken();100 rewards_eefi = new Distribute(9, IERC20(eefi_token));101 rewards_eth = new Distribute(9, IERC20(0));102}Recommendation:
We advise them to be set as immutable greatly optimizing their read access gas cost.
Alleviation:
The exhibit has been partially alleviated by introducing the immutable specifier for the latter two of the three linked variables, however, we consider it adequately dealt with as the Amplesense team opted to retain the eefi_token mutable.