Omniscia Myso Finance Audit

Lending Protocol Security Audit

Audit Revisions

Commit HashDateRevision Hash
c740f7c6b5May 21st 20230340c7bb41
37cf23668bMay 22nd 20235be8405c19
37cf23668bMay 22nd 202307edb83987

Audit Overview

We were tasked with performing an audit of the Myso Finance ecosystem and in particular their zero-liquidation loan implementations that function in a peer-to-peer as well as peer-to-pool model.

Over the course of the audit, we identified multiple vulnerabilities that arise from insufficient coverage of edge cases which, while potentially difficult to manifest, could result in significant misbehaviours of the protocol.

As the project explores a novel lending and borrowing system, we analyzed it with documentational material provided to us by Myso Finance as well as our expertise in lending protocols.

We evaluated the adaptation of the Alpha Homora V2 formula in UniV2Chainlink and identified that it behaves as expected under multiple "abnormal" trading pairs (such as USDC / USDT pairs with low decimals) despite its reduced arithmetic accuracy.

In regard to the compartment modules, we evaluated that all compartments behave according to their specifications as well as the protocols they integrate with.

To this end, we identified that while the CurveLPStakingCompartment integrates properly with all versions of Curve Finance liquidity gauges (V1, V2, V3, V4, and V5 at the time of this audit), it contained a flaw when interacting with multi-token reward gauges.

We advise the Myso 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 Myso Finance team iterated through all findings within the report and provided us with a revised commit hash to evaluate all exhibits on.

We evaluated all alleviations performed by Myso Finance and have identified that all exhibits of non-informational nature have been adequately alleviated.

Of the informational / inconsequential exhibits within the report, we have identified that the following were either acknowledged or partially alleviated: ESR-01C, LVI-01S, LVI-03C, LPF-01S, LPI-02C, FPL-03C

Post-Audit Conclusion (37cf23668b)

The Myso Finance team proceeded to acknowledge exhibit ESR-01C and alleviate all the remaining exhibits that had been improperly alleviated in the previous commit correctly.

The latest changes did not introduce any vulnerabilities to the Myso Finance system and were performed with the latest security standards and style guidelines in mind.

Contracts Assessed

Files in ScopeRepositoryCommit(s)
AddressRegistry.sol (ARY)v27755e69224,
c740f7c6b5,
37cf23668b
AaveStakingCompartment.sol (ASC)v27755e69224,
c740f7c6b5,
37cf23668b
BaseCompartment.sol (BCT)v27755e69224,
c740f7c6b5,
37cf23668b
BorrowerGateway.sol (BGY)v27755e69224,
c740f7c6b5,
37cf23668b
BalancerV2Looping.sol (BVL)v27755e69224,
c740f7c6b5,
37cf23668b
Constants.sol (CST)v27755e69224,
c740f7c6b5,
37cf23668b
ChainlinkBasic.sol (CBC)v27755e69224,
c740f7c6b5,
37cf23668b
ChainlinkBasicWithWbtc.sol (CBW)v27755e69224,
c740f7c6b5,
37cf23668b
CurveLPStakingCompartment.sol (CLP)v27755e69224,
c740f7c6b5,
37cf23668b
DataTypesPeerToPeer.sol (DTP)v27755e69224,
c740f7c6b5,
37cf23668b
DataTypesPeerToPool.sol (DTT)v27755e69224,
c740f7c6b5,
37cf23668b
Errors.sol (ESR)v27755e69224,
c740f7c6b5,
37cf23668b
FundingPool.sol (FPL)v27755e69224,
c740f7c6b5,
37cf23668b
GLPStakingCompartment.sol (GLP)v27755e69224,
c740f7c6b5,
37cf23668b
LenderVaultImpl.sol (LVI)v27755e69224,
c740f7c6b5,
37cf23668b
LoanProposalImpl.sol (LPI)v27755e69224,
c740f7c6b5,
37cf23668b
LenderVaultFactory.sol (LVF)v27755e69224,
c740f7c6b5,
37cf23668b
LoanProposalFactory.sol (LPF)v27755e69224,
c740f7c6b5,
37cf23668b
Ownable.sol (OEL)v27755e69224,
c740f7c6b5,
37cf23668b
OlympusOracle.sol (OOE)v27755e69224,
c740f7c6b5,
37cf23668b
QuoteHandler.sol (QHR)v27755e69224,
c740f7c6b5,
37cf23668b
UniV3Looping.sol (UVL)v27755e69224,
c740f7c6b5,
37cf23668b
UniV2Chainlink.sol (UVC)v27755e69224,
c740f7c6b5,
37cf23668b
VoteCompartment.sol (VCT)v27755e69224,
c740f7c6b5,
37cf23668b

Audit Synopsis

SeverityIdentifiedAlleviatedPartially AlleviatedAcknowledged
2200
403901
171700
7700
3300

During the audit, we filtered and validated a total of 12 findings utilizing static analysis tools as well as identified a total of 57 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: