2022-07-20 23:14:43 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package kava.earn.v1beta1;
|
|
|
|
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/earn/types";
|
|
|
|
|
|
|
|
import "cosmos_proto/cosmos.proto";
|
2022-07-28 16:50:59 +00:00
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
2022-07-20 23:14:43 +00:00
|
|
|
import "kava/earn/v1beta1/strategy.proto";
|
|
|
|
|
|
|
|
// AllowedVault is a vault that is allowed to be created. These can be
|
|
|
|
// modified via parameter governance.
|
|
|
|
message AllowedVault {
|
|
|
|
// Denom is the only supported denomination of the vault for deposits and withdrawals.
|
|
|
|
string denom = 1;
|
|
|
|
|
2022-07-28 16:50:59 +00:00
|
|
|
// VaultStrategy is the strategy used for this vault.
|
2022-07-20 23:14:43 +00:00
|
|
|
StrategyType vault_strategy = 2;
|
|
|
|
}
|
|
|
|
|
2022-09-12 16:23:26 +00:00
|
|
|
// VaultRecord is the state of a vault.
|
2022-07-20 23:14:43 +00:00
|
|
|
message VaultRecord {
|
2022-09-12 16:23:26 +00:00
|
|
|
// TotalShares is the total distributed number of shares in the vault.
|
|
|
|
VaultShare total_shares = 1 [(gogoproto.nullable) = false];
|
2022-07-20 23:14:43 +00:00
|
|
|
}
|
|
|
|
|
2022-07-28 16:39:57 +00:00
|
|
|
// VaultShareRecord defines the vault shares owned by a depositor.
|
2022-07-20 23:14:43 +00:00
|
|
|
message VaultShareRecord {
|
2022-07-28 16:39:57 +00:00
|
|
|
// Depositor represents the owner of the shares
|
2022-07-20 23:14:43 +00:00
|
|
|
bytes depositor = 1 [
|
|
|
|
(cosmos_proto.scalar) = "cosmos.AddressBytes",
|
|
|
|
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"
|
|
|
|
];
|
2022-09-12 16:23:26 +00:00
|
|
|
// Shares represent the vault shares owned by the depositor.
|
|
|
|
repeated VaultShare shares = 2 [(gogoproto.castrepeated) = "VaultShares", (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
// VaultShare defines shares of a vault owned by a depositor.
|
|
|
|
message VaultShare {
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
|
|
|
|
string denom = 1;
|
|
|
|
string amount = 2 [
|
|
|
|
(cosmos_proto.scalar) = "cosmos.Dec",
|
|
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
|
|
(gogoproto.nullable) = false
|
|
|
|
];
|
|
|
|
}
|