Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Invalid

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.
<details><summary>68 Found Instances</summary>
- Found in src/market-making/branches/CreditDelegationBranch.sol [Line: 48]()
```solidity
event LogConvertMarketCreditDepositsToUsdc(
```
- Found in src/market-making/branches/CreditDelegationBranch.sol [Line: 57]()
```solidity
event LogDepositCreditForMarket(
```
- Found in src/market-making/branches/CreditDelegationBranch.sol [Line: 67]()
```solidity
event LogWithdrawUsdTokenFromMarket(
```
- Found in src/market-making/branches/CreditDelegationBranch.sol [Line: 82]()
```solidity
event LogSettleVaultDebt(
```
- Found in src/market-making/branches/CreditDelegationBranch.sol [Line: 95]()
```solidity
event LogRebalanceVaultsAssets(
```
- Found in src/market-making/branches/FeeDistributionBranch.sol [Line: 47]()
```solidity
event LogReceiveMarketFee(address indexed asset, uint128 marketId, uint256 amount);
```
- Found in src/market-making/branches/FeeDistributionBranch.sol [Line: 51]()
```solidity
event LogConvertAccumulatedFeesToWeth(uint256 totalWethX18);
```
- Found in src/market-making/branches/FeeDistributionBranch.sol [Line: 56]()
```solidity
event LogSendWethToFeeRecipients(uint128 indexed marketId, uint256 totalWethReward);
```
- Found in src/market-making/branches/FeeDistributionBranch.sol [Line: 62]()
```solidity
event LogClaimFees(address indexed claimer, uint128 indexed vaultId, uint256 amount);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 49]()
```solidity
event LogRegisterEngine(address engine);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 54]()
```solidity
event LogCreateVault(address indexed sender, uint128 vaultId);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 59]()
```solidity
event LogUpdateVaultConfiguration(address indexed sender, uint128 vaultId);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 64]()
```solidity
event LogConfigureSystemKeeper(address systemKeeper, bool shouldBeEnabled);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 70]()
```solidity
event LogConfigureEngine(address engine, address usdToken, bool shouldBeEnabled);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 78]()
```solidity
event LogConfigureCollateral(
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 88]()
```solidity
event LogConfigureMarket(
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 99]()
```solidity
event LogConfigureDexSwapStrategy(uint128 dexSwapStrategyId, address dexAdapter);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 103]()
```solidity
event LogSetWeth(address weth);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 107]()
```solidity
event LogSetUsdc(address usdc);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 111]()
```solidity
event LogSetSettlementBaseFeeUsdX18(uint128 settlementBaseFeeUsdX18);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 116]()
```solidity
event LogConfigureFeeRecipient(address feeRecipient, uint256 share);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 121]()
```solidity
event LogConfigureVaultConnectedMarkets(uint128 vaultId, uint256[] marketsIds);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 126]()
```solidity
event LogConfigureMarketConnectedVaults(uint128 marketId, uint256[] vaultIds);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 131]()
```solidity
event LogConfigureReferralModule(address sender, address referralModule);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 138]()
```solidity
event LogConfiguredSwapPath(address asset, address[] assets, uint128[] dexSwapStrategyIds, bool enabled);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 143]()
```solidity
event LogConfigureDepositFee(uint128 vaultId, uint256 depositFee);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 148]()
```solidity
event LogConfigureRedeemFee(uint128 vaultId, uint256 redeemFee);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 152]()
```solidity
event LogConfigureVaultDepositAndRedeemFeeRecipient(address vaultDepositAndRedeemFeeRecipient);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 156]()
```solidity
event LogMarketPaused(uint128 marketId);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 160]()
```solidity
event LogMarketUnpaused(uint128 marketId);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 165]()
```solidity
event LogUpdateStabilityConfig(address chainlinkVerifier, uint128 maxVerificationDelay);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 170]()
```solidity
event LogUpdateVaultAssetAllowance(uint128 vaultId, uint256 allowance);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 175]()
```solidity
event LogSetVaultEngine(uint128 vaultId, address engine);
```
- Found in src/market-making/branches/MarketMakingEngineConfigurationBranch.sol [Line: 180]()
```solidity
event LogConfigureWhitelist(address whitelist, bool isWhitelistMode);
```
- Found in src/market-making/branches/StabilityBranch.sol [Line: 36]()
```solidity
event LogInitiateSwap(
```
- Found in src/market-making/branches/StabilityBranch.sol [Line: 47]()
```solidity
event LogRefundSwap(
```
- Found in src/market-making/branches/StabilityBranch.sol [Line: 60]()
```solidity
event LogFulfillSwap(
```
- Found in src/market-making/branches/VaultRouterBranch.sol [Line: 39]()
```solidity
event LogStake(uint256 indexed vaultId, address indexed user, uint256 shares);
```
- Found in src/market-making/branches/VaultRouterBranch.sol [Line: 45]()
```solidity
event LogInitiateWithdrawal(uint256 indexed vaultId, address indexed user, uint128 shares);
```
- Found in src/market-making/branches/VaultRouterBranch.sol [Line: 51]()
```solidity
event LogUnstake(uint256 indexed vaultId, address indexed user, uint256 shares);
```
- Found in src/market-making/branches/VaultRouterBranch.sol [Line: 57]()
```solidity
event LogDeposit(uint256 indexed vaultId, address indexed user, uint256 assets);
```
- Found in src/market-making/branches/VaultRouterBranch.sol [Line: 63]()
```solidity
event LogRedeem(uint256 indexed vaultId, address indexed user, uint256 shares);
```
- Found in src/market-making/leaves/UsdTokenSwapConfig.sol [Line: 17]()
```solidity
event LogUpdateUsdTokenSwapConfig(uint128 baseFeeUsd, uint128 swapSettlementFeeBps, uint128 maxExecutionTime);
```
- Found in src/market-making/leaves/Vault.sol [Line: 46]()
```solidity
event LogUpdateVaultCreditCapacity(
```
- Found in src/perpetuals/branches/LiquidationBranch.sol [Line: 30]()
```solidity
event LogLiquidateAccount(
```
- Found in src/perpetuals/branches/OrderBranch.sol [Line: 48]()
```solidity
event LogCancelAllOffchainOrders(address indexed sender, uint128 indexed tradingAccountId, uint128 newNonce);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 46]()
```solidity
event LogConfigureCollateralLiquidationPriority(address indexed sender, address[] collateralTypes);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 52]()
```solidity
event LogConfigureLiquidators(address indexed sender, address[] liquidators, bool[] enable);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 61]()
```solidity
event LogConfigureMarginCollateral(
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 80]()
```solidity
event LogConfigureSystemParameters(
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 90]()
```solidity
event LogCreatePerpMarket(address indexed sender, uint128 marketId);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 95]()
```solidity
event LogUpdatePerpMarketConfiguration(address indexed sender, uint128 marketId);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 101]()
```solidity
event LogUpdateSettlementConfiguration(
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 107]()
```solidity
event LogEnablePerpMarket(address indexed sender, uint128 marketId);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 111]()
```solidity
event LogDisablePerpMarket(address indexed sender, uint128 marketId);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 116]()
```solidity
event LogConfigureReferralModule(address sender, address referralModule);
```
- Found in src/perpetuals/branches/PerpsEngineConfigurationBranch.sol [Line: 121]()
```solidity
event LogConfigureWhitelist(address whitelist, bool isWhitelistMode);
```
- Found in src/perpetuals/branches/TradingAccountBranch.sol [Line: 45]()
```solidity
event LogCreateTradingAccount(uint128 tradingAccountId, address sender);
```
- Found in src/referral/Referral.sol [Line: 37]()
```solidity
event LogReferralSet(
```
- Found in src/referral/Referral.sol [Line: 48]()
```solidity
event LogCreateCustomReferralCode(address referrer, string customReferralCode);
```
- Found in src/referral/Referral.sol [Line: 53]()
```solidity
event LogConfigureEngine(address engine, bool isEnabled);
```
- Found in src/utils/Whitelist.sol [Line: 27]()
```solidity
event LogUpdateWhitelist(address indexed user, bool isAllowed);
```
- Found in src/utils/dex-adapters/BaseAdapter.sol [Line: 34]()
```solidity
event LogSetDeadline(uint256 deadline);
```
- Found in src/utils/dex-adapters/BaseAdapter.sol [Line: 40]()
```solidity
event LogSetSwapAssetConfig(address indexed asset, uint8 decimals, address priceAdapter);
```
- Found in src/utils/dex-adapters/BaseAdapter.sol [Line: 44]()
```solidity
event LogSetSlippageTolerance(uint256 newSlippageTolerance);
```
- Found in src/utils/dex-adapters/CurveAdapter.sol [Line: 25]()
```solidity
event LogSetPoolFee(uint24 newFee);
```
- Found in src/utils/dex-adapters/UniswapV2Adapter.sol [Line: 27]()
```solidity
event LogSetPoolFee(uint24 newFee);
```
- Found in src/utils/dex-adapters/UniswapV3Adapter.sol [Line: 23]()
```solidity
event LogSetPoolFee(uint24 newFee);
```
</details>
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.