πŸ”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_mint and collateral_mint

    • Validates: different mint used for collateral_mint and redeemable_mint

    • Validates: same decimals for collateral_mint and redeemable_mint

    • Validates: enforced mint used for collateral_mint (hardcoded as USDC:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v now)

  • Handler

    • Initialises the depository PDA (MercurialVaultDepository)

    • Initialises the depository_lp_token_vault PDA

    • Write the depository PDA internal data

    • Update the controller PDA to link it with the newly registered depository

    • Emits Anchor RegisterMercurialVaultDepositoryEvent event

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?