πregister_mercurial_vault_depository
Permissionned - Callable as long as the max number of registered mercurial vault depository isn't reached
Flow
Checks
Anchor IDL accounts checks
Validates: same mint used for
mercurial_vault.token_mintandcollateral_mintValidates: different mint used for
collateral_mintandredeemable_mintValidates: same decimals for
collateral_mintandredeemable_mintValidates: enforced mint used for
collateral_mint(hardcoded asUSDC:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1vnow)
Handler
Initialises the
depositoryPDA (MercurialVaultDepository)Initialises the
depository_lp_token_vaultPDAWrite the
depositoryPDA internal dataUpdate the
controllerPDA to link it with the newly registereddepositoryEmits Anchor
RegisterMercurialVaultDepositoryEventevent
Specificities
Can register up to 8 of them as per the program limit MAX_REGISTERED_MERCURIAL_VAULT_DEPOSITORIES.
Can only be called with mints that are supported by Mercurial Vault, and should update the enforced mint checking with the given mint.
Parameters
minting_fee_in_bps - initial value of the fee collected by the authority
redeeming_fee_in_bps - initial value of the fee collected by the authority
redeemable_amount_under_management_cap - initial value of the max redeemable mint managed under this depository
Accounts input
Last updated
Was this helpful?