@@ -18,7 +18,11 @@ pub struct WeightsTlockPayload {
18
18
}
19
19
20
20
impl < T : Config > Pallet < T > {
21
- pub fn get_root_divs_in_alpha ( netuid : u16 , alpha_out_emission : I96F32 ) -> I96F32 {
21
+ pub fn get_root_divs_in_alpha (
22
+ netuid : u16 ,
23
+ alpha_out_emission : I96F32 ,
24
+ validator_proportion : I96F32 ,
25
+ ) -> I96F32 {
22
26
// Get total TAO on root.
23
27
let total_root_tao: I96F32 = I96F32 :: from_num ( SubnetTAO :: < T > :: get ( 0 ) ) ;
24
28
// Get total ALPHA on subnet.
@@ -32,7 +36,8 @@ impl<T: Config> Pallet<T> {
32
36
// Get root proportion of alpha_out dividends.
33
37
let root_divs_in_alpha: I96F32 = root_proportion
34
38
. saturating_mul ( alpha_out_emission)
35
- . saturating_mul ( I96F32 :: from_num ( 0.41 ) ) ;
39
+ . saturating_mul ( validator_proportion) ; // % of emission that goes to *all* validators.
40
+
36
41
// Return
37
42
root_divs_in_alpha
38
43
}
@@ -207,9 +212,14 @@ impl<T: Config> Pallet<T> {
207
212
remaining_emission
208
213
) ;
209
214
215
+ // Validators get 50% of remaining emission.
216
+ let validator_proportion: I96F32 = I96F32 :: from_num ( 0.5 ) ;
210
217
// Get proportion of alpha out emission as root divs.
211
- let root_emission_in_alpha: I96F32 =
212
- Self :: get_root_divs_in_alpha ( * netuid, I96F32 :: from_num ( remaining_emission) ) ;
218
+ let root_emission_in_alpha: I96F32 = Self :: get_root_divs_in_alpha (
219
+ * netuid,
220
+ I96F32 :: from_num ( remaining_emission) ,
221
+ validator_proportion,
222
+ ) ;
213
223
// Subtract root divs from alpha divs.
214
224
let pending_alpha_emission: I96F32 =
215
225
I96F32 :: from_num ( remaining_emission) . saturating_sub ( root_emission_in_alpha) ;
0 commit comments