-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MASP rewards controller using token amounts instead of ratios #2460
Changes from all commits
d315396
596503c
bda94a3
46cb0d2
26fbf6a
8f9c015
a7be303
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- MASP inflation for a given token now is adjusted based on a target amount | ||
of total locked (shielded) tokens rather than a ratio relative to some total | ||
supply. ([\#2460](https://github.com/anoma/namada/pull/2460)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -435,6 +435,7 @@ where | |
masp_params, | ||
&mut self.wl_storage, | ||
address, | ||
denom, | ||
) | ||
.unwrap(); | ||
if masp_params.is_some() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1009,8 +1009,9 @@ pub struct MaspParams { | |
pub kd_gain_nom: Dec, | ||
/// Shielded Pool nominal proportional gain for the given token | ||
pub kp_gain_nom: Dec, | ||
/// Locked ratio for the given token | ||
pub locked_ratio_target: Dec, | ||
/// Target amount for the given token that is locked in the shielded pool | ||
/// TODO: should this be a Uint or DenominatedAmount??? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be a uint, I think. Whatever the max supply of a token is (probably u256?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah but we have the weird MASP denom splitting thing, better think carefully about this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think |
||
pub locked_amount_target: u64, | ||
} | ||
|
||
impl Default for MaspParams { | ||
|
@@ -1019,7 +1020,7 @@ impl Default for MaspParams { | |
max_reward_rate: Dec::from_str("0.1").unwrap(), | ||
kp_gain_nom: Dec::from_str("0.25").unwrap(), | ||
kd_gain_nom: Dec::from_str("0.25").unwrap(), | ||
locked_ratio_target: Dec::from_str("0.6667").unwrap(), | ||
locked_amount_target: 10_000_u64, | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review these computations, to make sure they don't have values of 0