When and how to update the LSD ticker?
LSD ticker names are assigned when a LSD manager deploys a new LSD instance. But, an LSD ticker becomes finalized only when the first BLS public key of the LSD instance mints derivatives.
There can be multiple LSD instances with the same ticker as long as none of them have a validator that has minted derivatives. Once one of these LSD instances have minted derivatives for at least one validator, they permanently get the ticker, and hence any other LSD instance with the same ticker will have to update their ticker to a new one.
To update the LSD ticker, one would need the help of LSD Wizard SDK.
Pre-installation
yarn add typescript typechain @typechain/ethers-v5 @types/lodash
Installing the LSD Wizard SDK and ethersjs module
yarn add @blockswaplab/lsd-wizard [email protected]
Importing the SDK in NodeJS
const { Wizard } = require('@blockswaplab/lsd-wizard');
or
import { Wizard } from '@blockswaplab/lsd-wizard';
Initializing the SDK
One can use any Provider API they like and create a signer
instance. This signer
instance will be used to initialize the SDK. The PRIV_KEY should belong to the ethereum address that was appointed as the DAO when deploying the LSD instance.
const provider = new ethers.providers.AlchemyProvider('goerli', ALCHEMY_API_KEY);
// replace PRIV_KEY with your private key
const ethSigner = new ethers.Wallet(PRIV_KEY, provider);
const wizard = new Wizard({
signerOrProvider: ethSigner,
liquidStakingManagerAddress: '<LIQUID_STAKING_MANAGER_ADDRESS>',
savETHPoolAddress: '<SAVETH_POOL_ADDRESS>',
feesAndMevPoolAddress: '<FEES_AND_MEV_POOL_ADDRESS>',
});
If you don't have the above addresses for your LSD instance, visit the Goerli LSD Subgraph playground and run a subgraph query as mentioned here.
Updating the LSD ticker
To update the ticker, call the updateStakehouseTicker
function in the utils
sub-class as shown below:
const tx = await wizard.utils.updateStakehouseTicker(<NEW_TICKER_NAME>);
Once the transaction is successful, the LSD ticker will be updated.