Part 2

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

Missing state in DexSwapStrategy :: Data struct

[H-2] Missing state in DexSwapStrategy :: Data struct

Description: According to netspac in DexSwapStrategy :: Data struct, the protocol initially includes baseFeeUsd which is the base fee in usd paid to the protocol fee recipients to cover keeper costs.

This shows baseFeeUsd is a very important state

Impact:
protocol will be missing on fees , which at first was'nt protocol initial plan.

Proof of Concept:

/// @notice DexSwapStrategy data storage struct.
/// @param id The unique identifier of the DexSwapStrategy.
/// @param baseFeeUsd The base fee in usd paid to the protocol fee recipients to cover keeper costs.
/// @param dexAdapter The address of the DexAdapter contract.
// @audit baseFeeUsd was included in the netspac but removed in the struct
struct Data {
uint128 id;
address dexAdapter;
}

Recommended Mitigation:

include the baseFeeUsd back in the Data struct of DexSwapStrategy , and implement any other implementation needed

struct Data {
uint128 id;
uint128 baseFeeUsd
address dexAdapter;
}
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.