-
Notifications
You must be signed in to change notification settings - Fork 9
Description
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:
- post zkp to authorizations
- trigger ICA IBC transfer via interchain account from gaia ICA to neutron deposit account
- trigger
RegisterObligation
andSettleNextObligation
calls on the clearing queue library - trigger deposit forwarder to route funds from neutron deposit account to mars/supervaults deposit account
- trigger
Lend {}
andWithdraw {amount }
calls on Mars lending library - trigger
ProvideLiquidity { expected_vault_ratio_range }
calls on Supervaults depositor library - perform deposit forwarder library output address update which must be validated to be that of the supervaults deposit account (transition phase)
- 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
.