Type
CONTRACT
Validation date
2024-08-20 19:05:07 UTC
Fee
0 UCO

Code (4.87 KB)

@version 1

condition triggered_by: transaction, on: deposit(level) do
now = Time.now() - Math.rem(Time.now(), 3600)

if transaction.timestamp >= 1848657600 do
  throw(message: "deposit impossible once farm is closed", code: 1001)
end

end_timestamp_from_level_or_throw(level, now)

if get_user_transfer_amount_or_throw() < 0.00000143 do
  throw(message: "deposit's minimum amount is 0.00000143", code: 1002)
end

true
end

actions triggered_by: transaction, on: deposit(level) do
now = Time.now() - Math.rem(Time.now(), 3600)
end_timestamp = end_timestamp_from_level_or_throw(level, now)
level = normalize_level(level, now)

start = nil

if level != "0" do
  start = now
end

transfer_amount = get_user_transfer_amount_or_throw()

user_genesis_address = get_user_genesis()

deposits = nil

if now > 1722513600 do
  res = calculate_new_rewards()
  deposits = res.deposits
  State.set("rewards_reserved", res.rewards_reserved)
  State.set("last_calculation_timestamp", res.last_calculation_timestamp)
  State.set("lp_tokens_deposited_by_level", res.lp_tokens_deposited_by_level)
else
  deposits = State.get("deposits", Map.new())
end

# ================================================
# MERGE DEPOSITS (same end)
# ================================================
user_deposits = Map.get(deposits, user_genesis_address, [])
same_deposit = nil

new_user_deposits = []

for user_deposit in user_deposits do
  if user_deposit.end == end_timestamp do
    same_deposit = user_deposit
  else
    new_user_deposits = List.prepend(new_user_deposits, user_deposit)
  end
end

new_deposit = nil

if same_deposit == nil do
  new_deposit = [
    amount: transfer_amount,
    reward_amount: 0,
    level: level,
    start: start,
    end: end_timestamp,
    id: String.from_number(Time.now())
  ]

  new_user_deposits = List.prepend(new_user_deposits, new_deposit)
else
  new_deposit = Map.set(same_deposit, "amount", same_deposit.amount + transfer_amount)
  new_user_deposits = List.prepend(new_user_deposits, new_deposit)
end

deposits = Map.set(deposits, user_genesis_address, new_user_deposits)
State.set("deposits", deposits)

lp_tokens_deposited = State.get("lp_tokens_deposited", 0)
State.set("lp_tokens_deposited", lp_tokens_deposited + transfer_amount)

lp_tokens_deposited_by_level = State.get("lp_tokens_deposited_by_level", Map.new())

lp_tokens_deposited_by_level =
  Map.set(
    lp_tokens_deposited_by_level,
    new_deposit.level,
    Map.get(lp_tokens_deposited_by_level, new_deposit.level, 0) + transfer_amount
  )

State.set("lp_tokens_deposited_by_level", lp_tokens_deposited_by_level)
end

condition triggered_by: transaction, on: claim(deposit_id) do
if transaction.timestamp <= 1722513600 do
  throw(message: "farm is not started yet", code: 2001)
end

user_genesis_address = get_user_genesis()

res = calculate_new_rewards()
user_deposit = get_user_deposit_or_throw(res.deposits, user_genesis_address, deposit_id)

if user_deposit.end > Time.now() do
  throw(message: "claiming before end of lock", code: 2002)
end

if user_deposit.reward_amount <= 0 do
  throw(message: "no reward to claim", code: 2003)
end

true
end

actions triggered_by: transaction, on: claim(deposit_id) do
user_genesis_address = get_user_genesis()

res = calculate_new_rewards()
State.set("last_calculation_timestamp", res.last_calculation_timestamp)
State.set("lp_tokens_deposited_by_level", res.lp_tokens_deposited_by_level)

user_deposit = get_user_deposit_or_throw(res.deposits, user_genesis_address, deposit_id)

if "UCO" == "UCO" do
  Contract.add_uco_transfer(to: transaction.address, amount: user_deposit.reward_amount)
else
  Contract.add_token_transfer(
    to: transaction.address,
    amount: user_deposit.reward_amount,
    token_address: "UCO"
  )
end

rewards_distributed = State.get("rewards_distributed", 0)
State.set("rewards_distributed", rewards_distributed + user_deposit.reward_amount)
State.set("rewards_reserved", res.rewards_reserved - user_deposit.reward_amount)

user_deposit = Map.set(user_deposit, "reward_amount", 0)
State.set("deposits", set_user_deposit(res.deposits, user_genesis_address, user_deposit))
end

condition triggered_by: transaction, on: withdraw(amount, deposit_id) do
user_genesis_address = get_user_genesis()

user_deposit =
  get_user_deposit_or_throw(State.get("deposits", Map.new()), user_genesis_address, deposit_id)

if amount > user_deposit.amount do
  throw(message: "amount requested is greater than amount deposited", code: 3001)
end

if user_deposit.end > Time.now() do
  throw(message: "withdrawing before end of lock", code: 3002)
end

true
end

actions triggered_by: transaction, on: withdraw(amount, deposit_id) do
user_genesis_address = get_user_genesis()

deposits = nil
rewards_reserved = nil

if Time.now() > 1722513600 do
  res = calculate_new_rewards()
  deposits = res.deposits
  rewards_reserved = res.rewards_reserved
  State.set("last_calculation_timestamp", res.last_calculation_timestamp)
  State.set("lp_tokens_deposited_by_level", res.lp_tokens_deposited_by_level)
else
  deposits = State.get("deposits", Map.new())
  rewards_reserved = State.get("rewards_reserved", 0)
end

user_deposit = get_user_deposit_or_throw(deposits, user_genesis_address, deposit_id)

if user_deposit.reward_amount > 0 do
  if "UCO" == "UCO" do
    Contract.add_uco_transfer(to: transaction.address, amount: user_deposit.reward_amount)
  else
    Contract.add_token_transfer(
      to: transaction.address,
      amount: user_deposit.reward_amount,
      token_address: "UCO"
    )
  end

  rewards_distributed = State.get("rewards_distributed", 0)
  State.set("rewards_distributed", rewards_distributed + user_deposit.reward_amount)

  rewards_reserved = rewards_reserved - user_deposit.reward_amount
end

State.set("rewards_reserved", rewards_reserved)

Contract.add_token_transfer(
  to: transaction.address,
  amount: amount,
  token_address: 0x0000D1B4A0597A033F7DD0C8CA274745F850A990725B7B73B5E8CEBC7C4F9EA82954
)

lp_tokens_deposited = State.get("lp_tokens_deposited", 0)
State.set("lp_tokens_deposited", lp_tokens_deposited - amount)

lp_tokens_deposited_by_level = State.get("lp_tokens_deposited_by_level", Map.new())

lp_tokens_deposited_by_level =
  Map.set(
    lp_tokens_deposited_by_level,
    user_deposit.level,
    Map.get(lp_tokens_deposited_by_level, user_deposit.level, 0) - amount
  )

State.set("lp_tokens_deposited_by_level", lp_tokens_deposited_by_level)

if amount == user_deposit.amount do
  deposits = remove_user_deposit(deposits, user_genesis_address, deposit_id)
else
  user_deposit = Map.set(user_deposit, "reward_amount", 0)
  user_deposit = Map.set(user_deposit, "amount", user_deposit.amount - amount)
  deposits = set_user_deposit(deposits, user_genesis_address, user_deposit)
end

State.set("deposits", deposits)
end

condition triggered_by: transaction, on: relock(level, deposit_id) do
now = Time.now() - Math.rem(Time.now(), 3600)

if transaction.timestamp >= 1848657600 do
  throw(message: "relock impossible once farm is closed", code: 4001)
end

end_timestamp = end_timestamp_from_level_or_throw(level, now)
level = normalize_level(level, now)

if level == "0" do
  throw(message: "can't relock to flexible", code: 4002)
end

user_genesis_address = get_user_genesis()

user_deposit =
  get_user_deposit_or_throw(State.get("deposits", Map.new()), user_genesis_address, deposit_id)

if level <= user_deposit.level do
  throw(message: "Relock's level must be greater than current level", code: 4003)
end

true
end

actions triggered_by: transaction, on: relock(level, deposit_id) do
now = Time.now() - Math.rem(Time.now(), 3600)
end_timestamp = end_timestamp_from_level_or_throw(level, now)
level = normalize_level(level, now)

user_genesis_address = get_user_genesis()

res = calculate_new_rewards()
State.set("last_calculation_timestamp", res.last_calculation_timestamp)

user_deposit = get_user_deposit_or_throw(res.deposits, user_genesis_address, deposit_id)

if user_deposit.reward_amount > 0 do
  if "UCO" == "UCO" do
    Contract.add_uco_transfer(to: transaction.address, amount: user_deposit.reward_amount)
  else
    Contract.add_token_transfer(
      to: transaction.address,
      amount: user_deposit.reward_amount,
      token_address: "UCO"
    )
  end
end

rewards_distributed = State.get("rewards_distributed", 0)
State.set("rewards_distributed", rewards_distributed + user_deposit.reward_amount)
State.set("rewards_reserved", res.rewards_reserved - user_deposit.reward_amount)

lp_tokens_deposited_by_level =
  Map.set(
    res.lp_tokens_deposited_by_level,
    user_deposit.level,
    Map.get(res.lp_tokens_deposited_by_level, user_deposit.level, 0) - user_deposit.amount
  )

lp_tokens_deposited_by_level =
  Map.set(
    lp_tokens_deposited_by_level,
    level,
    Map.get(lp_tokens_deposited_by_level, level, 0) + user_deposit.amount
  )

State.set("lp_tokens_deposited_by_level", lp_tokens_deposited_by_level)

user_deposit = Map.set(user_deposit, "reward_amount", 0)
user_deposit = Map.set(user_deposit, "start", now)
user_deposit = Map.set(user_deposit, "end", end_timestamp)
user_deposit = Map.set(user_deposit, "level", level)

State.set("deposits", set_user_deposit(res.deposits, user_genesis_address, user_deposit))
end

condition triggered_by: transaction, on: calculate_rewards() do
true
end

actions triggered_by: transaction, on: calculate_rewards() do
res = calculate_new_rewards()
State.set("last_calculation_timestamp", res.last_calculation_timestamp)
State.set("deposits", res.deposits)
State.set("rewards_reserved", res.rewards_reserved)
State.set("lp_tokens_deposited_by_level", res.lp_tokens_deposited_by_level)
end

condition(
triggered_by: transaction,
on: update_code(),
as: [
  previous_public_key:
    (
      # Pool code can only be updated from the router contract of the dex

      # Transaction is not yet validated so we need to use previous address
      # to get the genesis address
      previous_address = Chain.get_previous_address()
      Chain.get_genesis_address(previous_address) == 0x000077CEC9D9DBC0183CAF843CBB4828A932BB1457E382AC83B31AD6F9755DD50FFC
    )
]
)

actions triggered_by: transaction, on: update_code() do
params = [
  0x0000D1B4A0597A033F7DD0C8CA274745F850A990725B7B73B5E8CEBC7C4F9EA82954,
  1722513600,
  1848657600,
  "UCO",
  0x0000B2339AADF5685B1C8D400C9092C921E51588DC049E097EC9437017E7DDED0FEB
]

new_code = Contract.call_function(0x00004CE47B2828E923EB679FEF311DD458AA0571C67DB5CB46B4E0793CAC525AC791, "get_farm_lock_code", params)

if Code.is_valid?(new_code) && !Code.is_same?(new_code, contract.code) do
  Contract.set_type("contract")
  Contract.set_code(new_code)
end
end

fun get_user_transfer_amount_or_throw() do
transfers = Map.get(transaction.token_transfers, 0x0000B2339AADF5685B1C8D400C9092C921E51588DC049E097EC9437017E7DDED0FEB, [])
transfer = List.at(transfers, 0)

if transfer == nil do
  throw(message: "no transfer found to the farm", code: 1003)
end

if transfer.token_address != 0x0000D1B4A0597A033F7DD0C8CA274745F850A990725B7B73B5E8CEBC7C4F9EA82954 do
  throw(message: "invalid token transfered to the farm", code: 1004)
end

transfer.amount
end

fun calculate_new_rewards() do
rounded_now = Time.now() - Math.rem(Time.now(), 3600)

lp_tokens_deposited = State.get("lp_tokens_deposited", 0)
lp_tokens_deposited_by_level = State.get("lp_tokens_deposited_by_level", Map.new())
deposits = State.get("deposits", Map.new())
rewards_reserved = State.get("rewards_reserved", 0)
last_calculation_timestamp = State.get("last_calculation_timestamp", 1722513600)

if last_calculation_timestamp < rounded_now && last_calculation_timestamp < 1848657600 &&
     lp_tokens_deposited > 0 do
  duration_by_level = Map.new()
  duration_by_level = Map.set(duration_by_level, "0", 0)
  duration_by_level = Map.set(duration_by_level, "1", 7 * 86400)
  duration_by_level = Map.set(duration_by_level, "2", 30 * 86400)
  duration_by_level = Map.set(duration_by_level, "3", 90 * 86400)
  duration_by_level = Map.set(duration_by_level, "4", 180 * 86400)
  duration_by_level = Map.set(duration_by_level, "5", 365 * 86400)
  duration_by_level = Map.set(duration_by_level, "6", 730 * 86400)
  duration_by_level = Map.set(duration_by_level, "7", 1095 * 86400)

  weight_by_level = Map.new()
  weight_by_level = Map.set(weight_by_level, "0", 0)
  weight_by_level = Map.set(weight_by_level, "1", 0.013)
  weight_by_level = Map.set(weight_by_level, "2", 0.024)
  weight_by_level = Map.set(weight_by_level, "3", 0.043)
  weight_by_level = Map.set(weight_by_level, "4", 0.077)
  weight_by_level = Map.set(weight_by_level, "5", 0.139)
  weight_by_level = Map.set(weight_by_level, "6", 0.251)
  weight_by_level = Map.set(weight_by_level, "7", 0.453)

  rewards_allocated_at_each_year_end = Map.new()

  rewards_allocated_at_each_year_end =
    Map.set(rewards_allocated_at_each_year_end, "1", 45_000_000)

  rewards_allocated_at_each_year_end =
    Map.set(rewards_allocated_at_each_year_end, "2", 45_000_000 + 22_500_000)

  rewards_allocated_at_each_year_end =
    Map.set(
      rewards_allocated_at_each_year_end,
      "3",
      45_000_000 + 22_500_000 + 11_250_000
    )

  rewards_allocated_at_each_year_end =
    Map.set(
      rewards_allocated_at_each_year_end,
      "4",
      45_000_000 + 22_500_000 + 11_250_000 + 8_750_000
    )

  # remaining reward balance
  remaining_rewards_balance = 0

  if "UCO" == "UCO" do
    remaining_rewards_balance = contract.balance.uco
  else
    key = [token_address: "UCO", token_id: 0]
    remaining_rewards_balance = Map.get(contract.balance.tokens, key, 0)
  end

  # giveaways are distributed linearly over time
  time_elapsed_since_last_calc =
    rounded_now - State.get("last_calculation_timestamp", 1722513600)

  time_remaining_until_farm_end =
    1848657600 - State.get("last_calculation_timestamp", 1722513600)

  giveaways =
    remaining_rewards_balance + State.get("rewards_distributed", 0) -
      (45_000_000 + 22_500_000 + 11_250_000 + 8_750_000)

  giveaways_to_allocate =
    giveaways * (time_elapsed_since_last_calc / time_remaining_until_farm_end)

  # loop through all the hours since last calculation
  # period count is always minimum 1 because we ensure previously
  # rounded_now > last_calculation_timestamp
  periods_count =
    (rounded_now - State.get("last_calculation_timestamp", 1722513600)) / 3600

  last_calculation_timestamp = State.get("last_calculation_timestamp", 1722513600)

  for i in 1..periods_count do
    period_to = last_calculation_timestamp + 3600

    # find year / seconds remaining
    year = nil
    seconds_until_end_of_year = nil

    if last_calculation_timestamp < 1722513600 + 365 * 86400 do
      year = "1"

      seconds_until_end_of_year =
        1722513600 + 365 * 86400 - last_calculation_timestamp
    end

    if year == nil && last_calculation_timestamp < 1722513600 + 730 * 86400 do
      year = "2"

      seconds_until_end_of_year =
        1722513600 + 730 * 86400 - last_calculation_timestamp
    end

    if year == nil && last_calculation_timestamp < 1722513600 + 1095 * 86400 do
      year = "3"

      seconds_until_end_of_year =
        1722513600 + 1095 * 86400 - last_calculation_timestamp
    end

    if year == nil do
      year = "4"
      seconds_until_end_of_year = 1848657600 - last_calculation_timestamp
    end

    rewards_to_allocate = 0

    if period_to >= 1848657600 do
      rewards_to_allocate = remaining_rewards_balance - rewards_reserved
    else
      giveaway_for_period =
        giveaways_to_allocate *
          ((period_to - last_calculation_timestamp) / time_elapsed_since_last_calc)

      # calculate reward for this period
      rewards_to_allocate =
        (rewards_allocated_at_each_year_end[year] - State.get("rewards_distributed", 0) -
           rewards_reserved) *
          ((period_to - last_calculation_timestamp) / seconds_until_end_of_year) +
          giveaway_for_period
    end

    # calculate tokens_weighted for each level
    tokens_weighted_by_level = Map.new()

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "0",
        Map.get(lp_tokens_deposited_by_level, "0", 0) * weight_by_level["0"]
      )

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "1",
        Map.get(lp_tokens_deposited_by_level, "1", 0) * weight_by_level["1"]
      )

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "2",
        Map.get(lp_tokens_deposited_by_level, "2", 0) * weight_by_level["2"]
      )

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "3",
        Map.get(lp_tokens_deposited_by_level, "3", 0) * weight_by_level["3"]
      )

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "4",
        Map.get(lp_tokens_deposited_by_level, "4", 0) * weight_by_level["4"]
      )

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "5",
        Map.get(lp_tokens_deposited_by_level, "5", 0) * weight_by_level["5"]
      )

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "6",
        Map.get(lp_tokens_deposited_by_level, "6", 0) * weight_by_level["6"]
      )

    tokens_weighted_by_level =
      Map.set(
        tokens_weighted_by_level,
        "7",
        Map.get(lp_tokens_deposited_by_level, "7", 0) * weight_by_level["7"]
      )

    # calculate tokens weighted total
    tokens_weighted_total = 0

    for weighted_amount in Map.values(tokens_weighted_by_level) do
      tokens_weighted_total = tokens_weighted_total + weighted_amount
    end

    if tokens_weighted_total > 0 do
      # calculate rewards per level
      rewards_to_allocated_by_level = Map.new()

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "0",
          tokens_weighted_by_level["0"] / tokens_weighted_total * rewards_to_allocate
        )

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "1",
          tokens_weighted_by_level["1"] / tokens_weighted_total * rewards_to_allocate
        )

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "2",
          tokens_weighted_by_level["2"] / tokens_weighted_total * rewards_to_allocate
        )

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "3",
          tokens_weighted_by_level["3"] / tokens_weighted_total * rewards_to_allocate
        )

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "4",
          tokens_weighted_by_level["4"] / tokens_weighted_total * rewards_to_allocate
        )

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "5",
          tokens_weighted_by_level["5"] / tokens_weighted_total * rewards_to_allocate
        )

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "6",
          tokens_weighted_by_level["6"] / tokens_weighted_total * rewards_to_allocate
        )

      rewards_to_allocated_by_level =
        Map.set(
          rewards_to_allocated_by_level,
          "7",
          tokens_weighted_by_level["7"] / tokens_weighted_total * rewards_to_allocate
        )

      # update each deposit with the rewards
      updated_deposits = Map.new()

      for user_address in Map.keys(deposits) do
        user_deposits = deposits[user_address]
        updated_user_deposits = []

        for user_deposit in user_deposits do
          if user_deposit.level != "0" do
            # calc rewards
            user_deposit =
              Map.set(
                user_deposit,
                "reward_amount",
                user_deposit.reward_amount +
                  user_deposit.amount * weight_by_level[user_deposit.level] /
                    tokens_weighted_by_level[user_deposit.level] *
                    rewards_to_allocated_by_level[user_deposit.level]
              )

            # on level change, update cursors and deposit
            previous_level = String.from_number(String.to_number(user_deposit.level) - 1)

            if user_deposit.end - duration_by_level[previous_level] <= period_to do
              lp_tokens_deposited_by_level =
                Map.set(
                  lp_tokens_deposited_by_level,
                  user_deposit.level,
                  Map.get(lp_tokens_deposited_by_level, user_deposit.level, 0) -
                    user_deposit.amount
                )

              lp_tokens_deposited_by_level =
                Map.set(
                  lp_tokens_deposited_by_level,
                  previous_level,
                  Map.get(lp_tokens_deposited_by_level, previous_level, 0) + user_deposit.amount
                )

              user_deposit = Map.set(user_deposit, "level", previous_level)

              if previous_level == "0" do
                user_deposit = Map.set(user_deposit, "start", nil)
                user_deposit = Map.set(user_deposit, "end", 0)
              end
            end
          end

          updated_user_deposits = List.prepend(updated_user_deposits, user_deposit)
        end

        updated_deposits = Map.set(updated_deposits, user_address, updated_user_deposits)
      end

      deposits = updated_deposits
      rewards_reserved = rewards_reserved + rewards_to_allocate
      last_calculation_timestamp = period_to
    end
  end
else
  # edge case when lp_tokens_deposited = 0
  if last_calculation_timestamp < rounded_now && last_calculation_timestamp < 1848657600 do
    last_calculation_timestamp = rounded_now
  end
end

[
  deposits: deposits,
  rewards_reserved: rewards_reserved,
  last_calculation_timestamp: last_calculation_timestamp,
  lp_tokens_deposited_by_level: lp_tokens_deposited_by_level
]
end

export fun(get_farm_infos()) do
now = Time.now() - Math.rem(Time.now(), 3600)

reward_year1 = 0
reward_year2 = 0
reward_year3 = 0
reward_year4 = 0

if now < 1722513600 + 365 * 86400 - 1 do
  reward_year1 =
    45_000_000 - State.get("rewards_reserved", 0) - State.get("rewards_distributed", 0)

  reward_year2 = 22_500_000
  reward_year3 = 11_250_000
  reward_year4 = 8_750_000
end

if reward_year1 == 0 && now < 1722513600 + 730 * 86400 - 1 do
  reward_year2 =
    45_000_000 + 22_500_000 - State.get("rewards_reserved", 0) -
      State.get("rewards_distributed", 0)

  reward_year3 = 11_250_000
  reward_year4 = 8_750_000
end

if reward_year2 == 0 && now < 1722513600 + 1095 * 86400 - 1 do
  reward_year3 =
    45_000_000 + 22_500_000 + 11_250_000 - State.get("rewards_reserved", 0) -
      State.get("rewards_distributed", 0)

  reward_year4 = 8_750_000
end

if reward_year3 == 0 && now < 1848657600 do
  reward_year4 =
    45_000_000 + 22_500_000 + 11_250_000 + 8_750_000 -
      State.get("rewards_reserved", 0) - State.get("rewards_distributed", 0)
end

years = [
  [
    year: 1,
    start: 1722513600,
    end: 1722513600 + 365 * 86400 - 1,
    rewards: reward_year1
  ],
  [
    year: 2,
    start: 1722513600 + 365 * 86400,
    end: 1722513600 + 730 * 86400 - 1,
    rewards: reward_year2
  ],
  [
    year: 3,
    start: 1722513600 + 730 * 86400,
    end: 1722513600 + 1095 * 86400 - 1,
    rewards: reward_year3
  ],
  [
    year: 4,
    start: 1722513600 + 1095 * 86400,
    end: 1848657600,
    rewards: reward_year4
  ]
]

reward_token_balance = nil

if "UCO" == "UCO" do
  reward_token_balance = contract.balance.uco
else
  key = [token_address: "UCO", token_id: 0]
  reward_token_balance = Map.get(contract.balance.tokens, key, 0)
end

weight_by_level = Map.new()
weight_by_level = Map.set(weight_by_level, "0", 0)
weight_by_level = Map.set(weight_by_level, "1", 0.013)
weight_by_level = Map.set(weight_by_level, "2", 0.024)
weight_by_level = Map.set(weight_by_level, "3", 0.043)
weight_by_level = Map.set(weight_by_level, "4", 0.077)
weight_by_level = Map.set(weight_by_level, "5", 0.139)
weight_by_level = Map.set(weight_by_level, "6", 0.251)
weight_by_level = Map.set(weight_by_level, "7", 0.453)

available_levels = Map.new()
available_levels = Map.set(available_levels, "0", now + 0)
available_levels = Map.set(available_levels, "1", now + 7 * 86400)
available_levels = Map.set(available_levels, "2", now + 30 * 86400)
available_levels = Map.set(available_levels, "3", now + 90 * 86400)
available_levels = Map.set(available_levels, "4", now + 180 * 86400)
available_levels = Map.set(available_levels, "5", now + 365 * 86400)
available_levels = Map.set(available_levels, "6", now + 730 * 86400)
available_levels = Map.set(available_levels, "7", now + 1095 * 86400)

filtered_levels = Map.new()

end_reached = false

for level in Map.keys(available_levels) do
  start_level = Map.get(available_levels, level)

  if start_level < 1848657600 do
    filtered_levels = Map.set(filtered_levels, level, start_level)
  else
    if !end_reached && Map.size(filtered_levels) > 0 do
      filtered_levels = Map.set(filtered_levels, level, 1848657600)
      end_reached = true
    end
  end
end

lp_tokens_deposited_by_level = State.get("lp_tokens_deposited_by_level", Map.new())
lp_tokens_deposited_weighted = 0

for level in Map.keys(lp_tokens_deposited_by_level) do
  lp_tokens_deposited_weighted =
    lp_tokens_deposited_weighted +
      lp_tokens_deposited_by_level[level] * weight_by_level[level]
end

deposits_count_by_level = Map.new()

for user_deposits in Map.values(State.get("deposits", Map.new())) do
  for user_deposit in user_deposits do
    deposits_count_by_level =
      Map.set(
        deposits_count_by_level,
        user_deposit.level,
        Map.get(deposits_count_by_level, user_deposit.level, 0) + 1
      )
  end
end

stats = Map.new()

for level in Map.keys(available_levels) do
  remaining_rewards = []

  for y in years do
    rewards = 0

    if lp_tokens_deposited_weighted > 0 do
      rewards =
        Map.get(lp_tokens_deposited_by_level, level, 0) * weight_by_level[level] /
          lp_tokens_deposited_weighted * y.rewards
    end

    remaining_rewards =
      List.append(remaining_rewards, start: y.start, end: y.end, remaining_rewards: rewards)
  end

  stats =
    Map.set(stats, level,
      weight: weight_by_level[level],
      lp_tokens_deposited: Map.get(lp_tokens_deposited_by_level, level, 0),
      deposits_count: Map.get(deposits_count_by_level, level, 0),
      remaining_rewards: remaining_rewards
    )
end

[
  lp_token_address: 0x0000D1B4A0597A033F7DD0C8CA274745F850A990725B7B73B5E8CEBC7C4F9EA82954,
  reward_token: "UCO",
  start_date: 1722513600,
  end_date: 1848657600,
  lp_tokens_deposited: State.get("lp_tokens_deposited", 0),
  remaining_rewards: reward_token_balance - State.get("rewards_reserved", 0),
  rewards_distributed: State.get("rewards_distributed", 0),
  available_levels: filtered_levels,
  stats: stats
]
end

export fun(get_user_infos(user_genesis_address)) do
reply = []

for user_deposit in Map.get(
      State.get("deposits", Map.new()),
      String.to_hex(user_genesis_address),
      []
    ) do
  info = [
    id: user_deposit.id,
    amount: user_deposit.amount,
    reward_amount: user_deposit.reward_amount,
    level: user_deposit.level
  ]

  if user_deposit.end > Time.now() do
    info = Map.set(info, "end", user_deposit.end)
    info = Map.set(info, "start", user_deposit.start)
  end

  reply = List.append(reply, info)
end

reply
end

fun get_user_genesis() do
Chain.get_genesis_address(Chain.get_previous_address(transaction))
end

fun get_user_deposit_or_throw(deposits, user_genesis_address, deposit_id) do
reply = nil

for user_deposit in Map.get(deposits, user_genesis_address, []) do
  if user_deposit.id == deposit_id do
    reply = user_deposit
  end
end

if reply == nil do
  throw(message: "deposit not found", code: 6004)
end

reply
end

fun set_user_deposit(deposits, user_genesis_address, deposit) do
updated_user_deposits = []

for user_deposit in Map.get(deposits, user_genesis_address, []) do
  if user_deposit.id == deposit.id do
    updated_user_deposits = List.prepend(updated_user_deposits, deposit)
  else
    updated_user_deposits = List.prepend(updated_user_deposits, user_deposit)
  end
end

Map.set(deposits, user_genesis_address, updated_user_deposits)
end

fun remove_user_deposit(deposits, user_genesis_address, deposit_id) do
updated_user_deposits = []

for user_deposit in Map.get(deposits, user_genesis_address, []) do
  if user_deposit.id != deposit_id do
    updated_user_deposits = List.prepend(updated_user_deposits, user_deposit)
  end
end

if List.size(updated_user_deposits) == 0 do
  Map.delete(deposits, user_genesis_address)
else
  Map.set(deposits, user_genesis_address, updated_user_deposits)
end
end

fun end_timestamp_from_level_or_throw(level, rounded_now) do
end_timestamp = nil

if !List.in?(["max", "flex", "0", "1", "2", "3", "4", "5", "6", "7"], level) do
  throw(message: "invalid level", code: 6000)
end

if level == "max" do
  if 1848657600 - rounded_now < 3 * 365 * 86400 do
    end_timestamp = 1848657600
  else
    throw(message: "max only available when less than 3 years remaining", code: 6001)
  end
else
  if List.in?(["flex", "0"], level) do
    end_timestamp = 0
  else
    duration_by_level = Map.new()
    duration_by_level = Map.set(duration_by_level, "1", 7 * 86400)
    duration_by_level = Map.set(duration_by_level, "2", 30 * 86400)
    duration_by_level = Map.set(duration_by_level, "3", 90 * 86400)
    duration_by_level = Map.set(duration_by_level, "4", 180 * 86400)
    duration_by_level = Map.set(duration_by_level, "5", 365 * 86400)
    duration_by_level = Map.set(duration_by_level, "6", 730 * 86400)
    duration_by_level = Map.set(duration_by_level, "7", 1095 * 86400)

    end_timestamp = rounded_now + duration_by_level[level]

    if end_timestamp > 1848657600 do
      throw(message: "lock's end cannot be greater than farm's end", code: 6002)
    end

    if end_timestamp <= 1722513600 do
      throw(message: "lock's end cannot be lesser than farm's start", code: 6003)
    end
  end
end

end_timestamp
end

fun normalize_level(level, rounded_now) do
normalized_level = nil

if List.in?(["0", "1", "2", "3", "4", "5", "6", "7"], level) do
  normalized_level = level
end

if level == "flex" do
  normalized_level = "0"
end

if level == "max" do
  duration_by_level = Map.new()
  duration_by_level = Map.set(duration_by_level, "0", 0)
  duration_by_level = Map.set(duration_by_level, "1", 7 * 86400)
  duration_by_level = Map.set(duration_by_level, "2", 30 * 86400)
  duration_by_level = Map.set(duration_by_level, "3", 90 * 86400)
  duration_by_level = Map.set(duration_by_level, "4", 180 * 86400)
  duration_by_level = Map.set(duration_by_level, "5", 365 * 86400)
  duration_by_level = Map.set(duration_by_level, "6", 730 * 86400)
  duration_by_level = Map.set(duration_by_level, "7", 1095 * 86400)

  for l in Map.keys(duration_by_level) do
    if normalize_level == nil && end_timestamp <= rounded_now + duration_by_level[l] do
      normalize_level = l
    end
  end
end

normalized_level
end

Content (0 B)

State (30.5 KB)

 
{
  "deposits": {
    "000065ED9197B2A42733A3B013918A99978FC7B0B1D122C7CFD4C2771ACA32A9A498": [
      {
        "amount": 1012.34031492,
        "end": 1753675200,
        "id": "1722142705",
        "level": "5",
        "reward_amount": 57695.46107899,
        "start": 1722139200
      }
    ],
    "00005A8AD2778CF4E75EF89CCAC998933DF85BC77554CA613AD9C57614F96C84BC7D": [
      {
        "amount": 0.87519426,
        "end": 1726743600,
        "id": "1724154892",
        "level": "2",
        "reward_amount": 0.10468835,
        "start": 1724151600
      }
    ],
    "0000252072D93B1C449ACC6CF87E775CF3A2B3DA2C12EF46383727AE0506BE523710": [
      {
        "amount": 171.49774951,
        "end": 1817028000,
        "id": "1722420833",
        "level": "7",
        "reward_amount": 31852.75329014,
        "start": 1722420000
      }
    ],
    "000046EDE1CCA30F2CF949644A1E96B7C9B068DB9B19B62A36DF01141A4F6E9100C8": [
      {
        "amount": 64.51723278,
        "end": 1739552400,
        "id": "1724002504",
        "level": "4",
        "reward_amount": 160.25719266,
        "start": 1724000400
      }
    ],
    "0000826DEC97863D0818C0640973AADE01E0C777305109A83C5FB4EA225464E4790B": [
      {
        "amount": 13.89066514,
        "end": 1817103600,
        "id": "1722497039",
        "level": "7",
        "reward_amount": 2579.94156659,
        "start": 1722495600
      },
      {
        "amount": 4.7798319,
        "end": 1730296800,
        "id": "1722524308",
        "level": "3",
        "reward_amount": 83.8119711,
        "start": 1722520800
      }
    ],
    "0000BCD3704EE34991D1089D301EB3909BBC9BA3CDDFA8EA813DBA8672AF9F633CA8": [
      {
        "amount": 5.40278223,
        "end": 1738004400,
        "id": "1722453909",
        "level": "4",
        "reward_amount": 170.58882164,
        "start": 1722452400
      }
    ],
    "00005EC81836452C89EEBDC720E3E39915E86043088DF9F6FA064EACF3370CE2C028": [
      {
        "amount": 27.26909363,
        "end": 1817755200,
        "id": "1723150189",
        "level": "7",
        "reward_amount": 2858.91273211,
        "start": 1723147200
      }
    ],
    "0000E8078E064F1726753697FEE0290FA9BFE7B03608517F29632029E74AC7904819": [
      {
        "amount": 423.85680262,
        "end": 1754035200,
        "id": "1722499733",
        "level": "5",
        "reward_amount": 24156.51418137,
        "start": 1722499200
      },
      {
        "amount": 423.85680263,
        "end": 1817107200,
        "id": "1722499858",
        "level": "7",
        "reward_amount": 78724.11921529,
        "start": 1722499200
      }
    ],
    "000009FF674C87EAE7F4C98977E366BFBEA91CB2A017C9097A17058EE15A7C09B87F": [
      {
        "amount": 47.37426983,
        "end": 1816794000,
        "id": "1722189498",
        "level": "7",
        "reward_amount": 8798.94804335,
        "start": 1722186000
      },
      {
        "amount": 47.37426984,
        "end": 1729962000,
        "id": "1722189537",
        "level": "3",
        "reward_amount": 835.32298866,
        "start": 1722186000
      }
    ],
    "000092174345CF579DCA98B190387763669BC5D1A45A737F5AF17ABAF5E2B27C8DF7": [
      {
        "amount": 39.53442209,
        "end": 1816542000,
        "id": "1721934957",
        "level": "7",
        "reward_amount": 7342.83067472,
        "start": 1721934000
      }
    ],
    "0000D6E65A30304EE9909CA661F2229408048CE7DB515CD2A9D38E63A0CBA44076AE": [
      {
        "amount": 24.53218931,
        "end": 1785524400,
        "id": "1722453868",
        "level": "6",
        "reward_amount": 2524.67525697,
        "start": 1722452400
      },
      {
        "amount": 98.12875723,
        "end": 1738004400,
        "id": "1722453752",
        "level": "4",
        "reward_amount": 3098.35048433,
        "start": 1722452400
      },
      {
        "amount": 0.24513861,
        "end": 1816610400,
        "id": "1722003018",
        "level": "7",
        "reward_amount": 45.52039567,
        "start": 1722002400
      },
      {
        "amount": 49.06437862,
        "end": 1753988400,
        "id": "1722453803",
        "level": "5",
        "reward_amount": 2796.28436834,
        "start": 1722452400
      },
      {
        "amount": 24.53218931,
        "end": 1817060400,
        "id": "1722453904",
        "level": "7",
        "reward_amount": 4556.4233042,
        "start": 1722452400
      }
    ],
    "0000D620FC554D881E327CC59321CD09CDF3B1C3FBA201A2A58FE9B9B0F3B696FBCE": [
      {
        "amount": 27.03971832,
        "end": 1817629200,
        "id": "1723022105",
        "level": "7",
        "reward_amount": 3255.93266351,
        "start": 1723021200
      },
      {
        "amount": 4.52073371,
        "end": 1817575200,
        "id": "1722967412",
        "level": "7",
        "reward_amount": 574.56563347,
        "start": 1722967200
      }
    ],
    "0000FB9D022F9A2BABE63AD726FC8038958A73F8999170CD0DE666716911B37D57CD": [
      {
        "amount": 51.03800725,
        "end": 1816887600,
        "id": "1722279880",
        "level": "7",
        "reward_amount": 9479.4256512,
        "start": 1722279600
      }
    ],
    "00003BC98F60FA93EE3CF4460CAB7CE7206745F04722B7521480695429EDF731FDE2": [
      {
        "amount": 2988.25934822,
        "end": 1816617600,
        "id": "1722011226",
        "level": "7",
        "reward_amount": 555017.88941734,
        "start": 1722009600
      },
      {
        "amount": 342.70907838,
        "end": 1785740400,
        "id": "1722669540",
        "level": "6",
        "reward_amount": 31252.7464494,
        "start": 1722668400
      }
    ],
    "0000B10AC91AC815D0914645315546479564BC330FC92868B56FC7B505708278B776": [
      {
        "amount": 35.20322403,
        "end": 1817121600,
        "id": "1722516784",
        "level": "7",
        "reward_amount": 6538.3882151,
        "start": 1722513600
      }
    ],
    "000044305A6A17545FCF99E6DC1D6AAD4A53519877FD44E9BD26DB054B511CAE338F": [
      {
        "amount": 68.88470637,
        "end": 1816977600,
        "id": "1721973718",
        "level": "7",
        "reward_amount": 12794.14387999,
        "start": 1722369600
      },
      {
        "amount": 122.34781822,
        "end": 1730556000,
        "id": "1722783119",
        "level": "3",
        "reward_amount": 1746.23485013,
        "start": 1722780000
      }
    ],
    "00002F6D49B04D55B9B553068CFFBCF4E8D410F4E270748FC5E8DD7BC1791BE13974": [
      {
        "amount": 15.69235238,
        "end": 1818151200,
        "id": "1723543970",
        "level": "7",
        "reward_amount": 919.54742968,
        "start": 1723543200
      }
    ],
    "0000D3696485926B9B46FD6B532F26ADF44B2B5E1B1A6718519B8628C34D0E0487F3": [
      {
        "amount": 0.01,
        "end": 1729702800,
        "id": "1721929395",
        "level": "3",
        "reward_amount": 0.17612516,
        "start": 1721926800
      },
      {
        "amount": 0.01,
        "end": 0,
        "id": "1721929342",
        "level": "0",
        "reward_amount": 7.3809e-4,
        "start": null
      },
      {
        "amount": 0.01,
        "end": 1724518800,
        "id": "1721929367",
        "level": "1",
        "reward_amount": 0.09302181,
        "start": 1721926800
      },
      {
        "amount": 0.01,
        "end": 1784998800,
        "id": "1721929424",
        "level": "6",
        "reward_amount": 1.02828959,
        "start": 1721926800
      },
      {
        "amount": 0.01,
        "end": 0,
        "id": "1721929501",
        "level": "0",
        "reward_amount": 3.9793e-4,
        "start": null
      }
    ],
    "0000FDEBA3D305BED46E068C5333ED2D8FFFEEFA016B4E2AF505D98AED22079751CE": [
      {
        "amount": 29.39010433,
        "end": 1818018000,
        "id": "1723412600",
        "level": "7",
        "reward_amount": 2165.28331302,
        "start": 1723410000
      }
    ],
    "0000EBFE35D4B9964DC41D0AC22764B67407F20F9B309E26E1D1487AF35F6755A6AD": [
      {
        "amount": 60.0,
        "end": 1729796400,
        "id": "1722020692",
        "level": "3",
        "reward_amount": 1057.94513143,
        "start": 1722020400
      },
      {
        "amount": 20.0,
        "end": 1816628400,
        "id": "1722020533",
        "level": "7",
        "reward_amount": 3714.64671112,
        "start": 1722020400
      },
      {
        "amount": 40.0,
        "end": 1816628400,
        "id": "1722020474",
        "level": "7",
        "reward_amount": 7429.30436219,
        "start": 1722020400
      },
      {
        "amount": 67.67810588,
        "end": 1724612400,
        "id": "1722020752",
        "level": "1",
        "reward_amount": 643.03438347,
        "start": 1722020400
      }
    ],
    "00005C2BD26B5D2F4FF11FFD99819956951F4B693561537148234FFED99D20DB4F91": [
      {
        "amount": 34.70006897,
        "end": 1817103600,
        "id": "1722496906",
        "level": "7",
        "reward_amount": 6444.93312654,
        "start": 1722495600
      },
      {
        "amount": 7.76231264,
        "end": 1730296800,
        "id": "1722524267",
        "level": "3",
        "reward_amount": 136.10850598,
        "start": 1722520800
      }
    ],
    "0000F3C03F61A33CB9E95774AF19D956542D3284F90113A3E5837274CA9D258E4FA5": [
      {
        "amount": 45.0,
        "end": 1816844400,
        "id": "1721977068",
        "level": "7",
        "reward_amount": 8357.96845868,
        "start": 1722236400
      },
      {
        "amount": 30.0,
        "end": 1816581600,
        "id": "1721976242",
        "level": "7",
        "reward_amount": 5571.97493897,
        "start": 1721973600
      },
      {
        "amount": 41.75002557,
        "end": 1817125200,
        "id": "1721977125",
        "level": "7",
        "reward_amount": 7732.97510833,
        "start": 1722517200
      }
    ],
    "00007BFD0BCB91C1AB0D67F6D1954085441EC68908D5DDAAADC31D901D635EB56ADC": [
      {
        "amount": 5.31061114,
        "end": 1753995600,
        "id": "1722461441",
        "level": "5",
        "reward_amount": 302.66240989,
        "start": 1722459600
      },
      {
        "amount": 21.24244457,
        "end": 1817067600,
        "id": "1722461363",
        "level": "7",
        "reward_amount": 3945.40932581,
        "start": 1722459600
      },
      {
        "amount": 10.62122228,
        "end": 1785531600,
        "id": "1722461401",
        "level": "6",
        "reward_amount": 1093.05899665,
        "start": 1722459600
      },
      {
        "amount": 5.31061115,
        "end": 1738011600,
        "id": "1722461473",
        "level": "4",
        "reward_amount": 167.6787489,
        "start": 1722459600
      }
    ],
    "000099158E2C0FC1E717A1A8FCE1752EF366E20EAAA4CE9F38BAE864C13A32EAC9E6": [
      {
        "amount": 10.00551293,
        "end": 1816657200,
        "id": "1722050840",
        "level": "7",
        "reward_amount": 1858.34301565,
        "start": 1722049200
      }
    ],
    "00001C7C3F80CB5C15EB2537DF422A7EF4D55431EC05B30AED13EE5B7E1F81767487": [
      {
        "amount": 46.16596175,
        "end": 1724655600,
        "id": "1722063881",
        "level": "1",
        "reward_amount": 442.76096009,
        "start": 1722063600
      },
      {
        "amount": 1.22352126,
        "end": 0,
        "id": "1722064320",
        "level": "0",
        "reward_amount": 0.74338033,
        "start": null
      }
    ],
    "0000D8C63858B8062159808FA02E80C64F2BB119E13F52B9C81F7B178A971402F691": [
      {
        "amount": 1.9771422,
        "end": 1816542000,
        "id": "1721934986",
        "level": "7",
        "reward_amount": 367.21157846,
        "start": 1721934000
      },
      {
        "amount": 26.32529758,
        "end": 1817215200,
        "id": "1721934053",
        "level": "7",
        "reward_amount": 4550.00936357,
        "start": 1722607200
      }
    ],
    "00009B6AD59D37AAAAD1747B0B9E54D43AB03A3E2B991BCF6EC876FF1A0D0E6AB14D": [
      {
        "amount": 42.51770246,
        "end": 1817064000,
        "id": "1722458621",
        "level": "7",
        "reward_amount": 7896.92333093,
        "start": 1722456000
      }
    ],
    "00002B4F50927C12B2D51BF740B8DF859F2D5A97B360DF36DA6316EED20AD3497F69": [
      {
        "amount": 758.78276272,
        "end": 1818511200,
        "id": "1723904155",
        "level": "7",
        "reward_amount": 17425.70061542,
        "start": 1723903200
      }
    ],
    "000001F572D6467EDC154E09FA0B58BF5D7DC9D41EA0315C43610EF1406320934401": [
      {
        "amount": 1329.13816876,
        "end": 1724565600,
        "id": "1721975702",
        "level": "1",
        "reward_amount": 686.57822803,
        "start": 1723960800
      }
    ],
    "00001E3A03626544B66D236F259AF26A6BDA73EBF6C3EFE84DB351A57BEEA776F338": [
      {
        "amount": 61.98573547,
        "end": 1816862400,
        "id": "1722256545",
        "level": "7",
        "reward_amount": 11512.77603825,
        "start": 1722254400
      }
    ],
    "00007633A19FA04D0AEB498A13F0036F4A57B6B8D51A482B21856E2FEEA2062D2E1B": [
      {
        "amount": 105.01724955,
        "end": 1724770800,
        "id": "1722179896",
        "level": "1",
        "reward_amount": 1030.63118204,
        "start": 1722178800
      }
    ],
    "0000A4E8AAD6D7C5A7E98600D8ECA42D067CA9381AAD0CB1CD1C2B887FD3CF6DE9F9": [
      {
        "amount": 22.49541696,
        "end": 1755403200,
        "id": "1723869811",
        "level": "5",
        "reward_amount": 181.22682186,
        "start": 1723867200
      },
      {
        "amount": 53.50219411,
        "end": 1818734400,
        "id": "1724128095",
        "level": "7",
        "reward_amount": 226.5048844,
        "start": 1724126400
      }
    ],
    "00005CE8B2DF75E028E3A597C002168CE3515FDEFADCB690A54A214B7CC33D97D877": [
      {
        "amount": 182.18728409,
        "end": 1817139600,
        "id": "1722532691",
        "level": "7",
        "reward_amount": 33373.0793937,
        "start": 1722531600
      }
    ],
    "0000C15B3E78CC1D87238E3BFAAD5CF05CD56BA2160E1D68E8BEF7C5010B4AC87217": [
      {
        "amount": 29.50526354,
        "end": 1724241600,
        "id": "1723637961",
        "level": "1",
        "reward_amount": 40.84928683,
        "start": 1723636800
      }
    ],
    "00001433FCDCB6526284D15595BA9D1646F6A053525C76BCDC8FBA7AAB6C10128FE5": [
      {
        "amount": 321.79211689,
        "end": 1816581600,
        "id": "1721974280",
        "level": "7",
        "reward_amount": 59767.35411313,
        "start": 1721973600
      },
      {
        "amount": 78.80771402,
        "end": 1817035200,
        "id": "1722429634",
        "level": "7",
        "reward_amount": 14637.1713656,
        "start": 1722427200
      }
    ],
    "000006FBF6B819682713C55101B6E40FD44EE4CB6FCAC79DECC9BA7937FA03B4105D": [
      {
        "amount": 107.25019302,
        "end": 1818280800,
        "id": "1721932444",
        "level": "7",
        "reward_amount": 4789.80878696,
        "start": 1723672800
      }
    ],
    "000019FC92D343ABC49E036ED1269A1519F7705DE521CD16A80568F9ACEA64AF630E": [
      {
        "amount": 3.74973406,
        "end": 1731625200,
        "id": "1723849589",
        "level": "3",
        "reward_amount": 9.94362333,
        "start": 1723849200
      },
      {
        "amount": 2.67282051,
        "end": 1818000000,
        "id": "1723394536",
        "level": "7",
        "reward_amount": 202.40798241,
        "start": 1723392000
      },
      {
        "amount": 2.6725006,
        "end": 1818014400,
        "id": "1723409213",
        "level": "7",
        "reward_amount": 197.98913515,
        "start": 1723406400
      },
      {
        "amount": 4.80992698,
        "end": 1818104400,
        "id": "1723411848",
        "level": "7",
        "reward_amount": 307.02947188,
        "start": 1723496400
      }
    ],
    "0000E82C3C5C9FC73EC8FF057BB18DE85342C3D22EC6A079F1290B5DB287E8B67B36": [
      {
        "amount": 1230.75929709,
        "end": 1817118000,
        "id": "1722510225",
        "level": "7",
        "reward_amount": 228592.41280301,
        "start": 1722510000
      }
    ],
    "0000CBA94C234B9812CADD90F969CE6283D1A9CA67646B0A1F7CDED665AE5EAF738E": [
      {
        "amount": 0.93935458,
        "end": 1785607200,
        "id": "1722537247",
        "level": "6",
        "reward_amount": 95.08031513,
        "start": 1722535200
      },
      {
        "amount": 0.1,
        "end": 1816588800,
        "id": "1721981565",
        "level": "7",
        "reward_amount": 18.56310686,
        "start": 1721980800
      },
      {
        "amount": 0.23839507,
        "end": 1754071200,
        "id": "1722537580",
        "level": "5",
        "reward_amount": 13.36219979,
        "start": 1722535200
      },
      {
        "amount": 0.21072829,
        "end": 1786190400,
        "id": "1723119516",
        "level": "6",
        "reward_amount": 12.6575771,
        "start": 1723118400
      }
    ],
    "0000B4B884CF98D325EA231AFF2EA5DC31F9C358F5FCB8B608472A3A96BE752A07F7": [
      {
        "amount": 87.28512712,
        "end": 1818262800,
        "id": "1723655698",
        "level": "7",
        "reward_amount": 4049.91951683,
        "start": 1723654800
      },
      {
        "amount": 1.58757603,
        "end": 1817373600,
        "id": "1722514679",
        "level": "7",
        "reward_amount": 241.57251438,
        "start": 1722765600
      },
      {
        "amount": 4.72304284,
        "end": 1817373600,
        "id": "1722514397",
        "level": "7",
        "reward_amount": 718.69529367,
        "start": 1722765600
      },
      {
        "amount": 18.89217137,
        "end": 1754049600,
        "id": "1722514298",
        "level": "5",
        "reward_amount": 1076.70488716,
        "start": 1722513600
      },
      {
        "amount": 37.78434274,
        "end": 1817175600,
        "id": "1722514247",
        "level": "7",
        "reward_amount": 6734.01958331,
        "start": 1722567600
      },
      {
        "amount": 9.44608568,
        "end": 1817373600,
        "id": "1722514351",
        "level": "7",
        "reward_amount": 1437.39949031,
        "start": 1722765600
      },
      {
        "amount": 254.72304285,
        "end": 1817121600,
        "id": "1722514104",
        "level": "7",
        "reward_amount": 47310.42416951,
        "start": 1722513600
      }
    ],
    "00004DC6EBEA8E26909D9E9FB1C604A7270F3A2CC804F5F64DCD03DA70CC903BC98D": [
      {
        "amount": 50.26752325,
        "end": 1737986400,
        "id": "1722437015",
        "level": "4",
        "reward_amount": 1587.16353877,
        "start": 1722434400
      }
    ],
    "00008DF280685C32B0693F69FC22C5122E1C54A9DFFEF88CE00A8828C72B4459C2F6": [
      {
        "amount": 47.94319205,
        "end": 1729713600,
        "id": "1721938117",
        "level": "3",
        "reward_amount": 845.35442392,
        "start": 1721937600
      }
    ],
    "00007C6409AF3DB9B3C6430AD466A43A186EB7144CF4289638E840E56186D3B1B9B4": [
      {
        "amount": 36.5809169,
        "end": 1818518400,
        "id": "1723911946",
        "level": "7",
        "reward_amount": 817.34522505,
        "start": 1723910400
      }
    ],
    "00001D52DD87EE906E25919F74B607790D87D17723EC9CA2B19224739708782A1D23": [
      {
        "amount": 2.96915153,
        "end": 1724522400,
        "id": "1721932389",
        "level": "1",
        "reward_amount": 27.65418428,
        "start": 1721930400
      }
    ],
    "000075EF1174A535403DF88EE3A27807B596539F09C6F63033A00A38F4E1B811AE1F": [
      {
        "amount": 1.81496057,
        "end": 1816855200,
        "id": "1722249973",
        "level": "7",
        "reward_amount": 337.0895717,
        "start": 1722247200
      }
    ],
    "0000D7F7B94DD148DCD31B25C51647090A34F2210EF612BF9C0988EA2A3C3B7B9712": [
      {
        "amount": 604.03017627,
        "end": 1816959600,
        "id": "1722353473",
        "level": "7",
        "reward_amount": 112188.23218569,
        "start": 1722351600
      },
      {
        "amount": 13.61565332,
        "end": 1817755200,
        "id": "1723150527",
        "level": "7",
        "reward_amount": 1427.47274277,
        "start": 1723147200
      }
    ],
    "00004A6F653B2A69335AF13A8F8E5512B3E53F3AFAFCF138435732199C9FAC4290C7": [
      {
        "amount": 10.9057332,
        "end": 1730217600,
        "id": "1722442119",
        "level": "3",
        "reward_amount": 192.29435082,
        "start": 1722441600
      }
    ],
    "00006D17EB8A194974555425952659CBD0F2C969CE33C0DE0EC890794FAAC5AE6A94": [
      {
        "amount": 131.01401512,
        "end": 1785168000,
        "id": "1722096944",
        "level": "6",
        "reward_amount": 13483.01809442,
        "start": 1722096000
      }
    ],
    "00003694D832E63C02120BA8697CF8FD2D4A79DB1175D8068D4772D80E2F8525147F": [
      {
        "amount": 4.47623045,
        "end": 1817791200,
        "id": "1723184982",
        "level": "7",
        "reward_amount": 449.39170868,
        "start": 1723183200
      },
      {
        "amount": 4.47623045,
        "end": 1754719200,
        "id": "1723185134",
        "level": "5",
        "reward_amount": 137.8937486,
        "start": 1723183200
      }
    ],
    "0000381ADEE3D08CE73D5BD8D98B35728546FDE56758915FA5B583A807E926049846": [
      {
        "amount": 120.67951889,
        "end": 1724634000,
        "id": "1722762931",
        "level": "1",
        "reward_amount": 42.11980724,
        "start": 1724029200
      },
      {
        "amount": 48.71435884,
        "end": 1754258400,
        "id": "1722725692",
        "level": "5",
        "reward_amount": 2356.32690755,
        "start": 1722722400
      }
    ],
    "0000DC7461F3C3EEDB63A9FEA48F458107A31866B401AF7B4BDDB8F1613CC7127F94": [
      {
        "amount": 75.55517261,
        "end": 1816700400,
        "id": "1722095617",
        "level": "7",
        "reward_amount": 14033.0661729,
        "start": 1722092400
      },
      {
        "amount": 174.29235148,
        "end": 1816538400,
        "id": "1721932760",
        "level": "7",
        "reward_amount": 32371.8036237,
        "start": 1721930400
      },
      {
        "amount": 20.0,
        "end": 1729868400,
        "id": "1722095578",
        "level": "3",
        "reward_amount": 352.64829959,
        "start": 1722092400
      },
      {
        "amount": 25.32639252,
        "end": 1816704000,
        "id": "1722096427",
        "level": "7",
        "reward_amount": 4703.93367315,
        "start": 1722096000
      }
    ],
    "0000671A0C8F7435F2CCFD6CAD5483AB34B2C51E4F78DCF5F82788A8B9259C2484D2": [
      {
        "amount": 212.99553293,
        "end": 1737554400,
        "id": "1722003953",
        "level": "4",
        "reward_amount": 6725.19356116,
        "start": 1722002400
      },
      {
        "amount": 212.99553293,
        "end": 1724594400,
        "id": "1722004019",
        "level": "1",
        "reward_amount": 2015.8226628,
        "start": 1722002400
      }
    ],
    "000064A6D0868320FE9AB0F1D3E9AE2BF405E3F71B1F7DE7D89C74CDC70824F3265A": [
      {
        "amount": 124.06037092,
        "end": 1817143200,
        "id": "1722538565",
        "level": "7",
        "reward_amount": 22663.16418167,
        "start": 1722535200
      }
    ],
    "0000BC394288E559805ED17E843BAFA2925403613EADC6E00B095EE438D380F421F6": [
      {
        "amount": 24.53124237,
        "end": 1817053200,
        "id": "1722447790",
        "level": "7",
        "reward_amount": 4556.24858707,
        "start": 1722445200
      },
      {
        "amount": 10.47721692,
        "end": 1738260000,
        "id": "1722708675",
        "level": "4",
        "reward_amount": 283.99581984,
        "start": 1722708000
      }
    ],
    "000055919C53436351B1C3C38D274410A325C9105E0CA01B3CC9BA1DBC27FDD0C0C3": [
      {
        "amount": 5.97382296,
        "end": 1818255600,
        "id": "1723647670",
        "level": "7",
        "reward_amount": 281.37525862,
        "start": 1723647600
      }
    ],
    "0000ED23150531DF35F3E3B0554C22C8D4F3987A40CD32FEA8B55AB23A7EED1C682E": [
      {
        "amount": 25.78673523,
        "end": 1817488800,
        "id": "1722880963",
        "level": "7",
        "reward_amount": 3553.70343413,
        "start": 1722880800
      }
    ],
    "00002DB9771992B93696556A34A3BFD4170C1059ED3753643F7A1FE1EAD1FCE9BF68": [
      {
        "amount": 120.276501,
        "end": 1817110800,
        "id": "1722464339",
        "level": "7",
        "reward_amount": 22339.28596826,
        "start": 1722502800
      },
      {
        "amount": 308.36502922,
        "end": 1785520800,
        "id": "1722450936",
        "level": "6",
        "reward_amount": 31734.70638834,
        "start": 1722448800
      },
      {
        "amount": 308.36502922,
        "end": 1817056800,
        "id": "1722450977",
        "level": "7",
        "reward_amount": 57273.50307506,
        "start": 1722448800
      }
    ],
    "0000F6A8A7CC3DD8711A003DC58BE1F7FC905C4A2E6980682CA24329A02C534AF3F7": [
      {
        "amount": 242.67902498,
        "end": 1818108000,
        "id": "1723503400",
        "level": "7",
        "reward_amount": 15391.52891627,
        "start": 1723500000
      },
      {
        "amount": 44.18479913,
        "end": 1818691200,
        "id": "1723888698",
        "level": "7",
        "reward_amount": 338.40386316,
        "start": 1724083200
      }
    ],
    "0000FF3CF6D72B285283A3934D2E36A62AAB56E1BCC27082919B29E6A2831F799812": [
      {
        "amount": 71.9275237,
        "end": 1816848000,
        "id": "1722242554",
        "level": "7",
        "reward_amount": 13359.29299677,
        "start": 1722240000
      }
    ],
    "0000DCB5B70BD165848F9FB8AB83894A02F674496ABF2995DE18466402D8EBFF7D15": [
      {
        "amount": 49.87971046,
        "end": 1738015200,
        "id": "1722464705",
        "level": "4",
        "reward_amount": 1574.91846604,
        "start": 1722463200
      }
    ],
    "0000FB28E1A3B78D078B674B4E3A4DBEB4C4543FF2B54B6D1841A6FCAB2DE1C0936D": [
      {
        "amount": 59.82154437,
        "end": 1737576000,
        "id": "1722024930",
        "level": "4",
        "reward_amount": 1888.82560866,
        "start": 1722024000
      }
    ],
    "0000A6C97BFB871BF34606CE6A8E7230BF5703EA9DF1945B293B3F6A082EF2EDC56D": [
      {
        "amount": 0.45519111,
        "end": 1739206800,
        "id": "1723657354",
        "level": "4",
        "reward_amount": 3.58990623,
        "start": 1723654800
      }
    ],
    "0000734ED585CD05560B237E31C1CB53ED174E5B6EB330094B5C08282D4A556A0DA6": [
      {
        "amount": 6.13298006,
        "end": 1787173200,
        "id": "1724104402",
        "level": "6",
        "reward_amount": 21.11981776,
        "start": 1724101200
      }
    ],
    "00000DE4DFF7652D9F02A67BD1218F18311A52AADE2C85AB78AF12A0E5EC7CAAA891": [
      {
        "amount": 55.59720608,
        "end": 1730559600,
        "id": "1722784184",
        "level": "3",
        "reward_amount": 791.13994511,
        "start": 1722783600
      },
      {
        "amount": 55.59720608,
        "end": 1738335600,
        "id": "1722784126",
        "level": "4",
        "reward_amount": 1416.69273718,
        "start": 1722783600
      }
    ],
    "000044EFDE184CFC2A84F5D341A39F371A9523814B3945AE8280C249728D6144B67F": [
      {
        "amount": 27.63318712,
        "end": 1817330400,
        "id": "1722552026",
        "level": "7",
        "reward_amount": 4356.04346736,
        "start": 1722722400
      }
    ],
    "0000BB806DC0F952A529897ADD7504A4EF6F3DF0ADD721448CCFC44177759AD4607E": [
      {
        "amount": 62.02815161,
        "end": 1737630000,
        "id": "1722080782",
        "level": "4",
        "reward_amount": 1958.49753151,
        "start": 1722078000
      },
      {
        "amount": 300.0,
        "end": 1785150000,
        "id": "1722080321",
        "level": "6",
        "reward_amount": 30873.83811058,
        "start": 1722078000
      },
      {
        "amount": 372.0,
        "end": 1753614000,
        "id": "1722080230",
        "level": "5",
        "reward_amount": 21201.08310538,
        "start": 1722078000
      },
      {
        "amount": 300.31032189,
        "end": 1816686000,
        "id": "1722080419",
        "level": "7",
        "reward_amount": 55777.47906109,
        "start": 1722078000
      }
    ],
    "0000464CD8E96E1E15C3EA0FE9D5D5C5210AEAA912FB65046FD8480F772D85DBB598": [
      {
        "amount": 62.47482098,
        "end": 1731477600,
        "id": "1723705188",
        "level": "3",
        "reward_amount": 248.52884343,
        "start": 1723701600
      }
    ],
    "00009E5EE80B7C5103AA4DB54611751B3E86D29BCC69561F86B44337FC92078B85B2": [
      {
        "amount": 7.3489425,
        "end": 1817802000,
        "id": "1723194465",
        "level": "7",
        "reward_amount": 728.00614725,
        "start": 1723194000
      },
      {
        "amount": 6.66048935,
        "end": 1816678800,
        "id": "1722071160",
        "level": "7",
        "reward_amount": 1237.06224016,
        "start": 1722070800
      }
    ],
    "000072CD1D5DF1A97F6992C57209B4CAC143E0F1AFD8DC2B06714FB289408ADB65B5": [
      {
        "amount": 1.42406112,
        "end": 1738148400,
        "id": "1722596701",
        "level": "4",
        "reward_amount": 42.19007943,
        "start": 1722596400
      }
    ],
    "0000E70A43E0EB702B53D4879273C38A7C3CE5FCA753B21F59194BC5A32A81619FFC": [
      {
        "amount": 3.43620376,
        "end": 1753560000,
        "id": "1722026455",
        "level": "5",
        "reward_amount": 195.83614083,
        "start": 1722024000
      }
    ],
    "0000E8CC3360749967B5E155FCC354D4196DF18BA66673CF3806CDCEEB5B0CDA130C": [
      {
        "amount": 0.19591836,
        "end": 1816581600,
        "id": "1721977192",
        "level": "7",
        "reward_amount": 36.37905894,
        "start": 1721973600
      }
    ],
    "0000BD87C2E369137110E76B3610835EE04C4B2FF17B90F8B9C5662EBD6872B9CD85": [
      {
        "amount": 32.57882219,
        "end": 1753952400,
        "id": "1722416677",
        "level": "5",
        "reward_amount": 1856.73708896,
        "start": 1722416400
      },
      {
        "amount": 32.57882219,
        "end": 1817024400,
        "id": "1722416767",
        "level": "7",
        "reward_amount": 6050.94667707,
        "start": 1722416400
      }
    ],
    "00007F8DEF6ECCA96503E21C8F5B90A13CC5EF1BEB236952C55F4727B3E93E41CCF8": [
      {
        "amount": 12.52094239,
        "end": 1729717200,
        "id": "1721942544",
        "level": "3",
        "reward_amount": 220.77441737,
        "start": 1721941200
      },
      {
        "amount": 50.0,
        "end": 1724338800,
        "id": "1721942427",
        "level": "1",
        "reward_amount": 55.6931999,
        "start": 1723734000
      },
      {
        "amount": 50.0,
        "end": 1785013200,
        "id": "1721942343",
        "level": "6",
        "reward_amount": 5145.63930306,
        "start": 1721941200
      },
      {
        "amount": 185.0,
        "end": 1816542000,
        "id": "1721934872",
        "level": "7",
        "reward_amount": 34360.56560925,
        "start": 1721934000
      },
      {
        "amount": 150.04188478,
        "end": 1729710000,
        "id": "1721934998",
        "level": "3",
        "reward_amount": 2645.60169853,
        "start": 1721934000
      },
      {
        "amount": 25.0,
        "end": 1724533200,
        "id": "1721942502",
        "level": "1",
        "reward_amount": 233.41106367,
        "start": 1721941200
      },
      {
        "amount": 12.5209424,
        "end": 1737493200,
        "id": "1721942574",
        "level": "4",
        "reward_amount": 395.34006635,
        "start": 1721941200
      }
    ],
    "00000A089C97040872F00A5AC91D247264EE1C189D89511189264166BB873550A46F": [
      {
        "amount": 3.15641778,
        "end": 1817139600,
        "id": "1722531719",
        "level": "7",
        "reward_amount": 578.18269644,
        "start": 1722531600
      }
    ],
    "0000FAE37FC2D817C6865945AEE9A41AF95E058C1C8C64C58D15F038372961E7ADF1": [
      {
        "amount": 25.0,
        "end": 1817967600,
        "id": "1722674826",
        "level": "7",
        "reward_amount": 1985.91726172,
        "start": 1723359600
      },
      {
        "amount": 60.15832309,
        "end": 1754118000,
        "id": "1722583399",
        "level": "5",
        "reward_amount": 3253.36653992,
        "start": 1722582000
      },
      {
        "amount": 125.6663019,
        "end": 1730037600,
        "id": "1722262624",
        "level": "3",
        "reward_amount": 2215.80111132,
        "start": 1722261600
      },
      {
        "amount": 33.87956458,
        "end": 1817956800,
        "id": "1722674870",
        "level": "7",
        "reward_amount": 2733.20547469,
        "start": 1723348800
      }
    ],
    "00008EB87E1B3060B0A7E45E44DFE9DA23596A08779B278F30C54036F956D5A02406": [
      {
        "amount": 0.16243241,
        "end": 1817812800,
        "id": "1723205806",
        "level": "7",
        "reward_amount": 15.86865493,
        "start": 1723204800
      }
    ],
    "00009B8A94A9423E5308DFDA578E4DC4B79315A4E70A3030BD7D053AF40CAA124714": [
      {
        "amount": 479.34637575,
        "end": 1738314000,
        "id": "1722763348",
        "level": "4",
        "reward_amount": 12435.39049538,
        "start": 1722762000
      }
    ],
    "0000B970E7B817E83B6F85BD678B0ABC69459A9FD3E78AFADCF99A6ABA06A2CA7FDE": [
      {
        "amount": 0.42556994,
        "end": 1738051200,
        "id": "1722501635",
        "level": "4",
        "reward_amount": 13.43652962,
        "start": 1722499200
      }
    ],
    "0000FF978269EAB73B174410CF09E346A5947B1DFFEE59CF3074040913C14056D9F6": [
      {
        "amount": 1.97280053,
        "end": 1738072800,
        "id": "1721929526",
        "level": "4",
        "reward_amount": 61.94355012,
        "start": 1722520800
      }
    ],
    "00008330CD9373E57D9E870E2C967704CF3E79E7377E8466FAA85FE9A3461519DDE9": [
      {
        "amount": 40.81427052,
        "end": 1753736400,
        "id": "1722202601",
        "level": "5",
        "reward_amount": 2326.09262927,
        "start": 1722200400
      },
      {
        "amount": 20.0,
        "end": 1787104800,
        "id": "1722171304",
        "level": "6",
        "reward_amount": 131.38110549,
        "start": 1724032800
      },
      {
        "amount": 60.0,
        "end": 1737752400,
        "id": "1722202561",
        "level": "4",
        "reward_amount": 1894.46001436,
        "start": 1722200400
      }
    ],
    "0000E852F2C7991670CD5E54275FB3DFA30D1304370421A0E7956E7B91320957596A": [
      {
        "amount": 24.96985465,
        "end": 1726340400,
        "id": "1723750688",
        "level": "2",
        "reward_amount": 49.53051848,
        "start": 1723748400
      },
      {
        "amount": 14.87378641,
        "end": 1726416000,
        "id": "1723825591",
        "level": "2",
        "reward_amount": 23.87060601,
        "start": 1723824000
      }
    ],
    "000075841943354A1464AB072DA34D74F6341FAF821245C7FA06FE2F5F737C6070DB": [
      {
        "amount": 0.0001,
        "end": 0,
        "id": "1723152612",
        "level": "0",
        "reward_amount": 1.7899e-4,
        "start": null
      },
      {
        "amount": 1.0e-5,
        "end": 1737478800,
        "id": "1721929396",
        "level": "4",
        "reward_amount": 3.922e-5,
        "start": 1721926800
      },
      {
        "amount": 1.0e-5,
        "end": 1816534800,
        "id": "1721929225",
        "level": "7",
        "reward_amount": 0.0,
        "start": 1721926800
      },
      {
        "amount": 1.0e-5,
        "end": 1816534800,
        "id": "1721929299",
        "level": "7",
        "reward_amount": 0.0,
        "start": 1721926800
      },
      {
        "amount": 1.0e-5,
        "end": 1753462800,
        "id": "1721929358",
        "level": "5",
        "reward_amount": 0.0,
        "start": 1721926800
      },
      {
        "amount": 0.001,
        "end": 1754683200,
        "id": "1723150484",
        "level": "5",
        "reward_amount": 0.03177311,
        "start": 1723147200
      },
      {
        "amount": 1.0e-5,
        "end": 1786222800,
        "id": "1723152030",
        "level": "6",
        "reward_amount": 0.0,
        "start": 1723150800
      }
    ],
    "0000B0BE24E8884C4D245E8F6EDD9A52199ADC4E08CC99951462DD8578921F139DE6": [
      {
        "amount": 8.86339504,
        "end": 1817197200,
        "id": "1721933039",
        "level": "7",
        "reward_amount": 1553.48917614,
        "start": 1722589200
      },
      {
        "amount": 4.53317158,
        "end": 1817568000,
        "id": "1722961053",
        "level": "7",
        "reward_amount": 580.18933808,
        "start": 1722960000
      }
    ],
    "000004ABDBE9D35795ED9A78D0849805B885E116F6F40FF90D35DB568F15F6D1C652": [
      {
        "amount": 260.33469399,
        "end": 1817899200,
        "id": "1723293493",
        "level": "7",
        "reward_amount": 22725.11177847,
        "start": 1723291200
      }
    ],
    "00007FA07F4C3672640E3FD681E0FAE3C80863DD7908C1F81922E5AFD0587933703A": [
      {
        "amount": 0.44083593,
        "end": 1724565600,
        "id": "1721976734",
        "level": "1",
        "reward_amount": 4.14570112,
        "start": 1721973600
      },
      {
        "amount": 3.26021228,
        "end": 1753509600,
        "id": "1721976509",
        "level": "5",
        "reward_amount": 185.80550306,
        "start": 1721973600
      }
    ],
    "000078419299567E0F2FCD8C9D27EE704D1E67AA3F16D60676E4E59B6B553A408A7E": [
      {
        "amount": 439.71716668,
        "end": 1738339200,
        "id": "1722787622",
        "level": "4",
        "reward_amount": 11170.89251492,
        "start": 1722787200
      }
    ],
    "000032DC502B02DEC57A8E5C2246255DA7C246BA71AB9E0D360FCBC9B4DF6D00B96C": [
      {
        "amount": 75.78370887,
        "end": 1816542000,
        "id": "1721935026",
        "level": "7",
        "reward_amount": 14075.51482337,
        "start": 1721934000
      }
    ],
    "0000F1FA618295609C88112355B27B6408B4516FADBE52F1F5055773EF0D21481709": [
      {
        "amount": 100.0,
        "end": 1816549200,
        "id": "1721941422",
        "level": "7",
        "reward_amount": 18573.2752242,
        "start": 1721941200
      },
      {
        "amount": 132.0,
        "end": 1785013200,
        "id": "1721941249",
        "level": "6",
        "reward_amount": 13584.48869846,
        "start": 1721941200
      },
      {
        "amount": 250.0,
        "end": 1730365200,
        "id": "1722548174",
        "level": "3",
        "reward_amount": 4159.30241868,
        "start": 1722589200
      }
    ],
    "0000FC1BE15494A76BFD2DFF8E20AD98BB1CD30F341144547F8F059C430D3387ED6D": [
      {
        "amount": 1859.77238396,
        "end": 1738789200,
        "id": "1723240504",
        "level": "4",
        "reward_amount": 29632.30892702,
        "start": 1723237200
      },
      {
        "amount": 2.49600361,
        "end": 1817478000,
        "id": "1722872077",
        "level": "7",
        "reward_amount": 347.3240773,
        "start": 1722870000
      }
    ],
    "00008A4CB8CEA0D05A77DC99A98378D4D5DB614ACF9D643102B2C9A7B25362E17BA7": [
      {
        "amount": 0.48461404,
        "end": 1818666000,
        "id": "1724060289",
        "level": "7",
        "reward_amount": 4.70585681,
        "start": 1724058000
      }
    ],
    "00003912E3ACB6D77934667E13274828D5AD9AC54A887B5D050C0935ACCCDA8D1E40": [
      {
        "amount": 17.67651906,
        "end": 1817049600,
        "id": "1722444656",
        "level": "7",
        "reward_amount": 3283.10153014,
        "start": 1722441600
      },
      {
        "amount": 17.67651906,
        "end": 1753977600,
        "id": "1722444706",
        "level": "5",
        "reward_amount": 1007.42195324,
        "start": 1722441600
      }
    ],
    "0000092A47748F78775B696FC9376E24AF2927B73E1E4B8D0A1ADFCEA1367B4CB509": [
      {
        "amount": 1.01595724,
        "end": 1816959600,
        "id": "1722354784",
        "level": "7",
        "reward_amount": 188.68750623,
        "start": 1722351600
      }
    ],
    "000073A7AC558F5016CB4892C7827C520A219196863D29C83BD6EF0A570BB2E4B592": [
      {
        "amount": 10.43290415,
        "end": 1738245600,
        "id": "1722696182",
        "level": "4",
        "reward_amount": 286.04017341,
        "start": 1722693600
      },
      {
        "amount": 2.6120638,
        "end": 1817301600,
        "id": "1722696281",
        "level": "7",
        "reward_amount": 421.31368184,
        "start": 1722693600
      }
    ],
    "00007A37924F7BD618236ACE864E9FA1FBAFAB393DD45ED65B3A5A7940BECB39FC04": [
      {
        "amount": 1.91991801,
        "end": 1818183600,
        "id": "1723577244",
        "level": "7",
        "reward_amount": 105.56648688,
        "start": 1723575600
      }
    ],
    "000032687AA8603CA859AEFB8E12CDFB6D28916B2C09E73DB3BA543F09B222A98403": [
      {
        "amount": 110.69792489,
        "end": 1816876800,
        "id": "1722269359",
        "level": "7",
        "reward_amount": 20560.22985615,
        "start": 1722268800
      }
    ],
    "0000FD163D0CAD7CF62A6239A037EDABC27AD8467AD2898F899A88C7200DE2FB657A": [
      {
        "amount": 74.16892683,
        "end": 1729735200,
        "id": "1721959925",
        "level": "3",
        "reward_amount": 1307.77767002,
        "start": 1721959200
      }
    ],
    "00005AEEBCB336D2FFA88CF5F2C7DD3DD04C6F2A605C9D48DBEEC3C3F9552F9BD9DE": [
      {
        "amount": 1.0e-5,
        "end": 1817049600,
        "id": "1722442008",
        "level": "7",
        "reward_amount": 0.0,
        "start": 1722441600
      }
    ],
    "0000D0ED2F9A85E76DA39A96AB4A91600BF254197718E52452B25B44572BB24ED648": [
      {
        "amount": 545.14672285,
        "end": 1817290800,
        "id": "1722493634",
        "level": "7",
        "reward_amount": 88682.63351815,
        "start": 1722682800
      }
    ],
    "00003933C19DE8F6195AD0F7103D928C52A0B831DCA872F32740F0400C6998CA9CCB": [
      {
        "amount": 49.68521042,
        "end": 1725364800,
        "id": "1722775181",
        "level": "2",
        "reward_amount": 398.17913722,
        "start": 1722772800
      }
    ],
    "000078568EA8D66A60EC971FF34A4A53487674EDBB88CF58ED2BB73AD05CE21A94E8": [
      {
        "amount": 2.82762956,
        "end": 1726599600,
        "id": "1722782115",
        "level": "2",
        "reward_amount": 2.09738731,
        "start": 1724007600
      }
    ],
    "0000801092626879C235480C13BFC18B9568CA51649E42C3BED6D8AC482D4B91F9C5": [
      {
        "amount": 2.0,
        "end": 1738476000,
        "id": "1722927446",
        "level": "4",
        "reward_amount": 45.02642796,
        "start": 1722924000
      },
      {
        "amount": 0.36723386,
        "end": 1816779600,
        "id": "1722174812",
        "level": "7",
        "reward_amount": 68.1974695,
        "start": 1722171600
      },
      {
        "amount": 3.70605259,
        "end": 1816812000,
        "id": "1722204811",
        "level": "7",
        "reward_amount": 688.32672854,
        "start": 1722204000
      },
      {
        "amount": 23.00584072,
        "end": 1817532000,
        "id": "1722927504",
        "level": "7",
        "reward_amount": 3047.09198562,
        "start": 1722924000
      }
    ],
    "00007F1492C7E870854B53AD203A499739CCB6F89CD27815BBC4BDD3BE81222C9440": [
      {
        "amount": 1.4037579,
        "end": 1817204400,
        "id": "1722598748",
        "level": "7",
        "reward_amount": 244.6623694,
        "start": 1722596400
      }
    ],
    "0000BBC821314DDC42500CE5323C1FEBF4FAD1DD23B66D2A6E26056B7DE4BAC368BE": [
      {
        "amount": 50.47108125,
        "end": 1818446400,
        "id": "1723839883",
        "level": "7",
        "reward_amount": 1460.92231705,
        "start": 1723838400
      }
    ],
    "0000658314D9BA0FEFFE2F5DE0813BC53B25D3CDD49A54D59C991E8790A7F5375D5B": [
      {
        "amount": 174.28968373,
        "end": 1754226000,
        "id": "1722690048",
        "level": "5",
        "reward_amount": 8650.65508036,
        "start": 1722690000
      }
    ],
    "0000B0545556A79213679C1CF272B02D979C4E19400B44129989F81627A61C521716": [
      {
        "amount": 89.19491166,
        "end": 1817024400,
        "id": "1722418516",
        "level": "7",
        "reward_amount": 16566.41325711,
        "start": 1722416400
      }
    ],
    "00005B4473C5D282EBC71AF34C1E78870510C81BE8384493468500047E2B4FF9A000": [
      {
        "amount": 19.05256979,
        "end": 1729940400,
        "id": "1722165282",
        "level": "3",
        "reward_amount": 335.94278188,
        "start": 1722164400
      }
    ],
    "0000D098F675C8F040C1E25B25891F317E4857B9550A8FED31A2C3C3B759A39FA75B": [
      {
        "amount": 184.24142176,
        "end": 1731168000,
        "id": "1723393405",
        "level": "3",
        "reward_amount": 1324.41995024,
        "start": 1723392000
      }
    ],
    "00004C0F3FFD1B78130730BF1F0C122ADDFC0CE82C37C28F1B9C605895A743ECCA23": [
      {
        "amount": 6.6505941,
        "end": 1731135600,
        "id": "1723362226",
        "level": "3",
        "reward_amount": 50.14779394,
        "start": 1723359600
      },
      {
        "amount": 4.25171936,
        "end": 1817931600,
        "id": "1723324837",
        "level": "7",
        "reward_amount": 355.30798446,
        "start": 1723323600
      }
    ],
    "0000D80508879A4DA21AC5FEA1F984C8E260BFE13F088C1C9041417B71366E605669": [
      {
        "amount": 10.0,
        "end": 1785016800,
        "id": "1721946894",
        "level": "6",
        "reward_amount": 1029.12711945,
        "start": 1721944800
      },
      {
        "amount": 8.22453894,
        "end": 1753480800,
        "id": "1721946823",
        "level": "5",
        "reward_amount": 468.73343139,
        "start": 1721944800
      },
      {
        "amount": 40.0,
        "end": 1816552800,
        "id": "1721946923",
        "level": "7",
        "reward_amount": 7429.30436219,
        "start": 1721944800
      }
    ],
    "0000B80188376223239FDD24F1A3CFC6528B6FCF41DCF14D256C51D0E3BF27BF8252": [
      {
        "amount": 7.92679203,
        "end": 1817899200,
        "id": "1723291831",
        "level": "7",
        "reward_amount": 691.93873555,
        "start": 1723291200
      }
    ],
    "000028DFBAC45E559E66DB44A7A0B75C7F950D9A0C516E1DC615DEDB8D29FD84680A": [
      {
        "amount": 46.3,
        "end": 1818349200,
        "id": "1723665986",
        "level": "7",
        "reward_amount": 1765.24860048,
        "start": 1723741200
      },
      {
        "amount": 900.0,
        "end": 1818666000,
        "id": "1723665834",
        "level": "7",
        "reward_amount": 8740.41209092,
        "start": 1724058000
      },
      {
        "amount": 369.17389677,
        "end": 1818702000,
        "id": "1723650878",
        "level": "7",
        "reward_amount": 2503.46470581,
        "start": 1724094000
      },
      {
        "amount": 300.0,
        "end": 1755183600,
        "id": "1723650558",
        "level": "5",
        "reward_amount": 4335.87119998,
        "start": 1723647600
      },
      {
        "amount": 300.0,
        "end": 1818486000,
        "id": "1723644433",
        "level": "7",
        "reward_amount": 7573.93685445,
        "start": 1723878000
      },
      {
        "amount": 300.0,
        "end": 1739196000,
        "id": "1723644222",
        "level": "4",
        "reward_amount": 2420.48334597,
        "start": 1723644000
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723622714",
        "level": "7",
        "reward_amount": 1017.18906335,
        "start": 1724094000
      },
      {
        "amount": 145.48629854,
        "end": 1818486000,
        "id": "1723579626",
        "level": "7",
        "reward_amount": 3673.01299163,
        "start": 1723878000
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723579371",
        "level": "7",
        "reward_amount": 1017.18906335,
        "start": 1724094000
      },
      {
        "amount": 100.0,
        "end": 1739127600,
        "id": "1723579119",
        "level": "4",
        "reward_amount": 934.65871755,
        "start": 1723575600
      },
      {
        "amount": 108.06605186,
        "end": 1739725200,
        "id": "1723538332",
        "level": "4",
        "reward_amount": 10.36132072,
        "start": 1724173200
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538505",
        "level": "7",
        "reward_amount": 339.06258879,
        "start": 1724094000
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538611",
        "level": "7",
        "reward_amount": 339.06258879,
        "start": 1724094000
      },
      {
        "amount": 300.0,
        "end": 1818230400,
        "id": "1723622574",
        "level": "7",
        "reward_amount": 14939.4178645,
        "start": 1723622400
      },
      {
        "amount": 600.0,
        "end": 1755180000,
        "id": "1723644127",
        "level": "5",
        "reward_amount": 8738.88928744,
        "start": 1723644000
      },
      {
        "amount": 600.0,
        "end": 1818252000,
        "id": "1723644028",
        "level": "7",
        "reward_amount": 28479.97576457,
        "start": 1723644000
      },
      {
        "amount": 200.0,
        "end": 1818255600,
        "id": "1723650497",
        "level": "7",
        "reward_amount": 9420.37964529,
        "start": 1723647600
      },
      {
        "amount": 300.0,
        "end": 1786719600,
        "id": "1723650718",
        "level": "6",
        "reward_amount": 7829.52268598,
        "start": 1723647600
      },
      {
        "amount": 300.0,
        "end": 1818403200,
        "id": "1723665928",
        "level": "7",
        "reward_amount": 9895.59669638,
        "start": 1723795200
      },
      {
        "amount": 99.99706986,
        "end": 1786950000,
        "id": "1723666027",
        "level": "6",
        "reward_amount": 1398.82445084,
        "start": 1723878000
      }
    ],
    "0000EFDED9E6F9CA05F381554221EEEA88CC5AC1678AC35D340C56769E2A9EACDBF2": [
      {
        "amount": 1.30611653,
        "end": 1739613600,
        "id": "1724063344",
        "level": "4",
        "reward_amount": 2.09096184,
        "start": 1724061600
      }
    ],
    "00000F3CF7C963A098F6215C07466411CD95E07F93D7117EF8FE16DA3BE691760DC8": [
      {
        "amount": 47.8635734,
        "end": 1738065600,
        "id": "1722516149",
        "level": "4",
        "reward_amount": 1511.26037164,
        "start": 1722513600
      }
    ],
    "00004D2EF8BD21C17E05EF99F64446E28D8C70B5B3B3BBDB0B92A728CDA363AD1805": [
      {
        "amount": 2.0,
        "end": 1816538400,
        "id": "1721933667",
        "level": "7",
        "reward_amount": 371.45613603,
        "start": 1721930400
      },
      {
        "amount": 0.67011237,
        "end": 1724522400,
        "id": "1721933831",
        "level": "1",
        "reward_amount": 6.24129041,
        "start": 1721930400
      }
    ],
    "00009B697D797598F4ED3FDE3FF5EC00D10AC723A784DFB6EC9A6F8819D4A6EECC8D": [
      {
        "amount": 225.51623442,
        "end": 1817892000,
        "id": "1723287006",
        "level": "7",
        "reward_amount": 19876.42556822,
        "start": 1723284000
      }
    ],
    "000059A6082E05094B0AE076618B015A062172EEE73FA24D7D61994E796309C8DD42": [
      {
        "amount": 166.26275985,
        "end": 1818586800,
        "id": "1723978992",
        "level": "7",
        "reward_amount": 2735.42498416,
        "start": 1723978800
      }
    ],
    "0000F9EB9BE130704D0955D4AA1646357D22F0ADE0CCBEA3443F4A3A632729BAA588": [
      {
        "amount": 620.65359476,
        "end": 1729706400,
        "id": "1721932806",
        "level": "3",
        "reward_amount": 10943.62601893,
        "start": 1721930400
      },
      {
        "amount": 51.85740662,
        "end": 1754222400,
        "id": "1722688751",
        "level": "5",
        "reward_amount": 2581.19689703,
        "start": 1722686400
      }
    ],
    "0000BCED16C487F268B038B6660746D265E586A959EE526942DA3A87CD1FFB720302": [
      {
        "amount": 3.75132465,
        "end": 1724738400,
        "id": "1724133674",
        "level": "1",
        "reward_amount": 0.39499319,
        "start": 1724133600
      }
    ],
    "0000FB9C2BC25B3A67E1CE324F6E3CE81F6FFD596F31358E85BB31BECCAC61F08FF7": [
      {
        "amount": 50.12595538,
        "end": 1724522400,
        "id": "1721930366",
        "level": "1",
        "reward_amount": 466.86529718,
        "start": 1721930400
      }
    ]
  },
  "last_calculation_timestamp": 1724180400,
  "lp_tokens_deposited": 28425.16318086,
  "lp_tokens_deposited_by_level": {
    "0": 1.24362126,
    "1": 2044.14718116,
    "2": 93.2316753,
    "3": 1885.94115528,
    "4": 4099.72941644,
    "5": 3249.68567018,
    "6": 1736.5316771,
    "7": 15314.65278414
  },
  "rewards_distributed": 33832.21157087,
  "rewards_reserved": 2344497.54762716
}
                  
Movements (0)

Ownerships (1)

  • Secret shared with 1 key

    Encoded secret

    81582D14B1D5C9E866259CBD7244BACA8708368475DC3E4415B2F9E682AD54367321796FA53F3E947FC87D67BA5C9411029E106DE3F2CE0AF053B3B8

    Authorized keys

    • 000122A6CD9ED07E46835D6E88E5BD0BEE84C3F5E5DBF8E916AD9B2EC912C44AFEC2

Contract recipients (0)

Inputs (0)

Contract inputs (0)

Unspent outputs (0)

Proofs and signatures

Previous public key

0001D7783C85497EEA4A66F4A96081CED3F2CD57C5754FE60EEBDE4BC9001AAC5128

Previous signature

D3E26C6A339139438AD882FC3E008A4F9D7E27AE36072894470B867033319F23675D82D7774852A55005747F8C167212D8D2B2DD9FC056D7B8E14E3696DE1C08

Origin signature

304402204F4835AAFE34BDFB6FEDA3AF5572045ADEE8348B95A8EB6DBE09A568A6A176910220439515159F17B5EAB9BDF8AAB58D5FAA870DA347765228F2561B808777314058

Proof of work

01020451684966573439C38DA99334546FBBDE4A6D96A50B4A4ECBB6572CDBED023F079607407E254421D1779525D11C60D55684F0B403B93B95823554E29D1E2CDB16

Proof of integrity

00346CF8D420576D4AB1E57CEE2494DA60BDC323CA11D823C6F8A8F82961D7DE29

Coordinator signature

0392DC2B0BDF7CFC9BC028D595F2D6D09A16181FF4DCD4227B5A2C0AE71FE5E5C0F5B7DA465186872027081B32782FDA4BAA24EAB33817F6E396D90A98EBCB09

Validator #1 public key

0001B0A94804BF8ECC9897075C6207FF63EF4D339F57A0349888E6B77CD47DB53EF3

Validator #1 signature

1C0E6AD108CEF413A697257187C742C9A76D5DF434BF8848EFA68F9390755C118EE65CDEDB8D9A0E8D0B786B143AE12FFBB5C45D5F8C449272C585E803091C0F

Validator #2 public key

0001A9F0500AF81DE5A035239617CCCB9C0C6F57CF6657C72CDC809182518FA6BF2F

Validator #2 signature

8F2D3C938D2F17E6F88BBE40DE5893C667B7576CEE67DDAFF3DC697F4EF8F65DF08E31A7F3219D4F1E5BF3427F82B802F6C8B81D1F2858E7CE513DAC0D3D310C