/2024-07-benddao

Primary LanguageSolidityOtherNOASSERTION

BendDAO audit details

This is a Private audit

This audit repo and its Discord channel are accessible to certified wardens only. Participation in private audits is bound by:

  1. Code4rena's Certified Contributor Terms and Conditions
  2. Code4rena's Certified Contributor Code of Professional Conduct

All discussions regarding private audits should be considered private and confidential, unless otherwise indicated.

Automated Findings / Publicly Known Issues

The 4naly3er report can be found here.

Note for C4 wardens: Anything included in this Automated Findings / Publicly Known Issues section is considered a publicly known issue and is ineligible for awards.

  • Centralisation Risk on Contracts which has Owner or Administrator.
  • Questioning the protocol’s business model is unreasonable.

Overview

BendDAO V2 Protocol brings you composable lending and leverage. It allows anyone to borrow in an overcollateralized fashion, leverage savings on MakerDAO, leverage stake on Lido, leverage restake with EigenLayer derivatives, bringing together lending and leverage in the same protocol!

V2 Protocol has three user sides to it:

  • Lenders deposit assets to earn passive yield.
  • Borrowers can use ERC20 & NFT as collaterals to borrow assets in an overcollateralized fashion.
  • Leverage users can use NFT as collaterals to borrow assets to create leverage positions, which can be used across DeFi, NFTs, RWA, etc.

Cool Features

  • Restaking Specialized Loan

    BendDAO V2 introduces the first restaking service for NFT holders to earn passive income by Specialized Loan. This groundbreaking feature for bluechip NFTs comes with the V2 update—an exciting development in the realm of DeFi and Restaking. This Restaking Specialized Loan feature, leveraging liquid staking and restaking, is designed to revolutionize how NFT holders can capture ETH ecosystem development benefits when holding NFTs.

  • Cross Margin Lending.

  • Isolated Margin Lending.

  • Custom Lending Pools.

  • Custom Interest Rates.

  • Modularity. V2 Protocol is not just a couple of pools, it's an new architecture of smart contracts which are plug-and-play enabled.

  • Composability. Other protocols can offer leverage to their users with the help of V2 Protocol, without modifying anything in their own architecture.

Links


Scope

See scope.txt

Files in scope

File Logic Contracts Interfaces nSLOC Purpose Libraries used
/src/ACLManager.sol 1 **** 44 @openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol
/src/PoolManager.sol 1 **** 69 src/interfaces/IAddressProvider.sol
src/interfaces/IACLManager.sol
src/libraries/helpers/Constants.sol
src/libraries/helpers/Errors.sol
src/libraries/logic/StorageSlot.sol
src/libraries/types/DataTypes.sol
src/base/Base.sol
src/base/Proxy.sol
/src/PriceOracle.sol 1 **** 89 @openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol
/src/libraries/helpers/KVSortUtils.sol 1 **** 42
/src/libraries/math/MathUtils.sol 1 **** 44
/src/libraries/math/PercentageMath.sol 1 **** 22
/src/libraries/math/ShareUtils.sol 1 **** 11
/src/libraries/math/WadRayMath.sol 1 **** 57
/src/libraries/logic/BorrowLogic.sol 1 **** 73
/src/libraries/logic/ConfigureLogic.sol 1 **** 421 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol
@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol
/src/libraries/logic/FlashLoanLogic.sol 1 **** 88
/src/libraries/logic/GenericLogic.sol 1 **** 264 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
/src/libraries/logic/InterestLogic.sol 1 **** 179 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol
/src/libraries/logic/IsolateLogic.sol 1 **** 335
/src/libraries/logic/LiquidationLogic.sol 1 **** 308 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
/src/libraries/logic/PoolLogic.sol 1 **** 73 src/interfaces/IDelegateRegistryV2.sol
/src/libraries/logic/StorageSlot.sol 1 **** 11
/src/libraries/logic/SupplyLogic.sol 1 **** 151
/src/libraries/logic/ValidateLogic.sol 1 **** 437 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol
/src/libraries/logic/VaultLogic.sol 1 **** 427 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol
@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol
/src/libraries/logic/YieldLogic.sol 1 **** 99
/src/modules/BVault.sol 1 **** 116
/src/modules/Configurator.sol 1 **** 162 src/base/BaseModule.sol
src/libraries/helpers/Constants.sol
src/libraries/logic/StorageSlot.sol
src/libraries/logic/ConfigureLogic.sol
src/libraries/logic/PoolLogic.sol
/src/modules/CrossLending.sol 1 **** 57
/src/modules/CrossLiquidation.sol 1 **** 64
/src/modules/FlashLoan.sol 1 **** 38
/src/modules/IsolateLending.sol 1 **** 58
/src/modules/IsolateLiquidation.sol 1 **** 72
/src/modules/Yield.sol 1 **** 58 src/interfaces/IYield.sol
/src/yield/YieldAccount.sol 1 **** 44 @openzeppelin/contracts/token/ERC20/IERC20.sol
@openzeppelin/contracts/token/ERC721/IERC721.sol
@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
@openzeppelin/contracts/utils/Address.sol
@openzeppelin/contracts/proxy/utils/Initializable.sol
src/libraries/helpers/Errors.sol
src/interfaces/IYieldRegistry.sol
src/interfaces/IYieldAccount.sol
/src/yield/YieldRegistry.sol 1 **** 67 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
@openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol
@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol
@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol
src/interfaces/IAddressProvider.sol
src/interfaces/IACLManager.sol
src/interfaces/IYieldRegistry.sol
src/libraries/helpers/Constants.sol
src/libraries/helpers/Errors.sol
/src/yield/YieldStakingBase.sol 1 **** 140 @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
@openzeppelin/contracts/utils/math/Math.sol
@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol
@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol
src/interfaces/IAddressProvider.sol
src/interfaces/IACLManager.sol
src/interfaces/IPoolManager.sol
src/interfaces/IYield.sol
src/interfaces/IPriceOracleGetter.sol
src/interfaces/IYieldAccount.sol
src/interfaces/IYieldRegistry.sol
src/libraries/helpers/Constants.sol
src/libraries/helpers/Errors.sol
src/libraries/math/PercentageMath.sol
src/libraries/math/WadRayMath.sol
src/libraries/math/MathUtils.sol
src/libraries/math/ShareUtils.sol
/src/yield/etherfi/YieldEthStakingEtherfi.sol 1 **** 102 @openzeppelin/contracts/utils/math/Math.sol
src/interfaces/IPriceOracleGetter.sol
src/interfaces/IYieldAccount.sol
src/interfaces/IYieldRegistry.sol
src/interfaces/IWETH.sol
src/libraries/helpers/Constants.sol
src/libraries/helpers/Errors.sol
/src/yield/lido/YieldEthStakingLido.sol 1 **** 102 @openzeppelin/contracts/utils/math/Math.sol
src/interfaces/IPriceOracleGetter.sol
src/interfaces/IYieldAccount.sol
src/interfaces/IYieldRegistry.sol
src/interfaces/IWETH.sol
src/interfaces/IStETH.sol
src/interfaces/IUnstETH.sol
src/libraries/helpers/Constants.sol
src/libraries/helpers/Errors.sol
/src/yield/sdai/YieldSavingsDai.sol 1 **** 100 @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
@openzeppelin/contracts/utils/math/Math.sol
src/interfaces/IPriceOracleGetter.sol
src/interfaces/IYieldAccount.sol
src/interfaces/IYieldRegistry.sol
src/libraries/helpers/Constants.sol
src/libraries/helpers/Errors.sol
/src/base/Base.sol 1 **** 48 @openzeppelin/contracts/security/Pausable.sol
@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol
src/libraries/helpers/Constants.sol
src/libraries/helpers/Events.sol
src/libraries/helpers/Errors.sol
src/base/Storage.sol
src/base/Proxy.sol
/src/base/BaseModule.sol 1 **** 21
/src/base/Proxy.sol 1 **** 58
/src/base/Storage.sol 1 **** 17 src/libraries/logic/StorageSlot.sol
src/libraries/types/DataTypes.sol
/src/libraries/types/DataTypes.sol 1 **** 96 @openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
/src/libraries/types/InputTypes.sol 1 **** 167
/src/libraries/types/ResultTypes.sol 1 **** 24
Totals 42 **** 4855

Files out of scope

In addition to beleow, any files not in the list above is Out Of Scope.

See out_of_scope.txt

File
./config/ConfigLib.sol
./config/Configured.sol
./script/DeployBase.s.sol
./script/DeployPoolFull.s.sol
./script/DeployPriceAdapter.s.sol
./script/DeployYieldMock.s.sol
./script/DeployYieldStaking.s.sol
./script/InitConfigPool.s.sol
./script/InitConfigYield.s.sol
./script/InstallModule.s.sol
./script/QueryBase.s.sol
./script/QueryPool.s.sol
./script/UpgradeContract.s.sol
./src/AddressProvider.sol
./src/interfaces/IACLManager.sol
./src/interfaces/IAddressProvider.sol
./src/interfaces/IBendNFTOracle.sol
./src/interfaces/IDefaultInterestRateModel.sol
./src/interfaces/IDelegateRegistryV2.sol
./src/interfaces/IFlashLoanReceiver.sol
./src/interfaces/IInterestRateModel.sol
./src/interfaces/IPoolLens.sol
./src/interfaces/IPoolManager.sol
./src/interfaces/IPriceOracle.sol
./src/interfaces/IPriceOracleGetter.sol
./src/interfaces/IStETH.sol
./src/interfaces/IUnstETH.sol
./src/interfaces/IWETH.sol
./src/interfaces/IYield.sol
./src/interfaces/IYieldAccount.sol
./src/interfaces/IYieldRegistry.sol
./src/irm/DefaultInterestRateModel.sol
./src/libraries/helpers/Constants.sol
./src/libraries/helpers/Errors.sol
./src/libraries/helpers/Events.sol
./src/libraries/logic/QueryLogic.sol
./src/modules/Installer.sol
./src/modules/PoolLens.sol
./src/oracles/IDAIPot.sol
./src/oracles/SDAIPriceAdapter.sol
./src/yield/etherfi/ILiquidityPool.sol
./src/yield/etherfi/IWithdrawRequestNFT.sol
./src/yield/etherfi/IeETH.sol
./src/yield/sdai/ISavingsDai.sol
./test/helpers/TestUser.sol
./test/integration/TestACLManager.t.sol
./test/integration/TestDelegateERC721.t.sol
./test/integration/TestIntCollectFeeToTreasury.t.sol
./test/integration/TestIntCrossBorrowERC20.t.sol
./test/integration/TestIntCrossLiquidateERC20.t.sol
./test/integration/TestIntCrossLiquidateERC721.t.sol
./test/integration/TestIntCrossNativeToken.t.sol
./test/integration/TestIntCrossOnBehalf.t.sol
./test/integration/TestIntCrossRepayERC20.t.sol
./test/integration/TestIntDepositERC20.t.sol
./test/integration/TestIntDepositERC721.t.sol
./test/integration/TestIntFlashLoanERC20.t.sol
./test/integration/TestIntFlashLoanERC721.t.sol
./test/integration/TestIntIsolateAuction.t.sol
./test/integration/TestIntIsolateBorrow.t.sol
./test/integration/TestIntIsolateLiquidate.t.sol
./test/integration/TestIntIsolateOnBehalf.t.sol
./test/integration/TestIntIsolateRedeem.t.sol
./test/integration/TestIntIsolateRepay.t.sol
./test/integration/TestIntSetERC721SupplyMode.t.sol
./test/integration/TestIntWithdrawERC20.t.sol
./test/integration/TestIntWithdrawERC721.t.sol
./test/integration/TestIntYieldBorrowERC20.t.sol
./test/integration/TestIntYieldRepayERC20.t.sol
./test/integration/TestPoolLens.t.sol
./test/integration/TestPoolManagerConfig.t.sol
./test/integration/TestPriceOracle.t.sol
./test/mocks/MockBendNFTOracle.sol
./test/mocks/MockChainlinkAggregator.sol
./test/mocks/MockDAIPot.sol
./test/mocks/MockDelegateRegistryV2.sol
./test/mocks/MockERC20.sol
./test/mocks/MockERC721.sol
./test/mocks/MockEtherfiLiquidityPool.sol
./test/mocks/MockEtherfiWithdrawRequestNFT.sol
./test/mocks/MockFaucet.sol
./test/mocks/MockFlashLoanReceiver.sol
./test/mocks/MockSDAI.sol
./test/mocks/MockStETH.sol
./test/mocks/MockUnstETH.sol
./test/mocks/MockWETH.sol
./test/mocks/MockeETH.sol
./test/setup/TestWithBaseAction.sol
./test/setup/TestWithCrossAction.sol
./test/setup/TestWithData.sol
./test/setup/TestWithIsolateAction.sol
./test/setup/TestWithPrepare.sol
./test/setup/TestWithSetup.sol
./test/setup/TestWithUtils.sol
./test/unit/TestPercentageMath.t.sol
./test/unit/TestUnitKVSortUtils.t.sol
./test/unit/TestWadRayMath.t.sol
./test/yield/YieldAccount.t.sol
./test/yield/YieldEthStakingEtherfi.t.sol
./test/yield/YieldEthStakingLido.t.sol
./test/yield/YieldSavingsDai.t.sol
Totals: 105

Scoping Q & A

General questions

Question Answer
ERC20 used by the protocol Any (all possible ERC20s)
Test coverage Lines: 83.12% - Functions: 72.90%
ERC721 used by the protocol Any
ERC777 used by the protocol None
ERC1155 used by the protocol None
Chains the protocol will be deployed on Ethereum, Arbitrum, Optimism, Polygon

ERC20 token behaviors in scope

Question Answer
Missing return values In scope
Fee on transfer In scope
Balance changes outside of transfers In scope
Upgradeability Out of scope
Flash minting Out of scope
Pausability In scope
Approval race protections In scope
Revert on approval to zero address In scope
Revert on zero value approvals In scope
Revert on zero value transfers In scope
Revert on transfer to the zero address In scope
Revert on large approvals and/or transfers In scope
Doesn't revert on failure In scope
Multiple token addresses In scope
Low decimals ( < 6) In scope
High decimals ( > 18) In scope
Blocklists In scope

External integrations (e.g., Uniswap) behavior in scope:

Question Answer
Enabling/disabling fees (e.g. Blur disables/enables fees) Yes
Pausability (e.g. Uniswap pool gets paused) Yes
Upgradeability (e.g. Uniswap gets upgraded) Yes

EIP compliance checklist

N/A

Additional context

Main invariants

N/A

Attack ideas (where to focus for bugs)

  1. Index Overflow Attacks: Interest Rate, e.g. SupplyIndex/BorrowIndex;

  2. Multiple Services State Management: Lending & Staking for same NFT; Staking & ReStaking for the same NFT; Cross & Isolated & Staking the for same account;

  3. State Manipulation: Oracle Price; Vault’s Token Balance, e.g. directly sending ETH/ERC20/ERC721 to PoolManager contract;

  4. Missing Permission checks, e.g. Token’s Ownership, Contract’s Admin;

All trusted roles in the protocol

N/A

Describe any novel or unique curve logic or mathematical models implemented in the contracts:

N/A

Running tests

git clone https://github.com/code-423n4/2024-07-benddao.git
git submodule update --init --recursive
yarn
foundryup
forge test

To run code coverage

forge coverage
| File                                         | % Lines            | % Statements       | % Branches         | % Funcs          |
|----------------------------------------------|--------------------|--------------------|--------------------|------------------|
| config/ConfigLib.sol                         | 0.00% (0/15)       | 0.00% (0/29)       | 100.00% (0/0)      | 0.00% (0/13)     |
| config/Configured.sol                        | 0.00% (0/8)        | 0.00% (0/12)       | 0.00% (0/2)        | 0.00% (0/4)      |
| script/DeployBase.s.sol                      | 0.00% (0/8)        | 0.00% (0/8)        | 100.00% (0/0)      | 0.00% (0/2)      |
| script/DeployPoolFull.s.sol                  | 0.00% (0/75)       | 0.00% (0/107)      | 0.00% (0/18)       | 0.00% (0/6)      |
| script/DeployPriceAdapter.s.sol              | 0.00% (0/16)       | 0.00% (0/20)       | 0.00% (0/8)        | 0.00% (0/2)      |
| script/DeployYieldMock.s.sol                 | 0.00% (0/12)       | 0.00% (0/18)       | 100.00% (0/0)      | 0.00% (0/4)      |
| script/DeployYieldStaking.s.sol              | 0.00% (0/56)       | 0.00% (0/70)       | 0.00% (0/16)       | 0.00% (0/5)      |
| script/InitConfigPool.s.sol                  | 0.00% (0/103)      | 0.00% (0/107)      | 0.00% (0/4)        | 0.00% (0/7)      |
| script/InitConfigYield.s.sol                 | 0.00% (0/53)       | 0.00% (0/54)       | 0.00% (0/4)        | 0.00% (0/5)      |
| script/InstallModule.s.sol                   | 0.00% (0/32)       | 0.00% (0/46)       | 0.00% (0/2)        | 0.00% (0/3)      |
| script/QueryBase.s.sol                       | 0.00% (0/3)        | 0.00% (0/3)        | 100.00% (0/0)      | 0.00% (0/2)      |
| script/QueryPool.s.sol                       | 0.00% (0/6)        | 0.00% (0/7)        | 0.00% (0/2)        | 0.00% (0/1)      |
| script/UpgradeContract.s.sol                 | 0.00% (0/24)       | 0.00% (0/30)       | 0.00% (0/6)        | 0.00% (0/5)      |
| src/ACLManager.sol                           | 91.67% (11/12)     | 93.33% (14/15)     | 100.00% (2/2)      | 90.91% (10/11)   |
| src/AddressProvider.sol                      | 74.36% (29/39)     | 73.77% (45/61)     | 100.00% (0/0)      | 75.00% (18/24)   |
| src/PoolManager.sol                          | 28.00% (7/25)      | 23.33% (7/30)      | 50.00% (6/12)      | 25.00% (2/8)     |
| src/PriceOracle.sol                          | 95.12% (39/41)     | 96.08% (49/51)     | 100.00% (28/28)    | 90.91% (10/11)   |
| src/base/Base.sol                            | 64.71% (11/17)     | 57.14% (12/21)     | 71.43% (10/14)     | 28.57% (2/7)     |
| src/base/BaseModule.sol                      | 20.00% (1/5)       | 20.00% (1/5)       | 100.00% (0/0)      | 33.33% (1/3)     |
| src/base/Proxy.sol                           | 42.86% (3/7)       | 37.50% (3/8)       | 16.67% (1/6)       | 33.33% (1/3)     |
| src/base/Storage.sol                         | 0.00% (0/1)        | 0.00% (0/2)        | 100.00% (0/0)      | 0.00% (0/1)      |
| src/irm/DefaultInterestRateModel.sol         | 43.75% (7/16)      | 42.11% (8/19)      | 100.00% (2/2)      | 16.67% (1/6)     |
| src/libraries/helpers/KVSortUtils.sol        | 100.00% (21/21)    | 100.00% (30/30)    | 100.00% (10/10)    | 100.00% (2/2)    |
| src/libraries/logic/BorrowLogic.sol          | 97.22% (35/36)     | 97.73% (43/44)     | 50.00% (2/4)       | 100.00% (2/2)    |
| src/libraries/logic/ConfigureLogic.sol       | 98.77% (322/326)   | 98.66% (369/374)   | 97.89% (186/190)   | 100.00% (33/33)  |
| src/libraries/logic/FlashLoanLogic.sol       | 97.14% (34/35)     | 97.73% (43/44)     | 77.78% (14/18)     | 100.00% (2/2)    |
| src/libraries/logic/GenericLogic.sol         | 98.36% (120/122)   | 98.55% (136/138)   | 95.00% (38/40)     | 100.00% (13/13)  |
| src/libraries/logic/InterestLogic.sol        | 98.51% (66/67)     | 98.70% (76/77)     | 100.00% (22/22)    | 100.00% (9/9)    |
| src/libraries/logic/IsolateLogic.sol         | 98.76% (159/161)   | 98.86% (174/176)   | 95.24% (40/42)     | 100.00% (5/5)    |
| src/libraries/logic/LiquidationLogic.sol     | 94.74% (108/114)   | 95.24% (120/126)   | 81.82% (18/22)     | 100.00% (10/10)  |
| src/libraries/logic/PoolLogic.sol            | 97.50% (39/40)     | 98.04% (50/51)     | 100.00% (18/18)    | 100.00% (5/5)    |
| src/libraries/logic/QueryLogic.sol           | 92.77% (231/249)   | 92.26% (286/310)   | 83.33% (35/42)     | 82.14% (23/28)   |
| src/libraries/logic/StorageSlot.sol          | 100.00% (2/2)      | 100.00% (2/2)      | 100.00% (0/0)      | 100.00% (1/1)    |
| src/libraries/logic/SupplyLogic.sol          | 94.87% (74/78)     | 95.56% (86/90)     | 85.71% (24/28)     | 100.00% (5/5)    |
| src/libraries/logic/ValidateLogic.sol        | 100.00% (245/245)  | 100.00% (287/287)  | 100.00% (288/288)  | 100.00% (31/31)  |
| src/libraries/logic/VaultLogic.sol           | 90.83% (218/240)   | 90.57% (288/318)   | 88.89% (80/90)     | 90.00% (63/70)   |
| src/libraries/logic/YieldLogic.sol           | 92.59% (50/54)     | 92.45% (49/53)     | 85.00% (17/20)     | 100.00% (3/3)    |
| src/libraries/math/MathUtils.sol             | 100.00% (21/21)    | 100.00% (35/35)    | 100.00% (2/2)      | 100.00% (4/4)    |
| src/libraries/math/PercentageMath.sol        | 100.00% (4/4)      | 100.00% (2/2)      | 100.00% (2/2)      | 100.00% (2/2)    |
| src/libraries/math/ShareUtils.sol            | 100.00% (2/2)      | 100.00% (4/4)      | 100.00% (0/0)      | 100.00% (2/2)    |
| src/libraries/math/WadRayMath.sol            | 100.00% (13/13)    | 100.00% (7/7)      | 100.00% (6/6)      | 100.00% (6/6)    |
| src/modules/BVault.sol                       | 100.00% (29/29)    | 100.00% (38/38)    | 100.00% (8/8)      | 88.89% (8/9)     |
| src/modules/Configurator.sol                 | 100.00% (69/69)    | 100.00% (104/104)  | 100.00% (2/2)      | 97.06% (33/34)   |
| src/modules/CrossLending.sol                 | 100.00% (16/16)    | 100.00% (20/20)    | 100.00% (8/8)      | 66.67% (2/3)     |
| src/modules/CrossLiquidation.sol             | 65.00% (13/20)     | 69.23% (18/26)     | 100.00% (12/12)    | 66.67% (2/3)     |
| src/modules/FlashLoan.sol                    | 100.00% (4/4)      | 100.00% (6/6)      | 100.00% (0/0)      | 66.67% (2/3)     |
| src/modules/Installer.sol                    | 100.00% (13/13)    | 100.00% (20/20)    | 100.00% (4/4)      | 66.67% (2/3)     |
| src/modules/IsolateLending.sol               | 68.75% (11/16)     | 75.00% (15/20)     | 100.00% (8/8)      | 66.67% (2/3)     |
| src/modules/IsolateLiquidation.sol           | 71.43% (15/21)     | 77.78% (21/27)     | 100.00% (12/12)    | 75.00% (3/4)     |
| src/modules/PoolLens.sol                     | 88.00% (44/50)     | 85.71% (72/84)     | 100.00% (0/0)      | 78.12% (25/32)   |
| src/modules/Yield.sol                        | 100.00% (8/8)      | 100.00% (13/13)    | 100.00% (0/0)      | 83.33% (5/6)     |
| src/oracles/SDAIPriceAdapter.sol             | 24.00% (6/25)      | 27.50% (11/40)     | 100.00% (2/2)      | 16.67% (2/12)    |
| src/yield/YieldAccount.sol                   | 100.00% (12/12)    | 100.00% (13/13)    | 100.00% (6/6)      | 100.00% (10/10)  |
| src/yield/YieldRegistry.sol                  | 78.26% (18/23)     | 77.78% (21/27)     | 100.00% (12/12)    | 50.00% (5/10)    |
| src/yield/YieldStakingBase.sol               | 79.90% (167/209)   | 80.08% (197/246)   | 80.00% (72/90)     | 57.14% (28/49)   |
| src/yield/etherfi/YieldEthStakingEtherfi.sol | 82.61% (38/46)     | 84.21% (48/57)     | 77.78% (14/18)     | 66.67% (8/12)    |
| src/yield/lido/YieldEthStakingLido.sol       | 84.31% (43/51)     | 86.15% (56/65)     | 80.00% (16/20)     | 66.67% (8/12)    |
| src/yield/sdai/YieldSavingsDai.sol           | 86.96% (40/46)     | 86.89% (53/61)     | 85.00% (17/20)     | 71.43% (10/14)   |
| test/helpers/TestUser.sol                    | 48.53% (33/68)     | 43.21% (35/81)     | 66.67% (8/12)      | 72.41% (21/29)   |
| test/mocks/MockBendNFTOracle.sol             | 100.00% (2/2)      | 100.00% (2/2)      | 100.00% (0/0)      | 100.00% (2/2)    |
| test/mocks/MockChainlinkAggregator.sol       | 29.41% (5/17)      | 29.41% (5/17)      | 100.00% (0/0)      | 23.08% (3/13)    |
| test/mocks/MockDAIPot.sol                    | 33.33% (1/3)       | 33.33% (1/3)       | 100.00% (0/0)      | 33.33% (1/3)     |
| test/mocks/MockDelegateRegistryV2.sol        | 92.86% (13/14)     | 88.89% (16/18)     | 100.00% (2/2)      | 75.00% (3/4)     |
| test/mocks/MockERC20.sol                     | 75.00% (3/4)       | 75.00% (3/4)       | 100.00% (2/2)      | 66.67% (2/3)     |
| test/mocks/MockERC721.sol                    | 45.45% (5/11)      | 53.85% (7/13)      | 100.00% (6/6)      | 20.00% (1/5)     |
| test/mocks/MockEtherfiLiquidityPool.sol      | 72.73% (16/22)     | 72.00% (18/25)     | 80.00% (8/10)      | 62.50% (5/8)     |
| test/mocks/MockEtherfiWithdrawRequestNFT.sol | 90.48% (19/21)     | 91.30% (21/23)     | 100.00% (6/6)      | 71.43% (5/7)     |
| test/mocks/MockFaucet.sol                    | 67.39% (31/46)     | 59.38% (38/64)     | 85.71% (12/14)     | 70.00% (7/10)    |
| test/mocks/MockFlashLoanReceiver.sol         | 100.00% (16/16)    | 100.00% (20/20)    | 100.00% (0/0)      | 100.00% (2/2)    |
| test/mocks/MockSDAI.sol                      | 52.38% (11/21)     | 50.00% (12/24)     | 100.00% (0/0)      | 50.00% (5/10)    |
| test/mocks/MockStETH.sol                     | 87.50% (14/16)     | 88.24% (15/17)     | 100.00% (10/10)    | 71.43% (5/7)     |
| test/mocks/MockUnstETH.sol                   | 90.91% (20/22)     | 92.59% (25/27)     | 100.00% (6/6)      | 80.00% (4/5)     |
| test/mocks/MockWETH.sol                      | 81.82% (18/22)     | 84.00% (21/25)     | 80.00% (8/10)      | 71.43% (5/7)     |
| test/mocks/MockeETH.sol                      | 66.67% (6/9)       | 60.00% (6/10)      | 66.67% (4/6)       | 66.67% (4/6)     |
| test/setup/TestWithBaseAction.sol            | 98.91% (271/274)   | 83.79% (274/327)   | 98.67% (148/150)   | 96.77% (30/31)   |
| test/setup/TestWithCrossAction.sol           | 94.71% (322/340)   | 81.84% (329/402)   | 92.96% (132/142)   | 100.00% (24/24)  |
| test/setup/TestWithData.sol                  | 97.25% (106/109)   | 97.60% (122/125)   | 100.00% (10/10)    | 38.46% (5/13)    |
| test/setup/TestWithIsolateAction.sol         | 96.45% (163/169)   | 80.51% (157/195)   | 91.43% (64/70)     | 100.00% (13/13)  |
| test/setup/TestWithPrepare.sol               | 100.00% (21/21)    | 100.00% (24/24)    | 100.00% (0/0)      | 100.00% (11/11)  |
| test/setup/TestWithSetup.sol                 | 100.00% (301/301)  | 100.00% (340/340)  | 100.00% (0/0)      | 100.00% (10/10)  |
| Total                                        | 83.12% (3815/4590) | 80.14% (4443/5544) | 89.20% (1470/1648) | 72.90% (589/808) |

To run gas benchmarks:

npm run gas-report

Miscellaneous

Employees of BendDAO and employees' family members are ineligible to participate in this audit.