# Treasury

# Policy Constraints

jigu.core.PolicyConstraints

This captures the Treasury module's tax_policy and reward_policy parameters, which determine how the Tax Rate and Reward Weight values are allowed to change.

Dec
rate_min

Minimum value for rate.

Dec
rate_max

Minimum value for rate.

Coin
cap

Tax Cap (only applicable for Tax Rate).

Dec
change_max

Ratio of current value the rate is allowed to change in one update.

# Clamp a rate

PolicyConstraints.clamp(prev_rate, next_rate)

You can simulate the result of the clamping algorithm, which subjects updates in rate to the rules defined by the PolicyConstraints.

tax_policy = terra.treasury.params("tax_policy")
tax_policy.clamp(0.005, 0.2) # -> clamped value for tax rate

# Parameters

Dec
prev_rate

Previous rate


Dec
next_rate

New rate


# Returns

Dec

New rate, after clamping constraints have been applied.

Updated on: 3/4/2020, 7:47:53 AM