Part 2

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

A critical internal function in Market.sol :: configureConnectedVaults which is used to Configures the vaults ids delegating credit to the market is internal and not called by any external function

[H-1] A critical internal function in Market.sol :: configureConnectedVaults which is used to Configures the vaults ids delegating credit to the market is internal and not called by any external function

Description:

According to netspac

/// @notice Configures the vaults ids delegating credit to the market
./// @dev This function assumes the vaults ids are unique and have been previously verified.
/// @param self The market storage pointer.
/// @param vaultsIds The vaults ids to connect to the market.

This function is used to Configures the vaults ids delegating credit to the market and is internal , which means is supposed to be called by another external function, but the protocol fails to implement another external function that calls it

Impact:
With the missing of external function that calls this internal function, This will result to vaults ids delegating credit to the market not been configured.

Proof of Concept:

/// @notice Configures the vaults ids delegating credit to the market.
/// @dev This function assumes the vaults ids are unique and have been previously verified.
/// @param self The market storage pointer.
/// @param vaultsIds The vaults ids to connect to the market.
function configureConnectedVaults(Data storage self, uint128[] memory vaultsIds) internal {
EnumerableSet.UintSet[] storage connectedVaults = self.connectedVaults;
// add the vauls ids to a new UintSet instance in the connectedVaults array
for (uint256 i; i < vaultsIds.length; i++) {
connectedVaults[connectedVaults.length].add(vaultsIds[i]);
}
}

Recommended Mitigation:

i recommend writing another external function which should be protected by an authorization modifier that will call this configureConnectedVaults in market.sol

Updates

Lead Judging Commences

inallhonesty Lead Judge
7 months ago
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.