Omniscia Mean Finance Audit

Swappers Module Security Audit

Audit Overview

We were tasked with performing an audit of the Mean Finance codebase and in particular their swapper module implementation meant to expose a single-point-of-contact for all swaps performed across the Mean Finance system.

Over the course of the audit, we identified several ways code maintenance can be optimized as well as certain code paths that could lead to ill user experience and loss of funds if mis-used.

We advise the Mean Finance 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 Mean Finance team provided us with a document that addresses all exhibits outlined in the report and provides rationale as to why certain exhibits were acknowledged.

We evaluated the latest commit hash provided to us by the Mean Finance team and assessed that all findings have been adequately dealt with.

Contracts Assessed

Files in ScopeRepositoryCommit(s)
CollectableWithGovernor.sol (CWG)swappers1048d0057f,
8232e8de18
Governable.sol (GEL)swappers1048d0057f,
8232e8de18
GetBalances.sol (GBS)swappers1048d0057f,
8232e8de18
RunSwap.sol (RSP)swappers1048d0057f,
8232e8de18
RevokableWithGovernor.sol (RWG)swappers1048d0057f,
8232e8de18
Shared.sol (SDE)swappers1048d0057f,
8232e8de18
SwapProxy.sol (SPY)swappers1048d0057f,
8232e8de18
SwapAdapter.sol (SAR)swappers1048d0057f,
8232e8de18
SwapperRegistry.sol (SRY)swappers1048d0057f,
8232e8de18
TakeAndRunSwap.sol (TAR)swappers1048d0057f,
8232e8de18
TakeRunSwapAndTransfer.sol (TRS)swappers1048d0057f,
8232e8de18
TakeRunSwapsAndTransferMany.sol (TRA)swappers1048d0057f,
8232e8de18
TakeManyRunSwapAndTransferMany.sol (TMR)swappers1048d0057f,
8232e8de18
TakeManyRunSwapsAndTransferMany.sol (TMS)swappers1048d0057f,
8232e8de18

Audit Synopsis

SeverityIdentifiedAlleviatedPartially AlleviatedAcknowledged
1100
12903
3102
0000
0000

During the audit, we filtered and validated a total of 1 findings utilizing static analysis tools as well as identified a total of 15 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 introduce potential misbehaviours of the system as well as exploits.

pie title Total Issues "Unknown" : 1 "Informational" : 12 "Minor" : 3 "Medium" : 0 "Major" : 0

The list below covers each segment of the audit in depth and links to the respective chapter of the report: