# Aderyn Analysis Report
This report was generated by [Aderyn](https://github.com/Cyfrin/aderyn), a static analysis tool built by [Cyfrin](https://cyfrin.io), a blockchain security company. This report is not a substitute for manual audit or security review. It should not be relied upon for any purpose other than to assist in the identification of potential security vulnerabilities.
# Table of Contents
- [Summary](#summary)
- [Files Summary](#files-summary)
- [Files Details](#files-details)
- [Issue Summary](#issue-summary)
- [High Issues](#high-issues)
- [H-1: Incorrect use of caret operator](#h-1-incorrect-use-of-caret-operator)
- [H-2: Reentrancy: State change after external call](#h-2-reentrancy-state-change-after-external-call)
- [Low Issues](#low-issues)
- [L-1: Centralization Risk](#l-1-centralization-risk)
- [L-2: Costly operations inside loop](#l-2-costly-operations-inside-loop)
- [L-3: Empty `require()` / `revert()` Statement](#l-3-empty-require--revert-statement)
- [L-4: Internal Function Used Only Once](#l-4-internal-function-used-only-once)
- [L-5: Large Numeric Literal](#l-5-large-numeric-literal)
- [L-6: Literal Instead of Constant](#l-6-literal-instead-of-constant)
- [L-7: Modifier Invoked Only Once](#l-7-modifier-invoked-only-once)
- [L-8: `nonReentrant` is Not the First Modifier](#l-8-nonreentrant-is-not-the-first-modifier)
- [L-9: PUSH0 Opcode](#l-9-push0-opcode)
- [L-10: State Change Without Event](#l-10-state-change-without-event)
- [L-11: Unchecked Return](#l-11-unchecked-return)
- [L-12: Unspecific Solidity Pragma](#l-12-unspecific-solidity-pragma)
# Summary
## Files Summary
| Key | Value |
| --- | --- |
| .sol Files | 30 |
| Total nSLOC | 2497 |
## Files Details
| Filepath | nSLOC |
| --- | --- |
| src/BeefyCLMAdapter.sol | 345 |
| src/DedicatedVaultMain.sol | 238 |
| src/DedicatedVaultStrategyAdapter.sol | 113 |
| src/DeepYieldStrategyAdapter.sol | 200 |
| src/DeepYieldVault.sol | 131 |
| src/ExcludeIdlePairedQuoter.sol | 7 |
| src/FeeSplitter.sol | 114 |
| src/PancakeSwapV3RouterAdapter.sol | 162 |
| src/PancakeV3MasterchefVenue.sol | 152 |
| src/PancakeV3SwapAdapter.sol | 62 |
| src/interfaces/IBeefyCLM.sol | 14 |
| src/interfaces/IDedicatedVenue.sol | 36 |
| src/interfaces/IDeepYieldStrategy.sol | 9 |
| src/interfaces/IFeeSink.sol | 4 |
| src/interfaces/IPancakeSwapV3.sol | 31 |
| src/interfaces/IPartnerAttribution.sol | 50 |
| src/interfaces/IPartnerRegistry.sol | 60 |
| src/interfaces/IPartnerWrapper.sol | 35 |
| src/interfaces/IUnderlyingRouter.sol | 6 |
| src/interfaces/IUnderlyingVault.sol | 9 |
| src/interfaces/IWrapperFactory.sol | 24 |
| src/libraries/FullMath.sol | 63 |
| src/libraries/LiquidityAmounts.sol | 33 |
| src/libraries/TickMath.sol | 33 |
| src/libraries/V3PositionValuer.sol | 33 |
| src/libraries/VaultFeesLib.sol | 18 |
| src/partners/PartnerAttributedSplitter.sol | 159 |
| src/partners/PartnerRegistry.sol | 165 |
| src/partners/PartnerWrapper.sol | 123 |
| src/partners/WrapperFactory.sol | 68 |
| **Total** | **2497** |
## Issue Summary
| Category | No. of Issues |
| --- | --- |
| High | 2 |
| Low | 12 |
# High Issues
## H-1: Incorrect use of caret operator
The caret operator is usually mistakenly thought of as an exponentiation operator but actually, it's a bitwise xor operator.
1 Found Instances
- Found in src/libraries/FullMath.sol [Line: 50](src/libraries/FullMath.sol#L50)
```solidity
uint256 inv = (3 * denominator) ^ 2;
```
## H-2: Reentrancy: State change after external call
Changing state after an external call can lead to re-entrancy attacks.Use the checks-effects-interactions pattern to avoid this issue.
64 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 161](src/BeefyCLMAdapter.sol#L161)
State is changed at: `try beefyClm.deposit(amount0, amount1, 0) {
accountedAssets += assets;
} catch (bytes memory reason) {
if (reason.length >= 4 && bytes4(reason) == NOTCALM_SELECTOR) {
assetToken.forceApprove(address(beefyClm), 0);
assetToken.safeTransfer(vault, assets);
emit DeployDeferredNotCalm(assets);
} else {
assembly { revert(add(reason, 32), mload(reason)) }
}
}`
```solidity
(address want0, address want1) = beefyClm.wants();
```
- Found in src/BeefyCLMAdapter.sol [Line: 196](src/BeefyCLMAdapter.sol#L196)
State is changed at: `accountedAssets = 0`
```solidity
uint256 shares = beefyClm.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 199](src/BeefyCLMAdapter.sol#L199)
State is changed at: `accountedAssets = 0`
```solidity
beefyClm.withdraw(shares, 0, 0);
```
- Found in src/BeefyCLMAdapter.sol [Line: 203](src/BeefyCLMAdapter.sol#L203)
State is changed at: `accountedAssets = 0`
```solidity
uint256 pairedBal = pairedToken.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 206](src/BeefyCLMAdapter.sol#L206)
State is changed at: `accountedAssets = 0`
```solidity
router.withdrawFromUnderlying(pairedBal, abi.encode(address(pairedToken), address(assetToken)));
```
- Found in src/BeefyCLMAdapter.sol [Line: 210](src/BeefyCLMAdapter.sol#L210)
State is changed at: `accountedAssets = 0`
```solidity
uint256 realized = assetToken.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 266](src/BeefyCLMAdapter.sol#L266)
State is changed at: `accountedAssets = 0`, `accountedAssets -= chunkPrincipal`
```solidity
uint256 idle = assetToken.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 287](src/BeefyCLMAdapter.sol#L287)
State is changed at: `accountedAssets = 0`, `accountedAssets -= chunkPrincipal`
```solidity
withdrawn = assetToken.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 316](src/BeefyCLMAdapter.sol#L316)
State is changed at: `accountedAssets = currentAssets - feeAssets`
```solidity
uint256 idle = assetToken.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 339](src/BeefyCLMAdapter.sol#L339)
State is changed at: `accountedAssets = 0`
```solidity
uint256 shares = beefyClm.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 342](src/BeefyCLMAdapter.sol#L342)
State is changed at: `accountedAssets = 0`
```solidity
beefyClm.withdraw(shares, 0, 0);
```
- Found in src/BeefyCLMAdapter.sol [Line: 346](src/BeefyCLMAdapter.sol#L346)
State is changed at: `accountedAssets = 0`
```solidity
uint256 pairedBal = pairedToken.balanceOf(address(this));
```
- Found in src/BeefyCLMAdapter.sol [Line: 349](src/BeefyCLMAdapter.sol#L349)
State is changed at: `accountedAssets = 0`
```solidity
router.withdrawFromUnderlying(pairedBal, abi.encode(address(pairedToken), address(assetToken)));
```
- Found in src/BeefyCLMAdapter.sol [Line: 353](src/BeefyCLMAdapter.sol#L353)
State is changed at: `accountedAssets = 0`
```solidity
uint256 realized = assetToken.balanceOf(address(this));
```
- Found in src/DedicatedVaultMain.sol [Line: 217](src/DedicatedVaultMain.sol#L217)
State is changed at: `activePositionId = id`, `lastKeeperAt = block.timestamp`
```solidity
if (p.swapAssetIn > asset.balanceOf(address(this))) revert InsufficientIdle();
```
- Found in src/DedicatedVaultMain.sol [Line: 221](src/DedicatedVaultMain.sol#L221)
State is changed at: `activePositionId = id`, `lastKeeperAt = block.timestamp`
```solidity
swapperIn.swapAssetToPaired(p.swapAssetIn, p.pairedMinOut, p.deadline);
```
- Found in src/DedicatedVaultMain.sol [Line: 227](src/DedicatedVaultMain.sol#L227)
State is changed at: `activePositionId = id`, `lastKeeperAt = block.timestamp`
```solidity
uint256 assetForMint = asset.balanceOf(address(this));
```
- Found in src/DedicatedVaultMain.sol [Line: 228](src/DedicatedVaultMain.sol#L228)
State is changed at: `activePositionId = id`, `lastKeeperAt = block.timestamp`
```solidity
uint256 pairedForMint = pairedToken.balanceOf(address(this));
```
- Found in src/DedicatedVaultMain.sol [Line: 233](src/DedicatedVaultMain.sol#L233)
State is changed at: `activePositionId = id`, `lastKeeperAt = block.timestamp`
```solidity
uint256 id = venue.open(IDedicatedVenue.OpenArgs({
```
- Found in src/DedicatedVaultMain.sol [Line: 289](src/DedicatedVaultMain.sol#L289)
State is changed at: `lastKeeperAt = block.timestamp`
```solidity
collected = venue.harvest(activePositionId); // proceeds land in this Main only
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 89](src/DedicatedVaultStrategyAdapter.sol#L89)
State is changed at: `accountedAssets += assets`
```solidity
main.fundFromVault(assets); // Main pulls from this adapter (adapter == Main.vault)
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 102](src/DedicatedVaultStrategyAdapter.sol#L102)
State is changed at: `accountedAssets = withdrawn >= accountedAssets ? 0 : accountedAssets - withdrawn`
```solidity
withdrawn = main.withdrawToVault(assetsNeeded); // → sent to this adapter
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 113](src/DedicatedVaultStrategyAdapter.sol#L113)
State is changed at: `accountedAssets = 0`, `accountedAssets = withdrawn >= accountedAssets ? 0 : accountedAssets - withdrawn`
```solidity
uint256 idle = main.idleAsset();
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 115](src/DedicatedVaultStrategyAdapter.sol#L115)
State is changed at: `accountedAssets = 0`, `accountedAssets = withdrawn >= accountedAssets ? 0 : accountedAssets - withdrawn`
```solidity
withdrawn = main.withdrawToVault(idle); // → this adapter
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 118](src/DedicatedVaultStrategyAdapter.sol#L118)
State is changed at: `accountedAssets = 0`, `accountedAssets = withdrawn >= accountedAssets ? 0 : accountedAssets - withdrawn`
```solidity
if (!main.hasActivePosition()) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 147](src/DeepYieldStrategyAdapter.sol#L147)
State is changed at: `accountedAssets += assets`
```solidity
underlyingVault.deposit(assets, address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 153](src/DeepYieldStrategyAdapter.sol#L153)
State is changed at: `accountedAssets = 0`
```solidity
uint256 shares = underlyingVault.balanceOf(address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 155](src/DeepYieldStrategyAdapter.sol#L155)
State is changed at: `accountedAssets = 0`
```solidity
underlyingVault.redeem(shares, address(this), address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 156](src/DeepYieldStrategyAdapter.sol#L156)
State is changed at: `accountedAssets = 0`
```solidity
withdrawn = assetToken.balanceOf(address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 170](src/DeepYieldStrategyAdapter.sol#L170)
State is changed at: `accountedAssets = 0`, `accountedAssets -= withdrawn`
```solidity
uint256 idle = assetToken.balanceOf(address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 173](src/DeepYieldStrategyAdapter.sol#L173)
State is changed at: `accountedAssets = 0`, `accountedAssets -= withdrawn`
```solidity
underlyingVault.withdraw(missing, address(this), address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 175](src/DeepYieldStrategyAdapter.sol#L175)
State is changed at: `accountedAssets = 0`, `accountedAssets -= withdrawn`
```solidity
withdrawn = assetToken.balanceOf(address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 192](src/DeepYieldStrategyAdapter.sol#L192)
State is changed at: `accountedAssets = currentAssets - feeAssets`, `accountedAssets = currentAssets`
```solidity
uint256 currentAssets = this.estimatedTotalAssets();
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 201](src/DeepYieldStrategyAdapter.sol#L201)
State is changed at: `accountedAssets = currentAssets - feeAssets`
```solidity
uint256 idle = assetToken.balanceOf(address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 203](src/DeepYieldStrategyAdapter.sol#L203)
State is changed at: `accountedAssets = currentAssets - feeAssets`
```solidity
underlyingVault.withdraw(feeAssets - idle, address(this), address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 211](src/DeepYieldStrategyAdapter.sol#L211)
State is changed at: `accountedAssets = 0`
```solidity
uint256 shares = underlyingVault.balanceOf(address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 213](src/DeepYieldStrategyAdapter.sol#L213)
State is changed at: `accountedAssets = 0`
```solidity
underlyingVault.redeem(shares, address(this), address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 215](src/DeepYieldStrategyAdapter.sol#L215)
State is changed at: `accountedAssets = 0`
```solidity
uint256 bal = assetToken.balanceOf(address(this));
```
- Found in src/DeepYieldVault.sol [Line: 75](src/DeepYieldVault.sol#L75)
State is changed at: `strategy = IDeepYieldStrategy(newStrategy)`
```solidity
if (strategy.estimatedTotalAssets() > 0) revert StrategyNotEmpty();
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 94](src/PancakeSwapV3RouterAdapter.sol#L94)
State is changed at: `token1 = IPancakeV3Pool(pool_).token1()`, `poolFee = IPancakeV3Pool(pool_).fee()`, `owner = owner_`, `executionSlippageBps = 100`, `maxSpotTwapDeviationBps = 500`, `twapWindowSeconds = 1800`
```solidity
token0 = IPancakeV3Pool(pool_).token0();
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 95](src/PancakeSwapV3RouterAdapter.sol#L95)
State is changed at: `poolFee = IPancakeV3Pool(pool_).fee()`, `owner = owner_`, `executionSlippageBps = 100`, `maxSpotTwapDeviationBps = 500`, `twapWindowSeconds = 1800`
```solidity
token1 = IPancakeV3Pool(pool_).token1();
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 96](src/PancakeSwapV3RouterAdapter.sol#L96)
State is changed at: `owner = owner_`, `executionSlippageBps = 100`, `maxSpotTwapDeviationBps = 500`, `twapWindowSeconds = 1800`
```solidity
poolFee = IPancakeV3Pool(pool_).fee();
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 122](src/PancakeV3MasterchefVenue.sol#L122)
State is changed at: `activeTokenId = tokenId`
```solidity
(tokenId,,,) = nfpm.mint(INfpmVenue.MintParams({
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 131](src/PancakeV3MasterchefVenue.sol#L131)
State is changed at: `activeTokenId = tokenId`
```solidity
if (farmed) nfpm.safeTransferFrom(address(this), address(masterchef), tokenId);
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 143](src/PancakeV3MasterchefVenue.sol#L143)
State is changed at: `activeTokenId = 0`
```solidity
masterchef.harvest(positionId, address(this));
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 144](src/PancakeV3MasterchefVenue.sol#L144)
State is changed at: `activeTokenId = 0`
```solidity
masterchef.withdraw(positionId, address(this)); // NFT back to venue (ERC721Holder receives)
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 146](src/PancakeV3MasterchefVenue.sol#L146)
State is changed at: `activeTokenId = 0`
```solidity
(, , , , , , , uint128 liq, , , , ) = nfpm.positions(positionId);
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 148](src/PancakeV3MasterchefVenue.sol#L148)
State is changed at: `activeTokenId = 0`
```solidity
nfpm.decreaseLiquidity(INfpmVenue.DecreaseLiquidityParams({
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 152](src/PancakeV3MasterchefVenue.sol#L152)
State is changed at: `activeTokenId = 0`
```solidity
nfpm.collect(INfpmVenue.CollectParams({
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 155](src/PancakeV3MasterchefVenue.sol#L155)
State is changed at: `activeTokenId = 0`
```solidity
nfpm.burn(positionId);
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 81](src/partners/PartnerAttributedSplitter.sol#L81)
State is changed at: `asset = IERC20(IERC4626(vault).asset())`, `projectTreasury = projectTreasury_`, `partnerShareBps = partnerShareBps_`
```solidity
vault = IPartnerRegistry(registry_).vault();
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 82](src/partners/PartnerAttributedSplitter.sol#L82)
State is changed at: `projectTreasury = projectTreasury_`, `partnerShareBps = partnerShareBps_`
```solidity
asset = IERC20(IERC4626(vault).asset());
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 106](src/partners/PartnerAttributedSplitter.sol#L106)
State is changed at: `pendingProjectHouseSlice += houseSlice`, `pendingProjectBaseSlice += baseSlice`, `pendingProjectBaseSlice += baseSlice`, `pendingProjectHouseSlice += partnerCut`, `pendingForWrapper[W] += wSlice`, `pendingPerPartner[pid] += wSlice`, `cumulativeAccruedPerPartner[pid] += wSlice`
```solidity
uint256 totalSupply_ = IERC20(vault).totalSupply();
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 117](src/partners/PartnerAttributedSplitter.sol#L117)
State is changed at: `pendingProjectHouseSlice += houseSlice`, `pendingProjectBaseSlice += baseSlice`, `pendingForWrapper[W] += wSlice`, `pendingPerPartner[pid] += wSlice`, `cumulativeAccruedPerPartner[pid] += wSlice`
```solidity
address[] memory wrappers = IPartnerRegistry(registry).activeWrapperList();
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 122](src/partners/PartnerAttributedSplitter.sol#L122)
State is changed at: `pendingProjectHouseSlice += houseSlice`, `pendingProjectBaseSlice += baseSlice`, `pendingForWrapper[W] += wSlice`, `pendingPerPartner[pid] += wSlice`, `cumulativeAccruedPerPartner[pid] += wSlice`
```solidity
uint256 vBal = IERC20(vault).balanceOf(W);
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 123](src/partners/PartnerAttributedSplitter.sol#L123)
State is changed at: `pendingProjectHouseSlice += houseSlice`, `pendingProjectBaseSlice += baseSlice`, `pendingForWrapper[W] += wSlice`, `pendingPerPartner[pid] += wSlice`, `cumulativeAccruedPerPartner[pid] += wSlice`
```solidity
uint256 receipts = IPartnerWrapper(W).totalReceipts();
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 130](src/partners/PartnerAttributedSplitter.sol#L130)
State is changed at: `pendingProjectHouseSlice += houseSlice`, `pendingProjectBaseSlice += baseSlice`, `pendingForWrapper[W] += wSlice`, `pendingPerPartner[pid] += wSlice`, `cumulativeAccruedPerPartner[pid] += wSlice`
```solidity
bytes32 pid = IPartnerRegistry(registry).partnerOfWrapper(W);
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 159](src/partners/PartnerAttributedSplitter.sol#L159)
State is changed at: `pendingForWrapper[wrapper] = 0`, `pendingPerPartner[pid] -= paid`, `cumulativeClaimedPerWrapper[wrapper] += paid`, `cumulativeClaimedPerPartner[pid] += paid`, `_totalPending -= paid`
```solidity
bytes32 pid = IPartnerRegistry(registry).partnerOfWrapper(wrapper);
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 161](src/partners/PartnerAttributedSplitter.sol#L161)
State is changed at: `pendingForWrapper[wrapper] = 0`, `pendingPerPartner[pid] -= paid`, `cumulativeClaimedPerWrapper[wrapper] += paid`, `cumulativeClaimedPerPartner[pid] += paid`, `_totalPending -= paid`
```solidity
address payout = IPartnerRegistry(registry).payoutTreasury(pid);
```
- Found in src/partners/PartnerRegistry.sol [Line: 100](src/partners/PartnerRegistry.sol#L100)
State is changed at: `factory = factory_`
```solidity
try IWrapperFactory(factory_).registry() returns (address r) {
```
- Found in src/partners/PartnerRegistry.sol [Line: 105](src/partners/PartnerRegistry.sol#L105)
State is changed at: `factory = factory_`
```solidity
try IWrapperFactory(factory_).vault() returns (address v) {
```
- Found in src/partners/PartnerRegistry.sol [Line: 252](src/partners/PartnerRegistry.sol#L252)
State is changed at: `isRetiredWrapper[wrapper] = true`
```solidity
if (IERC20(vault).balanceOf(wrapper) != 0) revert WrapperHasShares();
```
- Found in src/partners/WrapperFactory.sol [Line: 37](src/partners/WrapperFactory.sol#L37)
State is changed at: `asset = IERC4626(vault).asset()`, `wrapperAdmin = wrapperAdmin_`
```solidity
vault = IPartnerRegistry(registry_).vault();
```
- Found in src/partners/WrapperFactory.sol [Line: 38](src/partners/WrapperFactory.sol#L38)
State is changed at: `wrapperAdmin = wrapperAdmin_`
```solidity
asset = IERC4626(vault).asset();
```
# Low Issues
## L-1: Centralization Risk
Contracts have owners with privileged rights to perform admin tasks and need to be trusted to not perform malicious updates or drain funds.
67 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 15](src/BeefyCLMAdapter.sol#L15)
```solidity
contract BeefyCLMAdapter is IDeepYieldStrategy, AccessControl, Pausable, ReentrancyGuard {
```
- Found in src/BeefyCLMAdapter.sol [Line: 105](src/BeefyCLMAdapter.sol#L105)
```solidity
function setBeefyClm(address newBeefyClm) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 110](src/BeefyCLMAdapter.sol#L110)
```solidity
function setRouter(address newRouter) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 119](src/BeefyCLMAdapter.sol#L119)
```solidity
function setTreasury(address newTreasury) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 130](src/BeefyCLMAdapter.sol#L130)
```solidity
function setTreasury(address newTreasury, bool isFeeSink) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 139](src/BeefyCLMAdapter.sol#L139)
```solidity
function setPerformanceFeeBps(uint256 newFeeBps) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 144](src/BeefyCLMAdapter.sol#L144)
```solidity
function setDeploySplitBps(uint256 newSplitBps) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 149](src/BeefyCLMAdapter.sol#L149)
```solidity
function pause() external onlyRole(GUARDIAN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 153](src/BeefyCLMAdapter.sol#L153)
```solidity
function unpause() external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 157](src/BeefyCLMAdapter.sol#L157)
```solidity
function deploy(uint256 assets) external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant {
```
- Found in src/BeefyCLMAdapter.sol [Line: 195](src/BeefyCLMAdapter.sol#L195)
```solidity
function managerWithdrawAll() external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant returns (uint256 withdrawn) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 301](src/BeefyCLMAdapter.sol#L301)
```solidity
onlyRole(MANAGER_ROLE)
```
- Found in src/BeefyCLMAdapter.sol [Line: 338](src/BeefyCLMAdapter.sol#L338)
```solidity
function panic() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultMain.sol [Line: 21](src/DedicatedVaultMain.sol#L21)
```solidity
contract DedicatedVaultMain is AccessControl, Pausable, ReentrancyGuard {
```
- Found in src/DedicatedVaultMain.sol [Line: 208](src/DedicatedVaultMain.sol#L208)
```solidity
external onlyRole(KEEPER_ROLE) whenNotPaused nonReentrant
```
- Found in src/DedicatedVaultMain.sol [Line: 247](src/DedicatedVaultMain.sol#L247)
```solidity
external onlyRole(KEEPER_ROLE) nonReentrant
```
- Found in src/DedicatedVaultMain.sol [Line: 262](src/DedicatedVaultMain.sol#L262)
```solidity
) external onlyRole(KEEPER_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultMain.sol [Line: 287](src/DedicatedVaultMain.sol#L287)
```solidity
function harvest() external onlyRole(KEEPER_ROLE) nonReentrant returns (uint256 collected) {
```
- Found in src/DedicatedVaultMain.sol [Line: 297](src/DedicatedVaultMain.sol#L297)
```solidity
function pause() external onlyRole(GUARDIAN_ROLE) {
```
- Found in src/DedicatedVaultMain.sol [Line: 301](src/DedicatedVaultMain.sol#L301)
```solidity
function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
```
- Found in src/DedicatedVaultMain.sol [Line: 310](src/DedicatedVaultMain.sol#L310)
```solidity
function emergencyClose() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 22](src/DedicatedVaultStrategyAdapter.sol#L22)
```solidity
contract DedicatedVaultStrategyAdapter is IDeepYieldStrategy, AccessControl, ReentrancyGuard {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 86](src/DedicatedVaultStrategyAdapter.sol#L86)
```solidity
function deploy(uint256 assets) external onlyRole(MANAGER_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 111](src/DedicatedVaultStrategyAdapter.sol#L111)
```solidity
function managerWithdrawAll() external onlyRole(MANAGER_ROLE) nonReentrant returns (uint256 withdrawn) {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 132](src/DedicatedVaultStrategyAdapter.sol#L132)
```solidity
function harvest() external onlyRole(MANAGER_ROLE) nonReentrant returns (uint256 profit, uint256 feeAssets) {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 169](src/DedicatedVaultStrategyAdapter.sol#L169)
```solidity
function panic() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 13](src/DeepYieldStrategyAdapter.sol#L13)
```solidity
contract DeepYieldStrategyAdapter is IDeepYieldStrategy, AccessControl, Pausable, ReentrancyGuard {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 93](src/DeepYieldStrategyAdapter.sol#L93)
```solidity
function setUnderlyingVault(address newUnderlyingVault) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 98](src/DeepYieldStrategyAdapter.sol#L98)
```solidity
function setTreasury(address newTreasury) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 105](src/DeepYieldStrategyAdapter.sol#L105)
```solidity
function setPerformanceFeeBps(uint256 newFeeBps) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 110](src/DeepYieldStrategyAdapter.sol#L110)
```solidity
function setStrategyConfig(StrategyConfig calldata newConfig) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 135](src/DeepYieldStrategyAdapter.sol#L135)
```solidity
function pause() external onlyRole(GUARDIAN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 139](src/DeepYieldStrategyAdapter.sol#L139)
```solidity
function unpause() external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 143](src/DeepYieldStrategyAdapter.sol#L143)
```solidity
function deploy(uint256 assets) external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 152](src/DeepYieldStrategyAdapter.sol#L152)
```solidity
function managerWithdrawAll() external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant returns (uint256 withdrawn) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 187](src/DeepYieldStrategyAdapter.sol#L187)
```solidity
onlyRole(MANAGER_ROLE)
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 210](src/DeepYieldStrategyAdapter.sol#L210)
```solidity
function panic() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DeepYieldVault.sol [Line: 15](src/DeepYieldVault.sol#L15)
```solidity
contract DeepYieldVault is ERC4626, AccessControl, Pausable, ReentrancyGuard {
```
- Found in src/DeepYieldVault.sol [Line: 71](src/DeepYieldVault.sol#L71)
```solidity
function setStrategy(address newStrategy) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldVault.sol [Line: 83](src/DeepYieldVault.sol#L83)
```solidity
function setTreasury(address newTreasury) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldVault.sol [Line: 90](src/DeepYieldVault.sol#L90)
```solidity
function setDepositCap(uint256 newCap) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldVault.sol [Line: 96](src/DeepYieldVault.sol#L96)
```solidity
function pause() external onlyRole(GUARDIAN_ROLE) {
```
- Found in src/DeepYieldVault.sol [Line: 100](src/DeepYieldVault.sol#L100)
```solidity
function unpause() external onlyRole(ADMIN_ROLE) {
```
- Found in src/FeeSplitter.sol [Line: 28](src/FeeSplitter.sol#L28)
```solidity
contract FeeSplitter is AccessControl, ReentrancyGuard, IFeeSink {
```
- Found in src/FeeSplitter.sol [Line: 110](src/FeeSplitter.sol#L110)
```solidity
function setProjectTreasury(address newT) external onlyRole(ADMIN_ROLE) {
```
- Found in src/FeeSplitter.sol [Line: 116](src/FeeSplitter.sol#L116)
```solidity
function setPartnerTreasury(address newT) external onlyRole(ADMIN_ROLE) {
```
- Found in src/FeeSplitter.sol [Line: 125](src/FeeSplitter.sol#L125)
```solidity
function setPartnerShareBps(uint256 newBps) external onlyRole(ADMIN_ROLE) {
```
- Found in src/FeeSplitter.sol [Line: 200](src/FeeSplitter.sol#L200)
```solidity
function recoverUnrecorded() external onlyRole(ADMIN_ROLE) nonReentrant returns (uint256 recovered) {
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 108](src/PancakeSwapV3RouterAdapter.sol#L108)
```solidity
function setOwner(address newOwner) external onlyOwner {
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 114](src/PancakeSwapV3RouterAdapter.sol#L114)
```solidity
function setExecutionSlippageBps(uint256 newBps) external onlyOwner {
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 120](src/PancakeSwapV3RouterAdapter.sol#L120)
```solidity
function setMaxSpotTwapDeviationBps(uint256 newBps) external onlyOwner {
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 126](src/PancakeSwapV3RouterAdapter.sol#L126)
```solidity
function setTwapWindowSeconds(uint32 newTwapWindow) external onlyOwner {
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 29](src/partners/PartnerAttributedSplitter.sol#L29)
```solidity
contract PartnerAttributedSplitter is AccessControl, ReentrancyGuard, IPartnerAttribution {
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 218](src/partners/PartnerAttributedSplitter.sol#L218)
```solidity
function setPartnerShareBps(uint256 newBps) external override onlyRole(ADMIN_ROLE) {
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 224](src/partners/PartnerAttributedSplitter.sol#L224)
```solidity
function setProjectTreasury(address newTreasury) external override onlyRole(ADMIN_ROLE) {
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 234](src/partners/PartnerAttributedSplitter.sol#L234)
```solidity
onlyRole(ADMIN_ROLE)
```
- Found in src/partners/PartnerRegistry.sol [Line: 30](src/partners/PartnerRegistry.sol#L30)
```solidity
contract PartnerRegistry is AccessControl, IPartnerRegistry {
```
- Found in src/partners/PartnerRegistry.sol [Line: 93](src/partners/PartnerRegistry.sol#L93)
```solidity
function setFactory(address factory_) external override onlyRole(ADMIN_ROLE) {
```
- Found in src/partners/PartnerRegistry.sol [Line: 217](src/partners/PartnerRegistry.sol#L217)
```solidity
onlyRole(ADMIN_ROLE)
```
- Found in src/partners/PartnerRegistry.sol [Line: 226](src/partners/PartnerRegistry.sol#L226)
```solidity
function pauseDepositsForWrapper(address wrapper) external override onlyRole(ADMIN_ROLE) {
```
- Found in src/partners/PartnerRegistry.sol [Line: 234](src/partners/PartnerRegistry.sol#L234)
```solidity
function unpauseDepositsForWrapper(address wrapper) external override onlyRole(ADMIN_ROLE) {
```
- Found in src/partners/PartnerRegistry.sol [Line: 247](src/partners/PartnerRegistry.sol#L247)
```solidity
function retireWrapper(address wrapper) external override onlyRole(ADMIN_ROLE) {
```
- Found in src/partners/PartnerWrapper.sol [Line: 27](src/partners/PartnerWrapper.sol#L27)
```solidity
contract PartnerWrapper is ERC20, AccessControl, ReentrancyGuard, IPartnerWrapper {
```
- Found in src/partners/PartnerWrapper.sol [Line: 166](src/partners/PartnerWrapper.sol#L166)
```solidity
onlyRole(ADMIN_ROLE)
```
- Found in src/partners/WrapperFactory.sol [Line: 19](src/partners/WrapperFactory.sol#L19)
```solidity
contract WrapperFactory is AccessControl, IWrapperFactory {
```
- Found in src/partners/WrapperFactory.sol [Line: 48](src/partners/WrapperFactory.sol#L48)
```solidity
onlyRole(ADMIN_ROLE)
```
- Found in src/partners/WrapperFactory.sol [Line: 72](src/partners/WrapperFactory.sol#L72)
```solidity
onlyRole(ADMIN_ROLE)
```
## L-2: Costly operations inside loop
Invoking `SSTORE` operations in loops may waste gas. Use a local variable to hold the loop computation result.
1 Found Instances
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 120](src/partners/PartnerAttributedSplitter.sol#L120)
```solidity
for (uint256 i = 0; i < n; ++i) {
```
## L-3: Empty `require()` / `revert()` Statement
Use descriptive reason strings or custom errors for revert paths.
3 Found Instances
- Found in src/libraries/FullMath.sol [Line: 19](src/libraries/FullMath.sol#L19)
```solidity
require(denominator > 0);
```
- Found in src/libraries/FullMath.sol [Line: 26](src/libraries/FullMath.sol#L26)
```solidity
require(denominator > prod1);
```
- Found in src/libraries/FullMath.sol [Line: 69](src/libraries/FullMath.sol#L69)
```solidity
require(result < type(uint256).max);
```
## L-4: Internal Function Used Only Once
Instead of separating the logic into a separate function, consider inlining the logic into the calling function. This can reduce the number of function calls and improve readability.
3 Found Instances
- Found in src/libraries/FullMath.sol [Line: 5](src/libraries/FullMath.sol#L5)
```solidity
function mulDiv(
```
- Found in src/libraries/V3PositionValuer.sol [Line: 20](src/libraries/V3PositionValuer.sol#L20)
```solidity
function amounts(uint160 sqrtPriceX96, int24 tickLower, int24 tickUpper, uint128 liquidity)
```
- Found in src/libraries/V3PositionValuer.sol [Line: 33](src/libraries/V3PositionValuer.sol#L33)
```solidity
function token1ToToken0(uint256 amount1, uint160 sqrtPriceX96) internal pure returns (uint256) {
```
## L-5: Large Numeric Literal
Large literal values multiples of 10000 can be replaced with scientific notation.Use `e` notation, for example: `1e18`, instead of its full numeric value.
12 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 82](src/BeefyCLMAdapter.sol#L82)
```solidity
if (deploySplitBps_ == 0 || deploySplitBps_ >= 10_000) revert InvalidSplitBps();
```
- Found in src/BeefyCLMAdapter.sol [Line: 145](src/BeefyCLMAdapter.sol#L145)
```solidity
if (newSplitBps == 0 || newSplitBps >= 10_000) revert InvalidSplitBps();
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 145](src/DedicatedVaultStrategyAdapter.sol#L145)
```solidity
feeAssets = (profit * performanceFeeBps) / 10_000;
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 119](src/DeepYieldStrategyAdapter.sol#L119)
```solidity
newConfig.maxSlippageBps > 10_000
```
- Found in src/FeeSplitter.sol [Line: 140](src/FeeSplitter.sol#L140)
```solidity
uint256 partnerShare = (amount * currentBps) / 10_000;
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 44](src/PancakeSwapV3RouterAdapter.sol#L44)
```solidity
uint256 private constant FEE_DENOMINATOR = 1_000_000;
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 156](src/PancakeSwapV3RouterAdapter.sol#L156)
```solidity
uint256 minOut = spotQ * (10_000 - executionSlippageBps) / 10_000;
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 171](src/PancakeSwapV3RouterAdapter.sol#L171)
```solidity
uint256 deviationBps = (diff * 10_000) / twapQ;
```
- Found in src/libraries/VaultFeesLib.sol [Line: 5](src/libraries/VaultFeesLib.sol#L5)
```solidity
uint256 internal constant MAX_BPS = 10_000;
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 107](src/partners/PartnerAttributedSplitter.sol#L107)
```solidity
uint256 partnerCut = (amount * bpsLocked) / 10_000;
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 201](src/partners/PartnerAttributedSplitter.sol#L201)
```solidity
uint256 partnerCut = (amount * partnerShareBps) / 10_000;
```
## L-6: Literal Instead of Constant
Define and use `constant` variables instead of using literals. If the same constant literal value is used multiple times, create a constant state variable and reference it throughout the contract.
32 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 82](src/BeefyCLMAdapter.sol#L82)
```solidity
if (deploySplitBps_ == 0 || deploySplitBps_ >= 10_000) revert InvalidSplitBps();
```
- Found in src/BeefyCLMAdapter.sol [Line: 83](src/BeefyCLMAdapter.sol#L83)
```solidity
if (performanceFeeBps_ > 5000) revert FeeTooHigh();
```
- Found in src/BeefyCLMAdapter.sol [Line: 140](src/BeefyCLMAdapter.sol#L140)
```solidity
if (newFeeBps > 5000) revert FeeTooHigh();
```
- Found in src/BeefyCLMAdapter.sol [Line: 145](src/BeefyCLMAdapter.sol#L145)
```solidity
if (newSplitBps == 0 || newSplitBps >= 10_000) revert InvalidSplitBps();
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 74](src/DeepYieldStrategyAdapter.sol#L74)
```solidity
if (performanceFeeBps_ > 5000) revert FeeTooHigh();
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 106](src/DeepYieldStrategyAdapter.sol#L106)
```solidity
if (newFeeBps > 5000) revert FeeTooHigh();
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 156](src/PancakeSwapV3RouterAdapter.sol#L156)
```solidity
uint256 minOut = spotQ * (10_000 - executionSlippageBps) / 10_000;
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 171](src/PancakeSwapV3RouterAdapter.sol#L171)
```solidity
uint256 deviationBps = (diff * 10_000) / twapQ;
```
- Found in src/libraries/TickMath.sol [Line: 31](src/libraries/TickMath.sol#L31)
```solidity
if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 32](src/libraries/TickMath.sol#L32)
```solidity
if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 33](src/libraries/TickMath.sol#L33)
```solidity
if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 34](src/libraries/TickMath.sol#L34)
```solidity
if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 35](src/libraries/TickMath.sol#L35)
```solidity
if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 36](src/libraries/TickMath.sol#L36)
```solidity
if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 37](src/libraries/TickMath.sol#L37)
```solidity
if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 38](src/libraries/TickMath.sol#L38)
```solidity
if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 39](src/libraries/TickMath.sol#L39)
```solidity
if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 40](src/libraries/TickMath.sol#L40)
```solidity
if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 41](src/libraries/TickMath.sol#L41)
```solidity
if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 42](src/libraries/TickMath.sol#L42)
```solidity
if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 43](src/libraries/TickMath.sol#L43)
```solidity
if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 44](src/libraries/TickMath.sol#L44)
```solidity
if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 45](src/libraries/TickMath.sol#L45)
```solidity
if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 46](src/libraries/TickMath.sol#L46)
```solidity
if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 47](src/libraries/TickMath.sol#L47)
```solidity
if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 48](src/libraries/TickMath.sol#L48)
```solidity
if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 49](src/libraries/TickMath.sol#L49)
```solidity
if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;
```
- Found in src/libraries/TickMath.sol [Line: 55](src/libraries/TickMath.sol#L55)
```solidity
sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 107](src/partners/PartnerAttributedSplitter.sol#L107)
```solidity
uint256 partnerCut = (amount * bpsLocked) / 10_000;
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 201](src/partners/PartnerAttributedSplitter.sol#L201)
```solidity
uint256 partnerCut = (amount * partnerShareBps) / 10_000;
```
## L-7: Modifier Invoked Only Once
Consider removing the modifier or inlining the logic into the calling function.
3 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 100](src/BeefyCLMAdapter.sol#L100)
```solidity
modifier onlyVault() {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 53](src/DedicatedVaultStrategyAdapter.sol#L53)
```solidity
modifier onlyVault() {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 88](src/DeepYieldStrategyAdapter.sol#L88)
```solidity
modifier onlyVault() {
```
## L-8: `nonReentrant` is Not the First Modifier
To protect against reentrancy in other modifiers, the `nonReentrant` modifier should be the first modifier in the list of modifiers.
30 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 157](src/BeefyCLMAdapter.sol#L157)
```solidity
function deploy(uint256 assets) external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant {
```
- Found in src/BeefyCLMAdapter.sol [Line: 195](src/BeefyCLMAdapter.sol#L195)
```solidity
function managerWithdrawAll() external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant returns (uint256 withdrawn) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 244](src/BeefyCLMAdapter.sol#L244)
```solidity
function withdrawToVault(uint256 assetsNeeded) external onlyVault nonReentrant returns (uint256 withdrawn) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 303](src/BeefyCLMAdapter.sol#L303)
```solidity
nonReentrant
```
- Found in src/BeefyCLMAdapter.sol [Line: 338](src/BeefyCLMAdapter.sol#L338)
```solidity
function panic() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultMain.sol [Line: 116](src/DedicatedVaultMain.sol#L116)
```solidity
function fundFromVault(uint256 amount) external onlyVault nonReentrant {
```
- Found in src/DedicatedVaultMain.sol [Line: 123](src/DedicatedVaultMain.sol#L123)
```solidity
function withdrawToVault(uint256 amount) external onlyVault nonReentrant returns (uint256) {
```
- Found in src/DedicatedVaultMain.sol [Line: 208](src/DedicatedVaultMain.sol#L208)
```solidity
external onlyRole(KEEPER_ROLE) whenNotPaused nonReentrant
```
- Found in src/DedicatedVaultMain.sol [Line: 247](src/DedicatedVaultMain.sol#L247)
```solidity
external onlyRole(KEEPER_ROLE) nonReentrant
```
- Found in src/DedicatedVaultMain.sol [Line: 262](src/DedicatedVaultMain.sol#L262)
```solidity
) external onlyRole(KEEPER_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultMain.sol [Line: 287](src/DedicatedVaultMain.sol#L287)
```solidity
function harvest() external onlyRole(KEEPER_ROLE) nonReentrant returns (uint256 collected) {
```
- Found in src/DedicatedVaultMain.sol [Line: 310](src/DedicatedVaultMain.sol#L310)
```solidity
function emergencyClose() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 86](src/DedicatedVaultStrategyAdapter.sol#L86)
```solidity
function deploy(uint256 assets) external onlyRole(MANAGER_ROLE) nonReentrant {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 100](src/DedicatedVaultStrategyAdapter.sol#L100)
```solidity
function withdrawToVault(uint256 assetsNeeded) external onlyVault nonReentrant returns (uint256 withdrawn) {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 111](src/DedicatedVaultStrategyAdapter.sol#L111)
```solidity
function managerWithdrawAll() external onlyRole(MANAGER_ROLE) nonReentrant returns (uint256 withdrawn) {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 132](src/DedicatedVaultStrategyAdapter.sol#L132)
```solidity
function harvest() external onlyRole(MANAGER_ROLE) nonReentrant returns (uint256 profit, uint256 feeAssets) {
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 169](src/DedicatedVaultStrategyAdapter.sol#L169)
```solidity
function panic() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 143](src/DeepYieldStrategyAdapter.sol#L143)
```solidity
function deploy(uint256 assets) external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 152](src/DeepYieldStrategyAdapter.sol#L152)
```solidity
function managerWithdrawAll() external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant returns (uint256 withdrawn) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 166](src/DeepYieldStrategyAdapter.sol#L166)
```solidity
nonReentrant
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 189](src/DeepYieldStrategyAdapter.sol#L189)
```solidity
nonReentrant
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 210](src/DeepYieldStrategyAdapter.sol#L210)
```solidity
function panic() external onlyRole(GUARDIAN_ROLE) nonReentrant {
```
- Found in src/DeepYieldVault.sol [Line: 108](src/DeepYieldVault.sol#L108)
```solidity
nonReentrant
```
- Found in src/DeepYieldVault.sol [Line: 120](src/DeepYieldVault.sol#L120)
```solidity
nonReentrant
```
- Found in src/FeeSplitter.sol [Line: 200](src/FeeSplitter.sol#L200)
```solidity
function recoverUnrecorded() external onlyRole(ADMIN_ROLE) nonReentrant returns (uint256 recovered) {
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 115](src/PancakeV3MasterchefVenue.sol#L115)
```solidity
external onlyController nonReentrant returns (uint256 tokenId)
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 139](src/PancakeV3MasterchefVenue.sol#L139)
```solidity
external onlyController nonReentrant
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 164](src/PancakeV3MasterchefVenue.sol#L164)
```solidity
function harvest(uint256 positionId) external onlyController nonReentrant returns (uint256 assetCollected) {
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 235](src/partners/PartnerAttributedSplitter.sol#L235)
```solidity
nonReentrant
```
- Found in src/partners/PartnerWrapper.sol [Line: 167](src/partners/PartnerWrapper.sol#L167)
```solidity
nonReentrant
```
## L-9: PUSH0 Opcode
Solc compiler version 0.8.20 switches the default target EVM version to Shanghai, which means that the generated bytecode will include PUSH0 opcodes. Be sure to select the appropriate EVM version in case you intend to deploy on a chain other than mainnet like L2 chains that may not support PUSH0, otherwise deployment of your contracts will fail.
30 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 2](src/BeefyCLMAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DedicatedVaultMain.sol [Line: 2](src/DedicatedVaultMain.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 2](src/DedicatedVaultStrategyAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 2](src/DeepYieldStrategyAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DeepYieldVault.sol [Line: 2](src/DeepYieldVault.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/ExcludeIdlePairedQuoter.sol [Line: 2](src/ExcludeIdlePairedQuoter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/FeeSplitter.sol [Line: 2](src/FeeSplitter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 2](src/PancakeSwapV3RouterAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 2](src/PancakeV3MasterchefVenue.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/PancakeV3SwapAdapter.sol [Line: 2](src/PancakeV3SwapAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IBeefyCLM.sol [Line: 2](src/interfaces/IBeefyCLM.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IDedicatedVenue.sol [Line: 2](src/interfaces/IDedicatedVenue.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IDeepYieldStrategy.sol [Line: 2](src/interfaces/IDeepYieldStrategy.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IFeeSink.sol [Line: 2](src/interfaces/IFeeSink.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPancakeSwapV3.sol [Line: 2](src/interfaces/IPancakeSwapV3.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPartnerAttribution.sol [Line: 2](src/interfaces/IPartnerAttribution.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPartnerRegistry.sol [Line: 2](src/interfaces/IPartnerRegistry.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPartnerWrapper.sol [Line: 2](src/interfaces/IPartnerWrapper.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IUnderlyingRouter.sol [Line: 2](src/interfaces/IUnderlyingRouter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IUnderlyingVault.sol [Line: 2](src/interfaces/IUnderlyingVault.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IWrapperFactory.sol [Line: 2](src/interfaces/IWrapperFactory.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/libraries/FullMath.sol [Line: 2](src/libraries/FullMath.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/libraries/LiquidityAmounts.sol [Line: 2](src/libraries/LiquidityAmounts.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/libraries/TickMath.sol [Line: 2](src/libraries/TickMath.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/libraries/V3PositionValuer.sol [Line: 2](src/libraries/V3PositionValuer.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/libraries/VaultFeesLib.sol [Line: 2](src/libraries/VaultFeesLib.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 2](src/partners/PartnerAttributedSplitter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/PartnerRegistry.sol [Line: 2](src/partners/PartnerRegistry.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/PartnerWrapper.sol [Line: 2](src/partners/PartnerWrapper.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/WrapperFactory.sol [Line: 2](src/partners/WrapperFactory.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
## L-10: State Change Without Event
There are state variable changes in this function but no event is emitted. Consider emitting an event to enable offchain indexers to track the changes.
16 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 105](src/BeefyCLMAdapter.sol#L105)
```solidity
function setBeefyClm(address newBeefyClm) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 110](src/BeefyCLMAdapter.sol#L110)
```solidity
function setRouter(address newRouter) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 119](src/BeefyCLMAdapter.sol#L119)
```solidity
function setTreasury(address newTreasury) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 130](src/BeefyCLMAdapter.sol#L130)
```solidity
function setTreasury(address newTreasury, bool isFeeSink) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 139](src/BeefyCLMAdapter.sol#L139)
```solidity
function setPerformanceFeeBps(uint256 newFeeBps) external onlyRole(ADMIN_ROLE) {
```
- Found in src/BeefyCLMAdapter.sol [Line: 144](src/BeefyCLMAdapter.sol#L144)
```solidity
function setDeploySplitBps(uint256 newSplitBps) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 93](src/DeepYieldStrategyAdapter.sol#L93)
```solidity
function setUnderlyingVault(address newUnderlyingVault) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 98](src/DeepYieldStrategyAdapter.sol#L98)
```solidity
function setTreasury(address newTreasury) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 105](src/DeepYieldStrategyAdapter.sol#L105)
```solidity
function setPerformanceFeeBps(uint256 newFeeBps) external onlyRole(ADMIN_ROLE) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 143](src/DeepYieldStrategyAdapter.sol#L143)
```solidity
function deploy(uint256 assets) external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 152](src/DeepYieldStrategyAdapter.sol#L152)
```solidity
function managerWithdrawAll() external onlyRole(MANAGER_ROLE) whenNotPaused nonReentrant returns (uint256 withdrawn) {
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 163](src/DeepYieldStrategyAdapter.sol#L163)
```solidity
function withdrawToVault(uint256 assetsNeeded)
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 185](src/DeepYieldStrategyAdapter.sol#L185)
```solidity
function harvest()
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 114](src/PancakeV3MasterchefVenue.sol#L114)
```solidity
function open(OpenArgs calldata a)
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 138](src/PancakeV3MasterchefVenue.sol#L138)
```solidity
function close(uint256 positionId, uint256 amount0Min, uint256 amount1Min, uint256 deadline)
```
- Found in src/partners/PartnerRegistry.sol [Line: 93](src/partners/PartnerRegistry.sol#L93)
```solidity
function setFactory(address factory_) external override onlyRole(ADMIN_ROLE) {
```
## L-11: Unchecked Return
Function returns a value but it is ignored. Consider checking the return value.
50 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 94](src/BeefyCLMAdapter.sol#L94)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/BeefyCLMAdapter.sol [Line: 95](src/BeefyCLMAdapter.sol#L95)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
- Found in src/BeefyCLMAdapter.sol [Line: 96](src/BeefyCLMAdapter.sol#L96)
```solidity
_grantRole(MANAGER_ROLE, manager_);
```
- Found in src/BeefyCLMAdapter.sol [Line: 97](src/BeefyCLMAdapter.sol#L97)
```solidity
_grantRole(GUARDIAN_ROLE, guardian_);
```
- Found in src/BeefyCLMAdapter.sol [Line: 206](src/BeefyCLMAdapter.sol#L206)
```solidity
router.withdrawFromUnderlying(pairedBal, abi.encode(address(pairedToken), address(assetToken)));
```
- Found in src/BeefyCLMAdapter.sol [Line: 349](src/BeefyCLMAdapter.sol#L349)
```solidity
router.withdrawFromUnderlying(pairedBal, abi.encode(address(pairedToken), address(assetToken)));
```
- Found in src/BeefyCLMAdapter.sol [Line: 526](src/BeefyCLMAdapter.sol#L526)
```solidity
router.withdrawFromUnderlying(pairedReceived, abi.encode(address(pairedToken), address(assetToken)));
```
- Found in src/DedicatedVaultMain.sol [Line: 108](src/DedicatedVaultMain.sol#L108)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/DedicatedVaultMain.sol [Line: 109](src/DedicatedVaultMain.sol#L109)
```solidity
_grantRole(KEEPER_ROLE, keeper_);
```
- Found in src/DedicatedVaultMain.sol [Line: 110](src/DedicatedVaultMain.sol#L110)
```solidity
_grantRole(GUARDIAN_ROLE, guardian_);
```
- Found in src/DedicatedVaultMain.sol [Line: 221](src/DedicatedVaultMain.sol#L221)
```solidity
swapperIn.swapAssetToPaired(p.swapAssetIn, p.pairedMinOut, p.deadline);
```
- Found in src/DedicatedVaultMain.sol [Line: 271](src/DedicatedVaultMain.sol#L271)
```solidity
swapper.swapPairedToAsset(pBal, pairedMinOut, swapDeadline);
```
- Found in src/DedicatedVaultMain.sol [Line: 280](src/DedicatedVaultMain.sol#L280)
```solidity
rewardSwapper.swapRewardToAsset(rBal, rewardMinOut, swapDeadline);
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 79](src/DedicatedVaultStrategyAdapter.sol#L79)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 80](src/DedicatedVaultStrategyAdapter.sol#L80)
```solidity
_grantRole(MANAGER_ROLE, manager_);
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 81](src/DedicatedVaultStrategyAdapter.sol#L81)
```solidity
_grantRole(GUARDIAN_ROLE, guardian_);
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 101](src/DedicatedVaultStrategyAdapter.sol#L101)
```solidity
_crystallizeFee();
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 112](src/DedicatedVaultStrategyAdapter.sol#L112)
```solidity
_crystallizeFee();
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 82](src/DeepYieldStrategyAdapter.sol#L82)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 83](src/DeepYieldStrategyAdapter.sol#L83)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 84](src/DeepYieldStrategyAdapter.sol#L84)
```solidity
_grantRole(MANAGER_ROLE, manager_);
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 85](src/DeepYieldStrategyAdapter.sol#L85)
```solidity
_grantRole(GUARDIAN_ROLE, guardian_);
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 147](src/DeepYieldStrategyAdapter.sol#L147)
```solidity
underlyingVault.deposit(assets, address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 155](src/DeepYieldStrategyAdapter.sol#L155)
```solidity
underlyingVault.redeem(shares, address(this), address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 173](src/DeepYieldStrategyAdapter.sol#L173)
```solidity
underlyingVault.withdraw(missing, address(this), address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 203](src/DeepYieldStrategyAdapter.sol#L203)
```solidity
underlyingVault.withdraw(feeAssets - idle, address(this), address(this));
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 213](src/DeepYieldStrategyAdapter.sol#L213)
```solidity
underlyingVault.redeem(shares, address(this), address(this));
```
- Found in src/DeepYieldVault.sol [Line: 50](src/DeepYieldVault.sol#L50)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/DeepYieldVault.sol [Line: 51](src/DeepYieldVault.sol#L51)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
- Found in src/DeepYieldVault.sol [Line: 52](src/DeepYieldVault.sol#L52)
```solidity
_grantRole(GUARDIAN_ROLE, guardian_);
```
- Found in src/FeeSplitter.sol [Line: 106](src/FeeSplitter.sol#L106)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/FeeSplitter.sol [Line: 107](src/FeeSplitter.sol#L107)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 143](src/PancakeV3MasterchefVenue.sol#L143)
```solidity
masterchef.harvest(positionId, address(this));
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 144](src/PancakeV3MasterchefVenue.sol#L144)
```solidity
masterchef.withdraw(positionId, address(this)); // NFT back to venue (ERC721Holder receives)
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 148](src/PancakeV3MasterchefVenue.sol#L148)
```solidity
nfpm.decreaseLiquidity(INfpmVenue.DecreaseLiquidityParams({
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 152](src/PancakeV3MasterchefVenue.sol#L152)
```solidity
nfpm.collect(INfpmVenue.CollectParams({
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 167](src/PancakeV3MasterchefVenue.sol#L167)
```solidity
masterchef.harvest(positionId, address(this)); // CAKE
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 168](src/PancakeV3MasterchefVenue.sol#L168)
```solidity
masterchef.collect(IMasterchefVenue.CollectParams({ // LP fees (staked NFT)
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 172](src/PancakeV3MasterchefVenue.sol#L172)
```solidity
nfpm.collect(INfpmVenue.CollectParams({
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 87](src/partners/PartnerAttributedSplitter.sol#L87)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 88](src/partners/PartnerAttributedSplitter.sol#L88)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
- Found in src/partners/PartnerRegistry.sol [Line: 74](src/partners/PartnerRegistry.sol#L74)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/partners/PartnerRegistry.sol [Line: 75](src/partners/PartnerRegistry.sol#L75)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
- Found in src/partners/PartnerWrapper.sol [Line: 54](src/partners/PartnerWrapper.sol#L54)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/partners/PartnerWrapper.sol [Line: 55](src/partners/PartnerWrapper.sol#L55)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
- Found in src/partners/PartnerWrapper.sol [Line: 102](src/partners/PartnerWrapper.sol#L102)
```solidity
IERC4626(vault).deposit(usdtAmount, address(this));
```
- Found in src/partners/PartnerWrapper.sol [Line: 134](src/partners/PartnerWrapper.sol#L134)
```solidity
IERC4626(vault).redeem(receiptShares, address(this), address(this));
```
- Found in src/partners/PartnerWrapper.sol [Line: 177](src/partners/PartnerWrapper.sol#L177)
```solidity
IERC4626(vault).redeem(excess, address(this), address(this));
```
- Found in src/partners/WrapperFactory.sol [Line: 41](src/partners/WrapperFactory.sol#L41)
```solidity
_grantRole(DEFAULT_ADMIN_ROLE, admin_);
```
- Found in src/partners/WrapperFactory.sol [Line: 42](src/partners/WrapperFactory.sol#L42)
```solidity
_grantRole(ADMIN_ROLE, admin_);
```
## L-12: Unspecific Solidity Pragma
Consider using a specific version of Solidity in your contracts instead of a wide version. For example, instead of `pragma solidity ^0.8.0;`, use `pragma solidity 0.8.0;`
25 Found Instances
- Found in src/BeefyCLMAdapter.sol [Line: 2](src/BeefyCLMAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DedicatedVaultMain.sol [Line: 2](src/DedicatedVaultMain.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DedicatedVaultStrategyAdapter.sol [Line: 2](src/DedicatedVaultStrategyAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DeepYieldStrategyAdapter.sol [Line: 2](src/DeepYieldStrategyAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/DeepYieldVault.sol [Line: 2](src/DeepYieldVault.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/ExcludeIdlePairedQuoter.sol [Line: 2](src/ExcludeIdlePairedQuoter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/FeeSplitter.sol [Line: 2](src/FeeSplitter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/PancakeSwapV3RouterAdapter.sol [Line: 2](src/PancakeSwapV3RouterAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/PancakeV3MasterchefVenue.sol [Line: 2](src/PancakeV3MasterchefVenue.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/PancakeV3SwapAdapter.sol [Line: 2](src/PancakeV3SwapAdapter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IBeefyCLM.sol [Line: 2](src/interfaces/IBeefyCLM.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IDedicatedVenue.sol [Line: 2](src/interfaces/IDedicatedVenue.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IDeepYieldStrategy.sol [Line: 2](src/interfaces/IDeepYieldStrategy.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IFeeSink.sol [Line: 2](src/interfaces/IFeeSink.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPancakeSwapV3.sol [Line: 2](src/interfaces/IPancakeSwapV3.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPartnerAttribution.sol [Line: 2](src/interfaces/IPartnerAttribution.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPartnerRegistry.sol [Line: 2](src/interfaces/IPartnerRegistry.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IPartnerWrapper.sol [Line: 2](src/interfaces/IPartnerWrapper.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IUnderlyingRouter.sol [Line: 2](src/interfaces/IUnderlyingRouter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IUnderlyingVault.sol [Line: 2](src/interfaces/IUnderlyingVault.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/interfaces/IWrapperFactory.sol [Line: 2](src/interfaces/IWrapperFactory.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/PartnerAttributedSplitter.sol [Line: 2](src/partners/PartnerAttributedSplitter.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/PartnerRegistry.sol [Line: 2](src/partners/PartnerRegistry.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/PartnerWrapper.sol [Line: 2](src/partners/PartnerWrapper.sol#L2)
```solidity
pragma solidity ^0.8.24;
```
- Found in src/partners/WrapperFactory.sol [Line: 2](src/partners/WrapperFactory.sol#L2)
```solidity
pragma solidity ^0.8.24;
```