Skip to content

Commit

Permalink
Merge pull request #28 from anoma/brent/mainnet-phase2
Browse files Browse the repository at this point in the history
Mainnet phase 2 proposal
  • Loading branch information
brentstone authored Dec 11, 2024
2 parents c636467 + f1d19a5 commit 2293e41
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions phase2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,18 @@ use namada_proof_of_stake::storage::{read_pos_params, write_pos_params};

#[transaction]
fn apply_tx(ctx: &mut Ctx, _tx_data: BatchedTx) -> TxResult {
// PoS inflation
// Turn on PoS inflation
let mut pos_params = read_pos_params::<Ctx, governance::Store<Ctx>>(ctx)?.owned;
pos_params.max_inflation_rate = Dec::from_str("0.05").unwrap();
pos_params.target_staked_ratio = Dec::from_str("0.4").unwrap();
pos_params.rewards_gain_p = Dec::from_str("0.25").unwrap();
pos_params.rewards_gain_d = Dec::from_str("0.25").unwrap();
pos_params.rewards_gain_p = Dec::from_str("0.5").unwrap();
pos_params.rewards_gain_d = Dec::from_str("0.5").unwrap();
write_pos_params(ctx, &pos_params)?;

// PGF inflation
// Turn on PGF inflation
let pgf_inflation_key = governance::pgf::storage::keys::get_pgf_inflation_rate_key();
let pgf_inflation_rate = Dec::from_str("0.05").unwrap();
ctx.write(&pgf_inflation_key, pgf_inflation_rate)?;

// PGF stewards inflation
let steward_inflation_key = governance::pgf::storage::keys::get_steward_inflation_rate_key();
let steward_inflation_rate = Dec::from_str("0.005").unwrap();
ctx.write(&steward_inflation_key, steward_inflation_rate)?;

Ok(())
}

0 comments on commit 2293e41

Please sign in to comment.