Omniscia Alliance Block Audit
Manual Review
Manual Review
A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in the liquidity staking codebase.
As the project at hand implements staking pools, intricate care was put into ensuring that the flow of funds within the system conforms to the specifications and restrictions laid forth within the protocol's specification.
We validated that all state transitions of the system occur within sane criteria and that all rudimentary formulas within the system execute as expected. We identified 2 major vulnerabilities; the former concerning a full takeover of the LiquidityMiningCampaign
contract enabling the malicious party to siphon all the reward token funds from within, and the latter permanently locking user stakes due to a miscalculation on how the AutoStake
contracts are restaked into the reward pool.
Additionally, the system was investigated for any other commonly present attack vectors such as re-entrancy attacks, mathematical truncations, logical flaws and ERC / EIP standard inconsistencies. The documentation of the project was satisfactory to a certain extent, however, we strongly recommend the documentation of the project to be expanded at certain complex points such as the autostake and pool features as certain contracts require special attention i.e. derivative implementations of StakeTransferer
should impose proper access control and override
the setReceiverWhitelisted
implementation as the base implementation does not impose any restriction.
A total of 60 findings were identified over the course of the manual review of which 18 findings concerned the behaviour and security of the system. The non-security related findings, such as optimizations, are included in the separate Code Style chapter.
The finding table below enumerates all these security / behavioural findings:
ID | Severity | Addressed | Title |
---|---|---|---|
APF-01M | Minor | Yes | Pull-Over-Push Pattern |
ASE-01M | Major | Yes | Invalid Restake of Exited Stakes |
LMC-01M | Major | Yes | Inexistent Access Control of lockSchemes Setter |
LMC-02M | Medium | Yes | Potentially Inaccurate Proportional Calculation |
LMC-03M | Minor | Yes | Comment Addression |
LMC-04M | Minor | Yes | Inexistent Re-Entrancy Guard |
LMF-01M | Medium | Yes | Potential for Lock of Funds |
LMF-02M | Minor | No | Non-Standard Pool Seeding |
LSE-01M | Minor | Yes | Unsanitized LockScheme Configuration |
NCP-01M | Minor | No | Non-Standard Pool Seeding |
RPB-01M | Medium | Yes | Incorrect Rewards & Multiplier Calculations |
RPB-02M | Minor | Yes | Insufficient Siphoning Protection |
RPF-01M | Medium | Yes | Potential for Lock of Funds |
RPF-02M | Minor | No | Non-Standard Pool Seeding |
TET-01M | Minor | No | Code Bottleneck |
TET-02M | Minor | Yes | Inapplicacy of Checks-Effects-Interactions Pattern |
TET-03M | Minor | No | Incorrect Cap Management |
TET-04M | Minor | Yes | Multi-Transaction Reversal |