pub fn near_to_stake(&self, near: YoctoNear) -> YoctoStake {
        if self.total_staked_near_balance.value() == 0 {
            return near.value().into();
        }

        let near = U256::from(near);
        let total_stake_supply = U256::from(self.total_stake_supply);
        let total_staked_near_balance = U256::from(self.total_staked_near_balance);

        (near * total_stake_supply / total_staked_near_balance)
            .as_u128()
            .into()
    }
/// converts NEAR to STAKE rounded down
/// - STAKE appreciates in value over time - if we were to round up, then NEAR would leak out
converts NEAR to STAKE rounded down
STAKE appreciates in value over time - if we were to round up, then NEAR would leak out
converts NEAR to STAKE rounded down STAKE appreciates in value over time - if we were to round up then NEAR would leak out
pub fn near_to_stake(&self, near: YoctoNear) -> YoctoStake {
        if self.total_staked_near_balance.value() == 0 {
            return near.value().into();
        }
        let near = U256::from(near);
        let total_stake_supply = U256::from(self.total_stake_supply);
        let total_staked_near_balance = U256::from(self.total_staked_near_balance);
        (near * total_stake_supply / total_staked_near_balance)
            .as_u128()
            .into()
    }
pub fn near_to_stake ( & self , near : YoctoNear ) -> YoctoStake { if self . total_staked_near_balance . value ( ) == 0 { return near . value ( ) . into ( ) ; } let near = U256 :: from ( near ) ; let total_stake_supply = U256 :: from ( self . total_stake_supply ) ; let total_staked_near_balance = U256 :: from ( self . total_staked_near_balance ) ; ( near * total_stake_supply / total_staked_near_balance ) . as_u128 ( ) . into ( ) }
converts NEAR to STAKE rounded down
 STAKE appreciates in value over time - if we were to round up, then NEAR would leak out
converts NEAR to STAKE rounded down STAKE appreciates in value over time - if we were to round up then NEAR would leak out
&self
near
YoctoNear