Skip to content

MASP rewards PD controller uses absolute units instead of relative units #4779

@gavinly

Description

@gavinly

The MASP reward design computes rate changes using absolute units instead of relative units, making consistency in calibration difficult. All things being equal, assets with larger unit targets have disproportionately higher rate change behaviours than small unit assets. This introduces a complexity that is difficult to account for using PD controller parameters Kp and Kd alone. We would like the computation to use percentage-based ratios instead.

https://github.com/namada-net/namada/blob/main/crates/controller/src/lib.rs#L122C1-L133C6

    fn compute_control(
        &self,
        coeff: Dec,
        current_metric: Dec,
    ) -> Result<Dec, arith::Error> {
        let val: Dec = checked!(
            current_metric * (self.d_gain_nom - self.p_gain_nom)
                + (self.target_metric * self.p_gain_nom)
                - (self.last_metric * self.d_gain_nom)
        )?;
        checked!(coeff * val)
    }

https://github.com/namada-net/namada/blob/main/crates/shielded_token/src/conversion.rs#L216C1-L357C2 also appears to be using absolute values.

Percentage-based ratios would make stewarding MASP reward rates less complicated and more predictable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions