This is a focused review of the new YBLendingOracleLL.vy and YBLendingOracleLLFactory.vy contracts, and of YBLendingOracleLLUSD.vy, which was added in Version 2. YBLendingOracleLL prices LT shares for external lending integrators with an exponential moving average (EMA) that smooths the underlying fundamental value to resist same-block manipulation. Yield Basis addressed the reported and self-identified issues in Version 2, Version 3, Version 4 and Version 5, and also changed how the oracle prices the AMM position when its safe-debt limits stop arbitrage and when the AMM cannot be traded. In Version 4, YBLendingOracle and YBLendingOracleLL additionally price the cryptopool at its current A when an A ramp has changed it since the pool’s last trade, see The oracles price the pool at a stale A and D during an A ramp. In Version 5, both oracles also price a killed AMM at what LT.emergency_withdraw() pays, see Price ignores killed markets. We reviewed these changes as part of this report.
It is important to note that security audits are time-boxed and cannot uncover all vulnerabilities. They complement but don’t replace other vital measures to secure a project.