Omniscia Symbiosis Finance Audit
RelayRecipientUpgradeable Code Style Findings
RelayRecipientUpgradeable Code Style Findings
RRU-01C: Redundant Implementation
| Type | Severity | Location |
|---|---|---|
| Standard Conformity | ![]() | RelayRecipientUpgradeable.sol:L7-L57 |
Description:
The RelayRecipientUpgradeable contract is meant to implement the ERC2771Context contract of OpenZeppelin in an upgrade-compatible way, however, the said contract already exists under metatx/ERC2771ContextUpgradeable in the @openzeppelin/contracts-upgradeable dependency.
Example:
5import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";6
7abstract contract RelayRecipientUpgradeable is OwnableUpgradeable {8 address private _trustedForwarder;9
10 function __RelayRecipient_init(address trustedForwarder)11 internal12 initializer13 {14 __Ownable_init();15 _trustedForwarder = trustedForwarder;16 }Recommendation:
We advise it to be utilized instead as there is no reason the _trustedForwarder should be mutable and increases the contract's gas cost.
Alleviation:
The Symbiosis Finance team considered this exhibit but opted not to apply a remediation for it in the current iteration.
RRU-02C: Redundant Import
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | RelayRecipientUpgradeable.sol:L5, L7 |
Description:
The RelayRecipientUpgradeable contract is set as OwnableUpgradeable yet none of that contract's traits are utilized.
Example:
5import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";6
7abstract contract RelayRecipientUpgradeable is OwnableUpgradeable {Recommendation:
We advise the inheritence to be omitted.
Alleviation:
The Symbiosis Finance team considered this exhibit but opted not to apply a remediation for it in the current iteration.
