Assessment reports>Nibiru>Threat Models>Module: shifter

Module: shifter

This CosmosWasm module is used to execute privileged messages in the Nibiru perp module (see for more details), which can only be executed if the contract has been added to the sudo module. This module also maintains a whitelist of addresses that are allowed to execute the messages in this contract as well as the address of the current admin.

The DepthShift and PegShift messages are simple wrappers that first check if the sender is a member of the whitelist, and if so, they forward the message.

The AddMember, RemoveMember, and ChangeAdmin messages are used to update the whitelist and admin of this module and can only be performed by the current admin. For each message the new address is first validated, then the members list is updated or the admin is changed. When the admin is changed, the new admin is removed from the list of members.

The entry points are

  • ExecuteMsg::DepthShift — with controllable parameters pair and depth_mult

  • ExecuteMsg::PegShift — with controllable parameters pair and peg_mult

  • ExecuteMsg::AddMember — with controllable parameter address

  • ExecuteMsg::RemoveMember — with controllable parameter address

  • ExecuteMsg::ChangeAdmin — with controllable parameter address

Zellic © 2024Back to top ↑