syntax = "proto3";
package provenance.exchange.v1;

option go_package = "github.com/provenance-io/provenance/x/exchange";

option java_package        = "io.provenance.exchange.v1";
option java_multiple_files = true;

import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

// Params is a representation of the exchange module parameters.
message Params {
  // default_split is the default proportion of fees the exchange receives in basis points.
  // It is used if there isn't an applicable denom-specific split defined.
  // E.g. 100 = 1%. Min = 0, Max = 10000.
  uint32 default_split = 1;
  // denom_splits are the denom-specific amounts the exchange receives.
  repeated DenomSplit denom_splits = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
  // fee_create_payment_flat is the flat fee options for creating a payment.
  // If the source amount is not zero then one of these fee entries is required to create the payment.
  // This field is currently limited to zero or one entries.
  repeated cosmos.base.v1beta1.Coin fee_create_payment_flat = 3
      [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
  // fee_accept_payment_flat is the flat fee options for accepting a payment.
  // If the target amount is not zero then one of these fee entries is required to accept the payment.
  // This field is currently limited to zero or one entries.
  repeated cosmos.base.v1beta1.Coin fee_accept_payment_flat = 4
      [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// DenomSplit associates a coin denomination with an amount the exchange receives for that denom.
message DenomSplit {
  // denom is the coin denomination this split applies to.
  string denom = 1;
  // split is the proportion of fees the exchange receives for this denom in basis points.
  // E.g. 100 = 1%. Min = 0, Max = 10000.
  uint32 split = 2;
}