Overview
At Blaize, we take the security of blockchain projects seriously, and our recent collaboration with FortiFi stands as a testament to our commitment. In this case study, we will delve into the comprehensive security audit we conducted for the FortiFi protocol, highlighting our rigorous process and the outcomes achieved.
FortiFi is a vault platform landscape with single-sided staking for assets like BTC.b, USDC, and more. The project utilizes unique “sub-strategies” to automatically diversify yields, optimizing profit. Users stake, and assets flow into these sub-strategies in one click, with performance fees only being applied to profits earned by the vault.
Task
During our audit, we scrutinized the smart contract for various vulnerabilities in several stages:
1) Standard vulnerabilities checklists, including but not limited to:
- Reentrancy
- Gas limit and loops
- Transaction-ordering dependence
- Unchecked external calls
- Denial-of-Service (DoS) attacks
- Malicious libraries and injections
- Storage issues (uninitialized, unused, etc) and incorrect local variables usage
- Upgradeability issues
and others potential Solidity vulnerabilities and attack vectors;
2) Business logic decompositions to find loopholes, deadlocks, hidden backdoors, incorrect math and calculations, malicious code injections and other flow related issues;
3) Review of dependencies, integrations and 3rd parties, verified with appropriate integration tests;
4) Our own internal security checklists, additionally verified during the testing stage. The team had the first focus on verifying the correctness of oracles integration and the price feed mechanics for the vault systems – to check possibilities of front-running and price manipulations. Also, a lot of effort was put into checking the correctness of FortiFi strategies interacting with 3rd-party protocols.