Since Bifrost KSM LST (vKSM) is staked by three Sovereign derived addresses, remotely controlled by the Bifrost runtime pallet. Below illustrates how to verify derived addresses are keyless and how are they calculated via the Sovereign address.
Bifrost Sovereign address: F7fq1jMmNj5j2jAHcBxgM26JzUn2N4duXu1U4UZNdkfZEPV
These addresses are keyless derived addresses generated by the Bifrost Sovereign Address through calculation, used for KSM Staking behind vKSM. The calculation method can be found at: https://github.com/bifrost-finance/bifrost/blob/d21077ad1c2376076702de5c4d4e1466024b6f12/runtime/bifrost-kusama/src/lib.rs#L1178
Below is the code to verify that derivative addresses are calculated from the Bifrost sovereign address:
#[test]
fn generate_derivative_account() {
ExtBuilder::default().build().execute_with(|| {
// PublicKey: 0x70617261d1070000000000000000000000000000000000000000000000000000
// AccountId(42): 5Ec4AhPV91i9yNuiWuNunPf6AQCYDhFTTA4G5QCbtqYApH9E
let sovereign_account = <ParaId as AccountIdConversion<AccountId>>::into_account_truncating(&ParaId::from(
2001
));
// PublicKey: 0x5a53736d8e96f1c007cf0d630acf5209b20611617af23ce924c8e25328eb5d28
// AccountId(42): 5E78xTBiaN3nAGYtcNnqTJQJqYAkSDGggKqaDfpNsKyPpbcb
let sovereign_account_derivative_0 = Utility::derivative_account_id(sovereign_account.clone(), 0);
assert_eq!(
sovereign_account_derivative_0,
AccountId::from_ss58check("5E78xTBiaN3nAGYtcNnqTJQJqYAkSDGggKqaDfpNsKyPpbcb").unwrap()
);
// PublicKey: 0xf1c5ca0368e7a567945a59aaea92b9be1e0794fe5e077d017462b7ce8fc1ed7c
// AccountId(42): 5HXi9pzWnTQzk7VKzY6VQn92KfWCcA5NbSm53uKHrYU1VsjP
let sovereign_account_derivative_1 = Utility::derivative_account_id(sovereign_account.clone(), 1);
assert_eq!(
sovereign_account_derivative_1,
AccountId::from_ss58check("5HXi9pzWnTQzk7VKzY6VQn92KfWCcA5NbSm53uKHrYU1VsjP").unwrap()
);
// PublicKey: 0x1e365411cfd0b0f78466be433a2ec5f7d545c5e28cb2e9a31ce97d4a28447dfc
// AccountId(42): 5CkKS3YMx64TguUYrMERc5Bn6Mn2aKMUkcozUFREQDgHS3Tv
let sovereign_account_derivative_2 = Utility::derivative_account_id(sovereign_account.clone(), 2);
assert_eq!(
sovereign_account_derivative_2,
AccountId::from_ss58check("5CkKS3YMx64TguUYrMERc5Bn6Mn2aKMUkcozUFREQDgHS3Tv").unwrap()
);
})
}