Omniscia Kwenta Audit

Staking V2 w Migrators Security Audit

Audit Report Revisions

Commit HashDateAudit Report Hash
9cceb6d5efAugust 22nd 20232330cbb84a
df06446d33September 10th 20237adc003ef3
df06446d33September 12th 20231b4d62d3cf
df06446d33September 23rd 2023a12fa61223
df06446d33September 23rd 2023f97d3810bd

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 ScopeRepositoryCommit(s)
EscrowMigrator.sol (EMR)token9cceb6d5ef,
df06446d33
EarlyVestFeeDistributor.sol (EVF)token9cceb6d5ef,
df06446d33
RewardEscrowV2.sol (REV)token9cceb6d5ef,
df06446d33
StakingRewardsV2.sol (SRV)token9cceb6d5ef,
df06446d33

Audit Synopsis

SeverityIdentifiedAlleviatedPartially AlleviatedAcknowledged
0000
10901
3300
1100
0000

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: