Skip to content

Commit b2639e7

Browse files
author
unconst
committed
moving alpha
1 parent e252e90 commit b2639e7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pallets/subtensor/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,17 +735,19 @@ pub mod pallet {
735735
#[pallet::type_value]
736736
/// Default moving alpha for the moving price.
737737
pub fn DefaultMovingAlpha<T: Config>() -> I96F32 {
738-
I96F32::saturating_from_num(0.00001)
738+
// Moving average take 30 days to reach 50% of the price
739+
// and 3.5 months to reach 90%.
740+
I96F32::saturating_from_num( 0.000003 )
739741
}
740742
#[pallet::type_value]
741743
/// Default subnet moving price.
742744
pub fn DefaultMovingPrice<T: Config>() -> I96F32 {
743-
I96F32::saturating_from_num(0.0)
745+
I96F32::saturating_from_num( 0.0 )
744746
}
745747
#[pallet::type_value]
746748
/// Default value for Share Pool variables
747749
pub fn DefaultSharePoolZero<T: Config>() -> U64F64 {
748-
U64F64::saturating_from_num(0)
750+
U64F64::saturating_from_num( 0 )
749751
}
750752

751753
#[pallet::type_value]

0 commit comments

Comments
 (0)