Skip to content

feat: neutron vaults deployment script #358

@bekauz

Description

@bekauz

Description

A deployment script is needed to set up the on-chain Neutron side of the vault flow.

Inputs

Deployment script will depend on the following input params that will be deserialized from a toml config file:

  • Neutron-Gaia IBC config
  • Mars pool addr
  • Supervault addr
  • Ethereum ZK light client verifier addr
  • coprocessor vk
  • signing config (including the rpc node)
  • all relevant code ids

Authorizations

Authorizations should be set up for the entire flow.

Strategist should be authorized to perform the following actions:

  1. post zkp to authorizations
  2. trigger ICA IBC transfer via interchain account from gaia ICA to neutron deposit account
  3. trigger RegisterObligation and SettleNextObligation calls on the clearing queue library
  4. trigger deposit forwarder to route funds from neutron deposit account to mars/supervaults deposit account
  5. trigger Lend {} and Withdraw {amount } calls on Mars lending library
  6. trigger ProvideLiquidity { expected_vault_ratio_range } calls on Supervaults depositor library
  7. perform deposit forwarder library output address update which must be validated to be that of the supervaults deposit account (transition phase)
  8. perform Mars lending library output address update which must be validated to be the deposit account address

Outputs

Script should produce a toml config file which includes all generated artifacts.

Toml config should be serialized from a respective type, NeutronStrategyConfig, which should contain all information relevant for the strategist. This includes:

  • Node details
  • Signing cfg
  • Authorizations addr
  • Processor addr
  • Denoms
  • Valence Accounts (see below)
  • Valence Libraries (see below)

Libraries

Deployment set up the following libraries:

  • ICA IBC transfer library
  • Deposit forwarder library
  • Supervaults depositor library
  • Mars lending library
  • Clearing library

Resulting addresses should be wrapped in a NeutronLibraries type (see other vaults for examples).

Accounts

Deployment should set up the following accounts:

  • Interchain account (contract + created gaia ICA address)
  • Deposit account
  • Supervaults deposit account
  • Mars deposit account
  • Settlement account

Resulting addresses should be wrapped in a NeutronAccounts type.

Denoms

For this vault the only relevant denoms should be the underlying deposit token, supervault LP shares denom, and untrn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions