# Protocol Due Diligence: [ Notional Lending ]
## Overview + Links
- **[Site](https://notional.finance/)**
- **[Team](https://notional.finance/about/)**
- **[Gov](https://notional.finance/governance)**
- **[Docs](https://docs.notional.finance/notional-v2/)**
- **[Open Zeppelin protocol audit - December 2020](https://blog.openzeppelin.com/notional-audit/)**
- **[ABDK protocol audit - September 2021](https://github.com/notional-finance/contracts-v2/blob/master/audits/ABDK%20-%20Notional%20V2%2C%20Sept%201%202021.pdf)**
- **[Code4rena protcol report - October 2021](https://code4rena.com/reports/2021-08-notional/)**
- **[ABDK protocol audit - November 2021](https://github.com/notional-finance/contracts-v2/blob/master/audits/ABDK%20-%20Notional%20V2%20Fixes%2C%20Nov%201%202021.pdf)**
- **[Certora final report - November 2021](https://github.com/notional-finance/contracts-v2/blob/master/audits/Certora%20-%20Formal%20Verfication%20Report%2C%20Nov%201%202021.pdf)**
- **[Open Zeppelin governance audit - November 2021](https://blog.openzeppelin.com/notional-v2-audit-governance-contracts/)**
## Rug-ability
**Multi-sig:**
Gnosis multi-sig owned by Teddy Woodward and Jeff Wu, the main personalities related to the protocol, acting as CEO and CTO
**Number of Multi-sig signers / threshold:**
3/ 5, 2 internal to the protocol (Teddy Woodward and Jeff Wu) and 3 investors (Regan Bozman of Lattice Capital, Richard Chen of 1Confirmation, and Getty Hill from GFX Labs)
**Upgradable Contracts:**
Yes, UUPS Proxy implemented redirecting the to implementations of the contracts containing:
- VIEWS
- ACCOUNT ACTIONS
- TRADE ACTIONS
- GOVERNANCE ACTIONS
- ERC1155 ACTIONS
- INITIALIZE MARKETS
- LIQUIDATE MARKETS
- LIQUIDATE FCASH
- NTOKEN ACTIONS
- NTOKEN REDEMPTIONS
**Decentralization:**
Governance is done via the NOTE token (ERC20), used for proposing upgrades and voting proposals. Proposals can be canceled by the guardian for any reason, the guardian is intended to disappear by abdication.
There is no timelock between upgrades.
## Misc Risks
- The strategy is ever-winning as it's a fixed rate APY but incurs in losses if the positions are closed before maturity (needs to pay (i) the cost of borrowing which may be higher than the APY as IRs may have moved and (ii) the Notional fee: 0.3% APY), therefore, position in the withdrawal queue is critical to avoid closing active positions unnecessarily
### Audit Reports / Key Findings
- **[ABDK's final audit](https://github.com/notional-finance/contracts-v2/blob/master/audits/ABDK%20-%20Notional%20V2%20Fixes%2C%20Nov%201%202021.pdf)** found 92 issues, 88 Minor, 1 Moderate and 3 Major
- **[Certora's final report](https://github.com/notional-finance/contracts-v2/blob/master/audits/Certora%20-%20Formal%20Verfication%20Report%2C%20Nov%201%202021.pdf)** identifies 1 high severity issue, 6 medium severity issues and 6 low severity issues. Additionally they make 13 optimization recommendations
- **[Code4rena's findings & analysis report](https://code4rena.com/reports/2021-08-notional/)** describes 38 unique vulnerabilities, 10 with HIGH severity, 7 with MEDIUM severity and 21 with LOW severity. They also found 13 non-critical recommendations and 8 gas optimizations
The **Notional CTO** confirms that all Major/ High severity issues have been corrected and incuded in the latest codebase
### Anything else
The protocol represents a great add for yVaults as it adds a constant APY to a % of the yVault's funds, reducing the exposure to extreme volatilities of the crypto markets
- The strategy implements a boolean toggle to explicitly realize losses instead of liquidating positions as soons as the vaults asks for debt payment
- If the strategy's position is close to maturity, there is a harvest with increased funds for the strategy (higher debtRatio or more deposits) and there is a minTimeToMaturity for investing, the current position is rolled into the next market and thus profits are locked for another 3M at least. So ideally profit-taking harvests should happen right after position maturities (late Decemeber, late March, late June and late September)
# Path to Prod
## Strategy Details
- **Description:** Allocate a percentage of the vault's assets to a fixed rate lending market to obtain a fixed APY
- **Strategy current APR:** 2%+ for crypto, 10%+ for stables
- **Does Strategy delegate assets?:** TBC
- **Target Prod Vault:** WETH, WBTC, DAI and USDC
- **BaseStrategy Version #:** 0.4.3
- **Target Prod Vault Version #:** 0.4.3
## Testing Plan
### Ape.tax
- **Will Ape.tax be used?:**
- **Will Ape.tax vault be same version # as prod vault?:**
- **What conditions are needed to graduate? (e.g. number of harvest cycles, min funds, etc):**
## Prod Deployment Plan
- **Suggested position in withdrawQueue?:** Last, the key for this strategy is to leave positions until maturity as closing positions before maturity incurs in a fee
- **Does strategy have any deposit/withdraw fees?:** Yes, Notional keeps a 0.3% APY per position, plus exiting a position before maturity adds the cost of borrowing
- **Suggested debtRatio?:** 10-40% depending on the vault's APY
- **Suggested max debtRatio to scale to?:** 50%
## Emergency Plan
- **Shutdown Plan:**
- **Things to know:**
- **Scripts / steps needed:**
- **Is it safe to...**
- call EmergencyShutdown
- remove from withdrawQueue
- call revoke and then harvest