Assessment reports>Nibiru>Threat Models>Message: ExecuteMsg.DepthShift

Message: ExecuteMsg.DepthShift

This message can be sent via a CosmosWasm contract and allows for the swap invariant of an AMM pool to be updated, after making sure there is enough money in the PerpEFModule fund to pay for it. These funds get send to the vault to pay for a trader's new net margin.

The contractAddr address is checked to ensure that it is contained within the set of sudo contracts defined in the x/sudo module.

The parameters that a user can control are

  • Pair — This is the pair of the AMM to update the peg multiplier for. It is checked to ensure that it is valid and that there is an AMM for it.

  • DepthMult — This is the new depth multiplier to set for the AMM; it must be greater than zero.

Zellic © 2024Back to top ↑