syntax = "proto3";
package elys.masterchef;

option go_package = "github.com/elys-network/elys/x/masterchef/types";

import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

message PoolInfo {
  uint64 pool_id = 1;
  // reward wallet address
  string reward_wallet = 2;
  // multiplier for lp rewards
  string multiplier = 3 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // Eden APR, updated at every distribution
  string eden_apr = 4 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // Dex APR, updated based on 24hr accumulation
  string dex_apr = 5 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // Gas APR, updated based on 24hr accumulation
  string gas_apr = 6 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // External Incentive APR, updated at every distribution
  string external_incentive_apr = 7 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // external reward denoms on the pool
  repeated string external_reward_denoms = 8;
  // Enable or disable eden rewards
  bool enable_eden_rewards = 9;
}

message LegacyPoolInfo {
  uint64 pool_id = 1;
  // reward wallet address
  string reward_wallet = 2;
  // multiplier for lp rewards
  string multiplier = 3 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // Eden APR, updated at every distribution
  string eden_apr = 4 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // Dex APR, updated based on 24hr accumulation
  string dex_apr = 5 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // Gas APR, updated based on 24hr accumulation
  string gas_apr = 6 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // External Incentive APR, updated at every distribution
  string external_incentive_apr = 7 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  // external reward denoms on the pool
  repeated string external_reward_denoms = 8;
}

message PoolRewardInfo {
  uint64 pool_id = 1;
  string reward_denom = 2;
  string pool_acc_reward_per_share = 3 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  uint64 last_updated_block = 4;
}

message UserRewardInfo {
  string user = 1;
  uint64 pool_id = 2;
  string reward_denom = 3;
  string reward_debt = 4 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  string reward_pending = 5 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
}

message PoolRewardsAccum {
  uint64 pool_id = 1;
  int64 block_height = 2;
  uint64 timestamp = 3;
  string dex_reward = 4 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  string gas_reward = 5 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
  string eden_reward = 6 [
    (cosmos_proto.scalar) = "cosmos.Dec",
    (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
    (gogoproto.nullable) = false
  ];
}
