Protocol administrators should have the ability to pause cross-chain token transfers if any malicious activity is detected. It is a common security practice to implement a pause flag in the onft_config structure and assign a pauser role to control this functionality. This feature is crucial for handling emergency situations and preventing potential exploits.
Recommendation
Introduce a paused flag in the onft_config to ensure that cross-chain functionality for a specific token can be paused when necessary. Additionally, assign a pauser role to control this mechanism.
Severity
Low Risk
Description
Protocol administrators should have the ability to pause cross-chain token transfers if any malicious activity is detected. It is a common security practice to implement a pause flag in the
onft_config
structure and assign apauser
role to control this functionality. This feature is crucial for handling emergency situations and preventing potential exploits.Recommendation
Introduce a
paused
flag in theonft_config
to ensure that cross-chain functionality for a specific token can be paused when necessary. Additionally, assign apauser
role to control this mechanism.Add the following check at the beginning of the
send
andlz_receive
functions to ensure the token is not paused during execution: