Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Additional Known Issues #1

Open
Equious opened this issue Dec 20, 2023 · 0 comments
Open

Additional Known Issues #1

Equious opened this issue Dec 20, 2023 · 0 comments

Comments

@Equious
Copy link
Contributor

Equious commented Dec 20, 2023

Aderyn Analysis Report

This report was generated by Aderyn, a static analysis tool built by Cyfrin, 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

Files Details

Filepath nSLOC
contracts/core/RewardsInitiator.sol 60
contracts/core/RewardsPool.sol 69
contracts/core/RewardsPoolWSD.sol 50
contracts/core/StakingPool.sol 308
contracts/core/base/RewardsPoolController.sol 102
contracts/core/base/StakingRewardsPool.sol 107
contracts/core/base/Strategy.sol 44
contracts/core/ccip/RESDLTokenBridge.sol 165
contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol 231
contracts/core/ccip/SDLPoolCCIPControllerSecondary.sol 114
contracts/core/ccip/WrappedTokenBridge.sol 165
contracts/core/ccip/base/SDLPoolCCIPController.sol 86
contracts/core/interfaces/IBoostController.sol 4
contracts/core/interfaces/IERC677.sol 9
contracts/core/interfaces/IERC677Receiver.sol 8
contracts/core/interfaces/IERC721Receiver.sol 9
contracts/core/interfaces/IPriorityPool.sol 12
contracts/core/interfaces/IRESDLTokenBridge.sol 5
contracts/core/interfaces/IRewardsPool.sol 7
contracts/core/interfaces/IRewardsPoolController.sol 8
contracts/core/interfaces/ISDLPool.sol 24
contracts/core/interfaces/ISDLPoolCCIPController.sol 21
contracts/core/interfaces/ISDLPoolCCIPControllerPrimary.sol 5
contracts/core/interfaces/IStakingAllowance.sol 6
contracts/core/interfaces/IStakingPool.sol 25
contracts/core/interfaces/IStakingRewardsPool.sol 8
contracts/core/interfaces/IStrategy.sol 19
contracts/core/interfaces/IWrappedLST.sol 8
contracts/core/priorityPool/DistributionOracle.sol 172
contracts/core/priorityPool/PriorityPool.sol 338
contracts/core/sdlPool/LinearBoostController.sol 25
contracts/core/sdlPool/SDLPoolPrimary.sol 184
contracts/core/sdlPool/SDLPoolSecondary.sol 324
contracts/core/sdlPool/base/SDLPool.sol 270
contracts/core/test/CurveMock.sol 41
contracts/core/test/ERC677ReceiverMock.sol 11
contracts/core/test/ERC721ReceiverMock.sol 23
contracts/core/test/Multicall3.sol 157
contracts/core/test/PriorityPoolMock.sol 30
contracts/core/test/RewardsPoolControllerMock.sol 31
contracts/core/test/SDLDependentMock.sol 7
contracts/core/test/SDLPoolCCIPControllerMock.sol 41
contracts/core/test/SDLPoolMock.sol 10
contracts/core/test/StrategyMock.sol 86
contracts/core/test/StrategyMockV2.sol 9
contracts/core/test/WrappedSDTokenMock.sol 34
contracts/core/test/chainlink/CCIPArmProxyMock.sol 6
contracts/core/test/chainlink/CCIPOffRampMock.sol 43
contracts/core/test/chainlink/CCIPOnRampMock.sol 46
contracts/core/test/chainlink/CCIPTokenPoolMock.sol 15
contracts/core/test/chainlink/CLContractImports0.7.sol 2
contracts/core/test/chainlink/CLContractImports0.8.sol 2
contracts/core/test/chainlink/WrappedNative.sol 8
contracts/core/test/deprecated/DelegatorPool.sol 175
contracts/core/test/deprecated/OwnersRewardsPoolV1.sol 51
contracts/core/test/deprecated/PoolAllowanceV1.sol 22
contracts/core/test/deprecated/PoolOwnersV1.sol 140
contracts/core/test/deprecated/RewardsPoolControllerV1.sol 119
contracts/core/test/deprecated/RewardsPoolV1.sol 59
contracts/core/tokens/LPLMigration.sol 23
contracts/core/tokens/LinkPoolNFT.sol 25
contracts/core/tokens/StakingAllowance.sol 36
contracts/core/tokens/WrappedSDToken.sol 42
contracts/core/tokens/base/ERC677.sol 51
contracts/core/tokens/base/ERC677Upgradeable.sol 52
Total 8224

Issue Summary

Category No. of Issues
Critical 0
High 1
Medium 2
Low 5
NC 4

High Issues

H-1: Arbitrary from passed to transferFrom (or safeTransferFrom)

Passing an arbitrary from address to transferFrom (or safeTransferFrom) can lead to loss of funds, because anyone can transfer tokens from the from address if an approval is made.

  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 188

                 linkToken.safeTransferFrom(_sender, address(this), fees);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 260

                 IERC20Upgradeable(address(stakingPool)).safeTransferFrom(account, address(this), toWithdraw);
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 270

             sdlToken.safeTransferFrom(delegatorPool, address(this), _amount);
  • Found in contracts/core/test/SDLPoolCCIPControllerMock.sol Line: 43

             sdlToken.safeTransferFrom(reSDLTokenBridge, address(sdlPool), _reSDLToken.amount);

Medium Issues

M-1: Centralization Risk for trusted owners

Contracts have owners with privileged rights to perform admin tasks and need to be trusted to not perform malicious updates or drain funds.

  • Found in contracts/core/RewardsInitiator.sol Line: 16

     contract RewardsInitiator is Ownable {
  • Found in contracts/core/RewardsInitiator.sol Line: 101

         function whitelistCaller(address _caller, bool _shouldWhitelist) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 123

         function strategyDeposit(uint256 _index, uint256 _amount) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 133

         function strategyWithdraw(uint256 _index, uint256 _amount) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 226

         function addStrategy(address _strategy) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 237

         function removeStrategy(uint256 _index, bytes memory _strategyUpdateData) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 261

         function reorderStrategies(uint256[] calldata _newOrder) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 281

         function addFee(address _receiver, uint256 _feeBasisPoints) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 296

         ) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 375

         function setPriorityPool(address _priorityPool) external onlyOwner {
  • Found in contracts/core/StakingPool.sol Line: 384

         function setRewardsInitiator(address _rewardsInitiator) external onlyOwner {
  • Found in contracts/core/base/RewardsPoolController.sol Line: 154

         function addToken(address _token, address _rewardsPool) public virtual onlyOwner {
  • Found in contracts/core/base/RewardsPoolController.sol Line: 171

         function removeToken(address _token) external onlyOwner {
  • Found in contracts/core/base/RewardsPoolController.sol Line: 197

         function _authorizeUpgrade(address) internal override onlyOwner {}
  • Found in contracts/core/base/StakingRewardsPool.sol Line: 209

         function _authorizeUpgrade(address) internal override onlyOwner {}
  • Found in contracts/core/base/Strategy.sol Line: 84

         function _authorizeUpgrade(address) internal override onlyOwner {}
  • Found in contracts/core/ccip/RESDLTokenBridge.sol Line: 16

     contract RESDLTokenBridge is Ownable {
  • Found in contracts/core/ccip/RESDLTokenBridge.sol Line: 161

         function setExtraArgs(uint64 _chainSelector, bytes calldata _extraArgs) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 156

         ) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 170

         function removeWhitelistedChain(uint64 _chainSelector) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 190

         function approveRewardTokens(address[] calldata _tokens) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 202

         function setWrappedRewardToken(address _token, address _wrappedToken) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 212

         function setUpdateExtraArgs(uint64 _chainSelector, bytes calldata _updateExtraArgs) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 223

         function setRewardsExtraArgs(uint64 _chainSelector, bytes calldata _rewardsExtraArgs) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 234

         function setRewardsInitiator(address _rewardsInitiator) external onlyOwner {
  • Found in contracts/core/ccip/SDLPoolCCIPControllerSecondary.sol Line: 108

         function setExtraArgs(bytes calldata _extraArgs) external onlyOwner {
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 19

     contract WrappedTokenBridge is Ownable, CCIPReceiver {
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 112

         ) external payable onlyOwner returns (bytes32 messageId) {
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 140

         function recoverTokens(address[] calldata _tokens, address _receiver) external onlyOwner {
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 13

     abstract contract SDLPoolCCIPController is Ownable, CCIPReceiver {
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 117

         function recoverTokens(address[] calldata _tokens, address _receiver) external onlyOwner {
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 130

         function setMaxLINKFee(uint256 _maxLINKFee) external onlyOwner {
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 138

         function setRESDLTokenBridge(address _reSDLTokenBridge) external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 10

     contract DistributionOracle is ChainlinkClient, Ownable {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 142

         function pauseForUpdate() external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 151

         function requestUpdate() external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 182

         function executeManualVerification() external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 197

         function rejectManualVerificationAndRetry() external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 208

         function cancelRequest(bytes32 _requestId, uint256 _expiration) external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 217

         function withdrawLink(uint256 _amount) external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 233

         ) external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 243

         function toggleManualVerification() external onlyOwner {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 253

         function setChainlinkParams(bytes32 _jobId, uint256 _fee) external onlyOwner {
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 437

         function setPoolStatus(PoolStatus _status) external onlyOwner {
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 447

         function setPoolStatusClosed() external onlyOwner {
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 458

         function setQueueDepositParams(uint128 _queueDepositMin, uint128 _queueDepositMax) external onlyOwner {
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 468

         function setDistributionOracle(address _distributionOracle) external onlyOwner {
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 572

         function _authorizeUpgrade(address) internal override onlyOwner {}
  • Found in contracts/core/sdlPool/LinearBoostController.sol Line: 10

     contract LinearBoostController is Ownable {
  • Found in contracts/core/sdlPool/LinearBoostController.sol Line: 45

         function setMaxLockingDuration(uint64 _maxLockingDuration) external onlyOwner {
  • Found in contracts/core/sdlPool/LinearBoostController.sol Line: 56

         function setMaxBoost(uint64 _maxBoost) external onlyOwner {
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 336

         function addToken(address _token, address _rewardsPool) public override onlyOwner {
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 363

         function setBaseURI(string calldata _baseURI) external onlyOwner {
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 372

         function setBoostController(address _boostController) external onlyOwner {
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 381

         function setCCIPController(address _ccipController) external onlyOwner {
  • Found in contracts/core/test/StrategyMock.sol Line: 101

         function setMaxDeposits(uint256 _maxDeposits) external onlyOwner {
  • Found in contracts/core/test/StrategyMock.sol Line: 105

         function setMinDeposits(uint256 _minDeposits) external onlyOwner {
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 200

         function setLockedApproval(address _account, uint256 _amount) external onlyOwner {
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 210

         function burnLockedBalance(address _account, uint256 _amount) external onlyOwner {
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 230

         function setPoolRouter(address _poolRouter) external onlyOwner {
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 240

         function setCommunityPool(address _pool, bool _isCommunityPool) external onlyOwner {
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 249

         function retireDelegatorPool(address[] calldata _lockedAddresses, address _sdlPool) external onlyOwner {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 31

     contract PoolOwnersV1 is ReentrancyGuard, Ownable {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 161

         ) external onlyOwner {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 174

         function removeRewardToken(uint16 _index) external onlyOwner {
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 178

         function addToken(address _token, address _rewardsPool) public onlyOwner {
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 195

         function removeToken(address _token) external onlyOwner {
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 221

         function _authorizeUpgrade(address) internal override onlyOwner {}
  • Found in contracts/core/tokens/LinkPoolNFT.sol Line: 12

     contract LinkPoolNFT is ERC721URIStorage, Ownable {
  • Found in contracts/core/tokens/LinkPoolNFT.sol Line: 37

         function setBaseURI(string memory _baseUri) external onlyOwner {
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 12

     contract StakingAllowance is ERC677, Ownable {
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 20

         function mint(address _account, uint256 _amount) public onlyOwner {
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 35

         ) public onlyOwner {

M-2: Using ERC721::_mint() can be dangerous

Using ERC721::_mint() can mint ERC721 tokens to addresses which don't support ERC721 tokens. Use _safeMint() instead of _mint() for ERC721.

  • Found in contracts/core/StakingPool.sol Line: 86

             _mint(_account, _amount);
  • Found in contracts/core/test/chainlink/WrappedNative.sol Line: 10

             _mint(msg.sender, msg.value);
  • Found in contracts/core/test/deprecated/RewardsPoolV1.sol Line: 81

                 _mint(_account, toMint);
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 21

             _mint(_account, _amount);
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 36

             _mint(msg.sender, _amount);
  • Found in contracts/core/tokens/base/ERC677.sol Line: 14

             _mint(msg.sender, _totalSupply * (10**uint256(decimals())));
  • Found in contracts/core/tokens/base/ERC677Upgradeable.sol Line: 15

             _mint(msg.sender, _totalSupply * (10**uint256(decimals())));

Low Issues

L-1: Deprecated OpenZeppelin functions should not be used

Openzeppelin has deprecated several functions and replaced with newer versions. Please consult https://docs.openzeppelin.com/

  • Found in contracts/core/StakingPool.sol Line: 228

             token.safeApprove(_strategy, type(uint256).max);
  • Found in contracts/core/StakingPool.sol Line: 254

             token.safeApprove(address(strategy), 0);

L-2: Unsafe ERC20 Operations should not be used

ERC20 functions may not behave as expected. For example: return values are not always meaningful. It is recommended to use OpenZeppelin's SafeERC20 library.

  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 71

             linkToken.approve(_router, type(uint256).max);
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 72

             token.approve(_wrappedToken, type(uint256).max);
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 73

             wrappedToken.approve(_router, type(uint256).max);
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 52

             linkToken.approve(_router, type(uint256).max);
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 53

             sdlToken.approve(_router, type(uint256).max);
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 219

             if (link.transfer(msg.sender, _amount) != true) revert InsufficientBalance();
  • Found in contracts/core/test/CurveMock.sol Line: 52

             tokens[i].transferFrom(msg.sender, address(this), _dx);
  • Found in contracts/core/test/CurveMock.sol Line: 53

             tokens[j].transfer(_receiver, _dx);
  • Found in contracts/core/test/WrappedSDTokenMock.sol Line: 42

             sdToken.transfer(msg.sender, unwrappedAmount);
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 251

             allowanceToken.approve(_sdlPool, type(uint256).max);
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 72

             super.transfer(_to, _value);
  • Found in contracts/core/tokens/WrappedSDToken.sol Line: 41

             sdToken.transferFrom(msg.sender, address(this), _amount);
  • Found in contracts/core/tokens/WrappedSDToken.sol Line: 53

             sdToken.transfer(msg.sender, unwrappedAmount);
  • Found in contracts/core/tokens/base/ERC677.sol Line: 22

             super.transfer(_to, _value);
  • Found in contracts/core/tokens/base/ERC677Upgradeable.sol Line: 23

             super.transfer(_to, _value);

L-3: Solidity pragma should be specific, not wide

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;

  • Found in contracts/core/test/chainlink/CLContractImports0.7.sol Line: 2

     pragma solidity ^0.7.0;
  • Found in contracts/core/test/chainlink/CLContractImports0.8.sol Line: 2

     pragma solidity ^0.8.0;

L-4: Conditional storage checks are not consistent

When writing require or if conditionals that check storage values, it is important to be consistent to prevent off-by-one errors. There are instances found where the same storage variable is checked multiple times, but the conditionals are not consistent.

  • Found in contracts/core/StakingPool.sol Line: 201

             if (max <= totalStaked) {
  • Found in contracts/core/StakingPool.sol Line: 204

                 return max - totalStaked;
  • Found in contracts/core/StakingPool.sol Line: 218

                 return totalStaked - min;
  • Found in contracts/core/StakingPool.sol Line: 333

             if (totalFees >= totalStaked) {
  • Found in contracts/core/StakingPool.sol Line: 469

                 uint256 sharesToMint = (totalFeeAmounts * totalShares) / (totalStaked - totalFeeAmounts);
  • Found in contracts/core/base/StakingRewardsPool.sol Line: 82

             if (totalShares == 0) {
  • Found in contracts/core/base/StakingRewardsPool.sol Line: 85

                 return (_amount * _totalStaked()) / totalShares;
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 102

                 priorityPool.depositsSinceLastUpdate() >= minDepositsSinceLastUpdate;
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 129

                 if (priorityPool.depositsSinceLastUpdate() < minDepositsSinceLastUpdate) revert UpdateConditionsNotMet();
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 248

                 uint256 canUnqueue = queuedTokens <= totalQueued ? queuedTokens : totalQueued;
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 282

             if (_amountToUnqueue > totalQueued) revert InsufficientQueuedTokens();
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 349

                     (totalQueued + unusedDeposits) >= queueDepositMin,
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 439

             if (_status == poolStatus) revert StatusAlreadySet();
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 485

             if (poolStatus != PoolStatus.OPEN) revert DepositsDisabled();
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 489

             if (totalQueued == 0) {
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 522

             uint256 toWithdrawFromQueue = _amount <= totalQueued ? _amount : totalQueued;
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 542

             if (poolStatus != PoolStatus.OPEN) revert DepositsDisabled();
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 36

             if (delegatorPool == address(0)) {
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 238

                 mintStartIndex = lastLockId + 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 269

             if (msg.sender != delegatorPool) revert SenderNotAuthorized();
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 286

             uint256 lockId = lastLockId + 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 341

                 if (newLastLockId > lastLockId) lastLockId = newLastLockId;
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 118

             if (msg.sender != ccipController) revert SenderNotAuthorized();
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 462

             if (_to == ccipController) revert TransferToCCIPController();
  • Found in contracts/core/test/StrategyMock.sol Line: 70

                 if (feeBasisPoints > 0) {
  • Found in contracts/core/test/StrategyMock.sol Line: 74

                     amounts[0] = (feeBasisPoints * uint256(depositChange)) / 10000;
  • Found in contracts/core/test/WrappedSDTokenMock.sol Line: 51

             return _amount / multiplier;
  • Found in contracts/core/test/WrappedSDTokenMock.sol Line: 60

             return _amount * multiplier;
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 87

             require(sdlPool == address(0), "Deposits disabled");
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 284

             require(sdlPool != address(0), "Cannot migrate until contract is retired");
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 56

             for (uint16 i = 0; i < totalRewardTokens; i++) {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 128

             for (uint16 i = 0; i < totalRewardTokens; i++) {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 175

             require(_index < totalRewardTokens, "Reward token does not exist");
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 177

             if (totalRewardTokens > 1) {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 180

             delete rewardTokens[totalRewardTokens - 1];
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 214

             for (uint16 i = 0; i < totalRewardTokens; i++) {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 230

             for (uint16 i = 0; i < totalRewardTokens; i++) {
  • Found in contracts/core/test/deprecated/RewardsPoolV1.sol Line: 43

                 (stakingDerivative.balanceOf(_account) * (rewardPerToken - userRewardPerTokenPaid[_account])) /
  • Found in contracts/core/test/deprecated/RewardsPoolV1.sol Line: 71

             rewardPerToken = rewardPerToken + ((_reward * 1e18) / stakingDerivative.totalSupply());

L-5: PUSH0 is not supported by all chains

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.

  • Found in contracts/core/test/chainlink/CLContractImports0.8.sol Line: 2

     pragma solidity ^0.8.0;

NC Issues

NC-1: Missing checks for address(0) when assigning values to address state variables

Assigning values to address state variables without checking for address(0).

  • Found in contracts/core/StakingPool.sol Line: 376

             priorityPool = _priorityPool;
  • Found in contracts/core/StakingPool.sol Line: 385

             rewardsInitiator = _rewardsInitiator;
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 235

             rewardsInitiator = _rewardsInitiator;
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 139

             reSDLTokenBridge = _reSDLTokenBridge;
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 469

             distributionOracle = _distributionOracle;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 39

                 delegatorPool = ccipController;
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 382

             ccipController = _ccipController;
  • Found in contracts/core/test/SDLPoolCCIPControllerMock.sol Line: 52

             reSDLTokenBridge = _reSDLTokenBridge;
  • Found in contracts/core/test/chainlink/CCIPOnRampMock.sol Line: 30

             linkToken = _linkToken;
  • Found in contracts/core/test/deprecated/OwnersRewardsPoolV1.sol Line: 26

             poolOwners = _poolOwners;
  • Found in contracts/core/test/deprecated/PoolAllowanceV1.sol Line: 18

             poolOwners = _poolOwners;
  • Found in contracts/core/tokens/LPLMigration.sol Line: 22

             lplToken = _lplToken;
  • Found in contracts/core/tokens/LPLMigration.sol Line: 23

             sdlToken = _sdlToken;
  • Found in contracts/core/tokens/LinkPoolNFT.sol Line: 18

             lpMigration = _lpMigration;

NC-2: Functions not used internally could be marked external

  • Found in contracts/core/RewardsPoolWSD.sol Line: 33

         function withdrawableRewards(address _account) public view override returns (uint256) {
  • Found in contracts/core/RewardsPoolWSD.sol Line: 49

         function distributeRewards() public override {
  • Found in contracts/core/StakingPool.sol Line: 41

         function initialize(
  • Found in contracts/core/base/RewardsPoolController.sol Line: 102

         function distributeTokens(address[] memory _tokens) public {
  • Found in contracts/core/base/RewardsPoolController.sol Line: 142

         function withdrawRewards(address[] memory _tokens) public {
  • Found in contracts/core/base/RewardsPoolController.sol Line: 154

         function addToken(address _token, address _rewardsPool) public virtual onlyOwner {
  • Found in contracts/core/base/StakingRewardsPool.sol Line: 35

         function totalSupply() public view override returns (uint256) {
  • Found in contracts/core/base/StakingRewardsPool.sol Line: 58

         function sharesOf(address _account) public view returns (uint256) {
  • Found in contracts/core/base/Strategy.sol Line: 36

         function canDeposit() public view virtual returns (uint256) {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 163

         function fulfillRequest(
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 93

         function initialize(
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 30

         function initialize(
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 66

         function initialize(
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 336

         function addToken(address _token, address _rewardsPool) public override onlyOwner {
  • Found in contracts/core/test/Multicall3.sol Line: 41

         function aggregate(Call[] calldata calls) public payable returns (uint256 blockNumber, bytes[] memory returnData) {
  • Found in contracts/core/test/Multicall3.sol Line: 103

         function blockAndAggregate(Call[] calldata calls)
  • Found in contracts/core/test/Multicall3.sol Line: 118

         function aggregate3(Call3[] calldata calls) public payable returns (Result[] memory returnData) {
  • Found in contracts/core/test/Multicall3.sol Line: 151

         function aggregate3Value(Call3Value[] calldata calls) public payable returns (Result[] memory returnData) {
  • Found in contracts/core/test/Multicall3.sol Line: 191

         function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) {
  • Found in contracts/core/test/Multicall3.sol Line: 196

         function getBlockNumber() public view returns (uint256 blockNumber) {
  • Found in contracts/core/test/Multicall3.sol Line: 201

         function getCurrentBlockCoinbase() public view returns (address coinbase) {
  • Found in contracts/core/test/Multicall3.sol Line: 206

         function getCurrentBlockDifficulty() public view returns (uint256 difficulty) {
  • Found in contracts/core/test/Multicall3.sol Line: 211

         function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {
  • Found in contracts/core/test/Multicall3.sol Line: 216

         function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {
  • Found in contracts/core/test/Multicall3.sol Line: 221

         function getEthBalance(address addr) public view returns (uint256 balance) {
  • Found in contracts/core/test/Multicall3.sol Line: 226

         function getLastBlockHash() public view returns (bytes32 blockHash) {
  • Found in contracts/core/test/Multicall3.sol Line: 234

         function getBasefee() public view returns (uint256 basefee) {
  • Found in contracts/core/test/Multicall3.sol Line: 239

         function getChainId() public view returns (uint256 chainid) {
  • Found in contracts/core/test/RewardsPoolControllerMock.sol Line: 23

         function initialize(address _token) public initializer {
  • Found in contracts/core/test/SDLPoolMock.sol Line: 15

         function setEffectiveBalance(address _account, uint256 _amount) public {
  • Found in contracts/core/test/StrategyMock.sol Line: 28

         function initialize(
  • Found in contracts/core/test/StrategyMock.sol Line: 89

         function getTotalDeposits() public view override returns (uint256) {
  • Found in contracts/core/test/StrategyMock.sol Line: 93

         function getMaxDeposits() public view override returns (uint256) {
  • Found in contracts/core/test/StrategyMock.sol Line: 97

         function getMinDeposits() public view override returns (uint256) {
  • Found in contracts/core/test/StrategyMock.sol Line: 109

         function createRewardsPool(address _token) public {
  • Found in contracts/core/test/chainlink/CCIPOnRampMock.sol Line: 45

         function getPoolBySourceToken(address _token) public view returns (address) {
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 56

         function initialize(
  • Found in contracts/core/test/deprecated/OwnersRewardsPoolV1.sol Line: 33

         function withdraw(uint256 _amount) public virtual override {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 85

         function totalSupply() public view returns (uint256) {
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 126

         function distributeTokens(address[] memory _tokens) public {
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 166

         function withdrawRewards(address[] memory _tokens) public {
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 178

         function addToken(address _token, address _rewardsPool) public onlyOwner {
  • Found in contracts/core/test/deprecated/RewardsPoolV1.sol Line: 60

         function withdraw(uint256 _amount) public virtual nonReentrant {
  • Found in contracts/core/tokens/LPLMigration.sol Line: 31

         function onTokenTransfer(
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 20

         function mint(address _account, uint256 _amount) public onlyOwner {
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 30

         function mintToContract(
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 44

         function burn(uint256 _amount) public {
  • Found in contracts/core/tokens/StakingAllowance.sol Line: 52

         function burnFrom(address account, uint256 amount) public {
  • Found in contracts/core/tokens/base/ERC677.sol Line: 17

         function transferAndCall(
  • Found in contracts/core/tokens/base/ERC677Upgradeable.sol Line: 18

         function transferAndCall(

NC-3: Constants should be defined and used instead of literals

  • Found in contracts/core/RewardsPool.sol Line: 41

                 1e18 +
  • Found in contracts/core/RewardsPool.sol Line: 119

             rewardPerToken += ((_reward * 1e18) / totalStaked);
  • Found in contracts/core/StakingPool.sol Line: 51

             require(_totalFeesBasisPoints() <= 5000, "Total fees must be <= 50%");
  • Found in contracts/core/StakingPool.sol Line: 240

             uint256[] memory idxs = new uint256[](1);
  • Found in contracts/core/StakingPool.sol Line: 250

             for (uint256 i = _index; i < strategies.length - 1; i++) {
  • Found in contracts/core/StakingPool.sol Line: 251

                 strategies[i] = strategies[i + 1];
  • Found in contracts/core/StakingPool.sol Line: 283

             require(_totalFeesBasisPoints() <= 5000, "Total fees must be <= 50%");
  • Found in contracts/core/StakingPool.sol Line: 300

                 fees[_index] = fees[fees.length - 1];
  • Found in contracts/core/StakingPool.sol Line: 307

             require(_totalFeesBasisPoints() <= 5000, "Total fees must be <= 50%");
  • Found in contracts/core/StakingPool.sol Line: 329

                     totalFees += (uint256(totalRewards) * fees[i].basisPoints) / 10000;
  • Found in contracts/core/StakingPool.sol Line: 406

                 IStrategy strategy = IStrategy(strategies[i - 1]);
  • Found in contracts/core/StakingPool.sol Line: 428

             address[][] memory receivers = new address[][](strategies.length + 1);
  • Found in contracts/core/StakingPool.sol Line: 429

             uint256[][] memory feeAmounts = new uint256[][](strategies.length + 1);
  • Found in contracts/core/StakingPool.sol Line: 453

                 receivers[receivers.length - 1] = new address[](fees.length);
  • Found in contracts/core/StakingPool.sol Line: 454

                 feeAmounts[feeAmounts.length - 1] = new uint256[](fees.length);
  • Found in contracts/core/StakingPool.sol Line: 458

                     receivers[receivers.length - 1][i] = fees[i].receiver;
  • Found in contracts/core/StakingPool.sol Line: 459

                     feeAmounts[feeAmounts.length - 1][i] = (uint256(totalRewards) * fees[i].basisPoints) / 10000;
  • Found in contracts/core/StakingPool.sol Line: 460

                     totalFeeAmounts += feeAmounts[feeAmounts.length - 1][i];
  • Found in contracts/core/StakingPool.sol Line: 475

                         if (feesPaidCount == totalFeeCount - 1) {
  • Found in contracts/core/base/RewardsPoolController.sol Line: 178

                     tokens[i] = tokens[tokens.length - 1];
  • Found in contracts/core/base/StakingRewardsPool.sol Line: 46

             if (balance < 100) {
  • Found in contracts/core/ccip/RESDLTokenBridge.sol Line: 212

             Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 82

                     uint256 rewards = j == numDestinations - 1
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 176

                     whitelistedChains[i] = whitelistedChains[whitelistedChains.length - 1];
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 302

                 reSDLSupplyByChain[sourceChainSelector] -= uint256(-1 * totalRESDLSupplyChange);
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 128

                 1000 ether,
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 215

             Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1);
  • Found in contracts/core/ccip/WrappedTokenBridge.sol Line: 235

             if (_message.destTokenAmounts.length != 1) revert InvalidMessage();
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 105

             if (_message.destTokenAmounts.length == 1 && _message.destTokenAmounts[0].token == address(sdlToken)) {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 89

             manualVerificationRequired = 1;
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 170

             if (manualVerificationRequired == 1) {
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 172

                 awaitingManualVerification = 1;
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 244

             manualVerificationRequired = manualVerificationRequired == 1 ? 0 : 1;
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 265

             if (awaitingManualVerification == 1) revert AwaitingManualVerification();
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 280

             if (status.requestInProgress == 1) revert RequestInProgress();
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 281

             if (awaitingManualVerification == 1) revert AwaitingManualVerification();
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 283

             updateStatus.requestInProgress = 1;
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 502

                     accountIndexes[_account] = accounts.length - 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 35

         ) public reinitializer(2) {
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 109

             uint64 halfDuration = locks[_lockId].duration / 2;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 153

                 balances[msg.sender] -= 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 188

             balances[_sender] -= 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 216

             balances[_receiver] += 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 238

                 mintStartIndex = lastLockId + 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 246

                 effectiveBalances[ccipController] -= uint256(-1 * _totalRESDLSupplyChange);
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 247

                 totalEffectiveBalance -= uint256(-1 * _totalRESDLSupplyChange);
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 286

             uint256 lockId = lastLockId + 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 290

             balances[_owner] += 1;
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 322

                 effectiveBalances[_owner] -= uint256(-1 * diffTotalAmount);
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 323

                 totalEffectiveBalance -= uint256(-1 * diffTotalAmount);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 74

             updateBatchIndex = 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 184

             uint64 halfDuration = lock.duration / 2;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 197

             if (updateNeeded == 0) updateNeeded = 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 236

             if (updateNeeded == 0) updateNeeded = 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 270

             balances[_sender] -= 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 298

             balances[_receiver] += 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 314

             if (updateInProgress == 1) revert UpdateInProgress();
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 321

             updateInProgress = 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 325

             emit OutgoingUpdate(updateBatchIndex - 1, numNewQueuedLocks, reSDLSupplyChange);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 340

                 uint256 newLastLockId = _mintStartIndex + queuedNewLocks[updateBatchIndex - 1].length - 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 346

             emit IncomingUpdate(updateBatchIndex - 1, _mintStartIndex);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 354

             return updateNeeded == 1 && updateInProgress == 0;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 372

             newLocksByOwner[_owner].push(NewLockPointer(updateBatchIndex, uint128(queuedNewLocks[updateBatchIndex].length - 1)));
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 374

             if (updateNeeded == 0) updateNeeded = 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 395

                 currentMintLockIdByBatch[newLockPointer.updateBatchIndex] += 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 399

                 balances[_owner] += 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 440

             if (updateNeeded == 0) updateNeeded = 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 469

                         emit Withdraw(_owner, lockId, uint256(-1 * baseAmountDiff));
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 473

                             balances[_owner] -= 1;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 479

                         sdlToken.safeTransfer(_owner, uint256(-1 * baseAmountDiff));
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 522

                 return queuedLockUpdates[_lockId][updatesLength - 1].lock;
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 533

             return currentMintLockIdByBatch.length - 1;
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 183

             for (uint256 i = 1; i <= maxLockId; ++i) {
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 473

             balances[_from] -= 1;
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 474

             balances[_to] += 1;
  • Found in contracts/core/test/CurveMock.sol Line: 15

             tokens[1] = IERC20(_tokenB);
  • Found in contracts/core/test/CurveMock.sol Line: 33

             require(_i < 2 && _j < 2, "Invalid token indexes");
  • Found in contracts/core/test/CurveMock.sol Line: 45

                 j = 1;
  • Found in contracts/core/test/CurveMock.sol Line: 49

                 i = 1;
  • Found in contracts/core/test/Multicall3.sol Line: 228

                 blockHash = blockhash(block.number - 1);
  • Found in contracts/core/test/StrategyMock.sol Line: 71

                     receivers = new address[](1);
  • Found in contracts/core/test/StrategyMock.sol Line: 72

                     amounts = new uint256[](1);
  • Found in contracts/core/test/StrategyMock.sol Line: 74

                     amounts[0] = (feeBasisPoints * uint256(depositChange)) / 10000;
  • Found in contracts/core/test/StrategyMock.sol Line: 77

                 totalDeposits -= uint256(depositChange * -1);
  • Found in contracts/core/test/StrategyMockV2.sol Line: 15

             return 2;
  • Found in contracts/core/test/WrappedSDTokenMock.sol Line: 16

             multiplier = 2;
  • Found in contracts/core/test/chainlink/CCIPOffRampMock.sol Line: 48

                 1000000,
  • Found in contracts/core/test/chainlink/CCIPOnRampMock.sol Line: 34

             return requestMessages[requestMessages.length - 1];
  • Found in contracts/core/test/chainlink/CCIPOnRampMock.sol Line: 38

             return requestData[requestData.length - 1];
  • Found in contracts/core/test/chainlink/CCIPOnRampMock.sol Line: 42

             return _message.feeToken == linkToken ? 2 ether : 3 ether;
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 61

         ) public reinitializer(2) {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 177

             if (totalRewardTokens > 1) {
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 178

                 rewardTokens[_index] = rewardTokens[totalRewardTokens - 1];
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 180

             delete rewardTokens[totalRewardTokens - 1];
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 202

                     tokens[i] = tokens[tokens.length - 1];
  • Found in contracts/core/test/deprecated/RewardsPoolV1.sol Line: 44

                 1e18 +
  • Found in contracts/core/test/deprecated/RewardsPoolV1.sol Line: 71

             rewardPerToken = rewardPerToken + ((_reward * 1e18) / stakingDerivative.totalSupply());
  • Found in contracts/core/tokens/base/ERC677.sol Line: 14

             _mint(msg.sender, _totalSupply * (10**uint256(decimals())));
  • Found in contracts/core/tokens/base/ERC677Upgradeable.sol Line: 15

             _mint(msg.sender, _totalSupply * (10**uint256(decimals())));

NC-4: Event is missing indexed fields

Index event fields make the field more quickly accessible to off-chain tools that parse events. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields). Each event should use three indexed fields if there are three or more fields, and gas usage is not particularly of concern for the events in question. If there are fewer than three fields, all of the fields should be indexed.

  • Found in contracts/core/RewardsInitiator.sol Line: 22

         event WhitelistCaller(address indexed caller, bool shouldWhitelist);
  • Found in contracts/core/RewardsPool.sol Line: 25

         event Withdraw(address indexed account, uint256 amount);
  • Found in contracts/core/RewardsPool.sol Line: 26

         event DistributeRewards(address indexed sender, uint256 amountStaked, uint256 amount);
  • Found in contracts/core/StakingPool.sol Line: 32

         event UpdateStrategyRewards(address indexed account, uint256 totalStaked, int rewardsAmount, uint256 totalFees);
  • Found in contracts/core/base/RewardsPoolController.sol Line: 22

         event AddToken(address indexed token, address rewardsPool);
  • Found in contracts/core/base/RewardsPoolController.sol Line: 23

         event RemoveToken(address indexed token, address rewardsPool);
  • Found in contracts/core/ccip/RESDLTokenBridge.sol Line: 43

         event SetExtraArgs(uint64 indexed chainSelector, bytes extraArgs);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 25

         event DistributeRewards(bytes32 indexed messageId, uint64 indexed destinationChainSelector, uint256 fees);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 26

         event ChainAdded(uint64 indexed chainSelector, address destination, bytes updateExtraArgs, bytes rewardsExtraArgs);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 27

         event ChainRemoved(uint64 indexed chainSelector, address destination);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 28

         event SetUpdateExtraArgs(uint64 indexed chainSelector, bytes extraArgs);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 29

         event SetRewardsExtraArgs(uint64 indexed chainSelector, bytes extraArgs);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerPrimary.sol Line: 30

         event SetWrappedRewardToken(address indexed token, address rewardToken);
  • Found in contracts/core/ccip/SDLPoolCCIPControllerSecondary.sol Line: 23

         event SetExtraArgs(bytes extraArgs);
  • Found in contracts/core/ccip/base/SDLPoolCCIPController.sol Line: 24

         event MessageSent(bytes32 indexed messageId, uint64 indexed destinationChainSelector, uint256 fees);
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 46

         event SetUpdateParams(uint64 minTimeBetweenUpdates, uint128 minDepositsSinceLastUpdate, uint64 minBlockConfirmations);
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 47

         event SetChainlinkParams(bytes32 jobId, uint256 fee);
  • Found in contracts/core/priorityPool/DistributionOracle.sol Line: 48

         event ToggleManualVerification(uint128 manualVerificationRequired);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 52

         event UnqueueTokens(address indexed account, uint256 amount);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 53

         event ClaimLSDTokens(address indexed account, uint256 amount, uint256 amountWithYield);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 54

         event Deposit(address indexed account, uint256 poolAmount, uint256 queueAmount);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 55

         event Withdraw(address indexed account, uint256 amount);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 56

         event UpdateDistribution(
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 62

         event SetPoolStatus(PoolStatus status);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 63

         event SetQueueDepositParams(uint128 queueDepositMin, uint128 queueDepositMax);
  • Found in contracts/core/priorityPool/PriorityPool.sol Line: 64

         event DepositQueuedTokens(uint256 amount);
  • Found in contracts/core/sdlPool/LinearBoostController.sol Line: 14

         event SetMaxLockingDuration(uint256 _maxLockingDuration);
  • Found in contracts/core/sdlPool/LinearBoostController.sol Line: 15

         event SetMaxBoost(uint256 _maxBoost);
  • Found in contracts/core/sdlPool/SDLPoolPrimary.sol Line: 16

         event IncomingUpdate(uint256 numNewRESDLTokens, int256 totalRESDLSupplyChange, uint256 mintStartIndex);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 35

         event QueueInitiateUnlock(address indexed owner, uint256 indexed lockId, uint64 expiry);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 36

         event QueueWithdraw(address indexed owner, uint256 indexed lockId, uint256 amount);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 37

         event QueueCreateLock(address indexed owner, uint256 amount, uint256 boostAmount, uint64 lockingDuration);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 38

         event QueueUpdateLock(
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 45

         event OutgoingUpdate(uint128 indexed batchIndex, uint256 numNewQueuedLocks, int256 reSDLSupplyChange);
  • Found in contracts/core/sdlPool/SDLPoolSecondary.sol Line: 46

         event IncomingUpdate(uint128 indexed batchIndex, uint256 mintStartIndex);
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 47

         event InitiateUnlock(address indexed owner, uint256 indexed lockId, uint64 expiry);
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 48

         event Withdraw(address indexed owner, uint256 indexed lockId, uint256 amount);
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 49

         event CreateLock(
  • Found in contracts/core/sdlPool/base/SDLPool.sol Line: 56

         event UpdateLock(
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 47

         event AllowanceStaked(address indexed user, uint256 amount);
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 48

         event AllowanceWithdrawn(address indexed user, uint256 amount);
  • Found in contracts/core/test/deprecated/DelegatorPool.sol Line: 49

         event Migration(address indexed user, uint256 amount);
  • Found in contracts/core/test/deprecated/OwnersRewardsPoolV1.sol Line: 18

         event RewardDistributed(address indexed sender, uint256 amountStaked, uint256 amount);
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 44

         event Staked(address indexed user, uint256 amount);
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 45

         event Withdrawn(address indexed user, uint256 amount);
  • Found in contracts/core/test/deprecated/PoolOwnersV1.sol Line: 48

         event RewardTokenAdded(address indexed token, address allowanceToken, address rewardsPool);
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 27

         event AddToken(address indexed token, address rewardsPool);
  • Found in contracts/core/test/deprecated/RewardsPoolControllerV1.sol Line: 28

         event RemoveToken(address indexed token, address rewardsPool);
  • Found in contracts/core/test/deprecated/RewardsPoolV1.sol Line: 24

         event Withdrawn(address indexed user, uint256 amount);
  • Found in contracts/core/tokens/LPLMigration.sol Line: 19

         event LPLMigrated(address indexed sender, uint256 amount);
@alexroan alexroan reopened this Dec 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants