Overview
Private Pools Network is a protocol developing innovative solutions for liquidity providers, allowing them to capitalize on market volatility to achieve stable, long-term returns with enhanced security.
PrivatePools Network extends their protocol by introducing two new smart contracts: Zapper and RewardsCompounder. Both contracts serve a role of a router where users can exchange their tokens through 1Inch or 0x protocols and join a pool with exchanged tokens in one transaction.
Zapper is a smart contract which allows users to join the pool with a certain asset. Users are able to specify a pool and a list of assets to join with as well as source token and its amount. The core functions, zap1inch() and zap0x(), exchange a source token into several destination tokens using either 1Inch or 0x and then join the specified pool of the Private Pool. Upon zapping, a smart contract takes a certain fee for its service.
RewardsCompounder is a smart contract for compounding reward assets into several pool assets and joining a weighted pool. The core functions, compound1inch() and compound0x(), allow the msg.sender to specify a list of reward tokens which will be exchanged into destination tokens (using either 1Inch or 0x) and join the weighted pool with destination token.
Task
During the auditing process for this project, we checked PrivatePools Network smart contracts for various vulnerabilities. The whole procedure is divided into the following stages:
1) Standard vulnerabilities checklists, including but not limited to:
- Storage structure and data modification flow
- Access control structure, roles existing in the system
- Public interface and restrictions based on the roles system
- Denial-of-Service (DoS) attacks
- Entropy illusion (Lack of randomness)
- Order-dependency and time-dependency of operations
- Validation of function parameters, inputs validation
- Asset management, funds flow and asset conversions
- Asset Security (backdoors connected to underlying assets)
- Signatures reply and multisig schemes security
- Incorrect minting, initial supply or other conditions for assets issuance
- General code structure checks and correspondence to best practices
- 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) And other aspects which may bring risks. Our own internal security checklists, additionally verified during the testing stage.