Omniscia Kwenta Audit
Staking V2 w Migrators Security Audit
Audit Report Revisions
Commit Hash | Date | Audit Report Hash |
---|---|---|
9cceb6d5ef | August 22nd 2023 | 2330cbb84a |
df06446d33 | September 10th 2023 | 7adc003ef3 |
df06446d33 | September 12th 2023 | 1b4d62d3cf |
df06446d33 | September 23rd 2023 | a12fa61223 |
df06446d33 | September 23rd 2023 | f97d3810bd |
Audit Overview
We were tasked with performing an audit of the Kwenta codebase and in particular the migration contracts as well as V2 implementation changes meant to facilitate a smooth transition from version 1 to version 2 of the Kwenta staking and escrow protocol.
Over the course of the audit, we identified a significant flaw in the storage layout update of the RewardEscrowV2
contract as well as a medium-severity flaw that would arise in production conditions for the EscrowMigrator
contract.
We advise the Kwenta team to closely evaluate all minor-and-above findings identified in the report and promptly remediate them as well as consider all optimizational exhibits identified in the report.
Post-Audit Conclusion
The Kwenta team iterated through all findings within the report and provided us with a revised commit hash to evaluate all exhibits on.
After extensive discussions with the Kwenta team, we assessed that certain findings were incorrectly identified due to a misconception between the versioning system in the Kwenta GitHub repository and the actual deployments of the code.
As such, these findings (including the major storage-related finding mentioned in the audit summary) have been removed from the audit report at the request of the Kwenta team as they were incorrect and misguided.
We evaluated all alleviations performed by Kwenta and have identified that all exhibits have been adequately dealt with no outstanding issues remaining in the report.
Contracts Assessed
Files in Scope | Repository | Commit(s) |
---|---|---|
EscrowMigrator.sol (EMR) | token | 9cceb6d5ef, df06446d33 |
EarlyVestFeeDistributor.sol (EVF) | token | 9cceb6d5ef, df06446d33 |
RewardEscrowV2.sol (REV) | token | 9cceb6d5ef, df06446d33 |
StakingRewardsV2.sol (SRV) | token | 9cceb6d5ef, df06446d33 |
Audit Synopsis
Severity | Identified | Alleviated | Partially Alleviated | Acknowledged |
---|---|---|---|---|
0 | 0 | 0 | 0 | |
10 | 9 | 0 | 1 | |
3 | 3 | 0 | 0 | |
1 | 1 | 0 | 0 | |
0 | 0 | 0 | 0 |
During the audit, we filtered and validated a total of 1 findings utilizing static analysis tools as well as identified a total of 13 findings during the manual review of the codebase. We strongly recommend that any minor severity or higher findings are dealt with promptly prior to the project's launch as they can introduce potential misbehaviours of the system as well as exploits.
The list below covers each segment of the audit in depth and links to the respective chapter of the report: