Type
CONTRACT
Validation date
2024-08-21 12:05:15 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": 59184.69364874,
        "start": 1722139200
      }
    ],
    "00005A8AD2778CF4E75EF89CCAC998933DF85BC77554CA613AD9C57614F96C84BC7D": [
      {
        "amount": 0.87519426,
        "end": 1726743600,
        "id": "1724154892",
        "level": "2",
        "reward_amount": 0.32698242,
        "start": 1724151600
      }
    ],
    "0000252072D93B1C449ACC6CF87E775CF3A2B3DA2C12EF46383727AE0506BE523710": [
      {
        "amount": 171.49774951,
        "end": 1817028000,
        "id": "1722420833",
        "level": "7",
        "reward_amount": 32674.95343145,
        "start": 1722420000
      }
    ],
    "000046EDE1CCA30F2CF949644A1E96B7C9B068DB9B19B62A36DF01141A4F6E9100C8": [
      {
        "amount": 64.51723278,
        "end": 1739552400,
        "id": "1724002504",
        "level": "4",
        "reward_amount": 212.83317452,
        "start": 1724000400
      }
    ],
    "0000826DEC97863D0818C0640973AADE01E0C777305109A83C5FB4EA225464E4790B": [
      {
        "amount": 4.7798319,
        "end": 1730296800,
        "id": "1722524308",
        "level": "3",
        "reward_amount": 85.98718284,
        "start": 1722520800
      },
      {
        "amount": 13.89066514,
        "end": 1817103600,
        "id": "1722497039",
        "level": "7",
        "reward_amount": 2646.53611642,
        "start": 1722495600
      }
    ],
    "0000BCD3704EE34991D1089D301EB3909BBC9BA3CDDFA8EA813DBA8672AF9F633CA8": [
      {
        "amount": 5.40278223,
        "end": 1738004400,
        "id": "1722453909",
        "level": "4",
        "reward_amount": 174.99159655,
        "start": 1722452400
      }
    ],
    "00005EC81836452C89EEBDC720E3E39915E86043088DF9F6FA064EACF3370CE2C028": [
      {
        "amount": 27.26909363,
        "end": 1817755200,
        "id": "1723150189",
        "level": "7",
        "reward_amount": 2989.64659787,
        "start": 1723147200
      }
    ],
    "0000E8078E064F1726753697FEE0290FA9BFE7B03608517F29632029E74AC7904819": [
      {
        "amount": 423.85680263,
        "end": 1817107200,
        "id": "1722499858",
        "level": "7",
        "reward_amount": 80756.18875124,
        "start": 1722499200
      },
      {
        "amount": 423.85680262,
        "end": 1754035200,
        "id": "1722499733",
        "level": "5",
        "reward_amount": 24780.04102082,
        "start": 1722499200
      }
    ],
    "000009FF674C87EAE7F4C98977E366BFBEA91CB2A017C9097A17058EE15A7C09B87F": [
      {
        "amount": 47.37426984,
        "end": 1729962000,
        "id": "1722189537",
        "level": "3",
        "reward_amount": 856.88216217,
        "start": 1722186000
      },
      {
        "amount": 47.37426983,
        "end": 1816794000,
        "id": "1722189498",
        "level": "7",
        "reward_amount": 9026.07113418,
        "start": 1722186000
      }
    ],
    "000092174345CF579DCA98B190387763669BC5D1A45A737F5AF17ABAF5E2B27C8DF7": [
      {
        "amount": 39.53442209,
        "end": 1816542000,
        "id": "1721934957",
        "level": "7",
        "reward_amount": 7532.36754051,
        "start": 1721934000
      }
    ],
    "0000D6E65A30304EE9909CA661F2229408048CE7DB515CD2A9D38E63A0CBA44076AE": [
      {
        "amount": 24.53218931,
        "end": 1817060400,
        "id": "1722453904",
        "level": "7",
        "reward_amount": 4674.03591217,
        "start": 1722452400
      },
      {
        "amount": 49.06437862,
        "end": 1753988400,
        "id": "1722453803",
        "level": "5",
        "reward_amount": 2868.46193628,
        "start": 1722452400
      },
      {
        "amount": 0.24513861,
        "end": 1816610400,
        "id": "1722003018",
        "level": "7",
        "reward_amount": 46.69514866,
        "start": 1722002400
      },
      {
        "amount": 98.12875723,
        "end": 1738004400,
        "id": "1722453752",
        "level": "4",
        "reward_amount": 3178.31699678,
        "start": 1722452400
      },
      {
        "amount": 24.53218931,
        "end": 1785524400,
        "id": "1722453868",
        "level": "6",
        "reward_amount": 2589.84274798,
        "start": 1722452400
      }
    ],
    "0000D620FC554D881E327CC59321CD09CDF3B1C3FBA201A2A58FE9B9B0F3B696FBCE": [
      {
        "amount": 4.52073371,
        "end": 1817575200,
        "id": "1722967412",
        "level": "7",
        "reward_amount": 596.23909363,
        "start": 1722967200
      },
      {
        "amount": 27.03971832,
        "end": 1817629200,
        "id": "1723022105",
        "level": "7",
        "reward_amount": 3385.56740092,
        "start": 1723021200
      }
    ],
    "0000FB9D022F9A2BABE63AD726FC8038958A73F8999170CD0DE666716911B37D57CD": [
      {
        "amount": 51.03800725,
        "end": 1816887600,
        "id": "1722279880",
        "level": "7",
        "reward_amount": 9724.1135034,
        "start": 1722279600
      }
    ],
    "00003BC98F60FA93EE3CF4460CAB7CE7206745F04722B7521480695429EDF731FDE2": [
      {
        "amount": 342.70907838,
        "end": 1785740400,
        "id": "1722669540",
        "level": "6",
        "reward_amount": 32163.12196879,
        "start": 1722668400
      },
      {
        "amount": 2988.25934822,
        "end": 1816617600,
        "id": "1722011226",
        "level": "7",
        "reward_amount": 569344.31096354,
        "start": 1722009600
      }
    ],
    "0000B10AC91AC815D0914645315546479564BC330FC92868B56FC7B505708278B776": [
      {
        "amount": 35.20322403,
        "end": 1817121600,
        "id": "1722516784",
        "level": "7",
        "reward_amount": 6707.16058583,
        "start": 1722513600
      }
    ],
    "000044305A6A17545FCF99E6DC1D6AAD4A53519877FD44E9BD26DB054B511CAE338F": [
      {
        "amount": 122.34781822,
        "end": 1730556000,
        "id": "1722783119",
        "level": "3",
        "reward_amount": 1801.91314147,
        "start": 1722780000
      },
      {
        "amount": 68.88470637,
        "end": 1816977600,
        "id": "1721973718",
        "level": "7",
        "reward_amount": 13124.39340487,
        "start": 1722369600
      }
    ],
    "00002F6D49B04D55B9B553068CFFBCF4E8D410F4E270748FC5E8DD7BC1791BE13974": [
      {
        "amount": 15.69235238,
        "end": 1818151200,
        "id": "1723543970",
        "level": "7",
        "reward_amount": 994.78008581,
        "start": 1723543200
      }
    ],
    "0000D3696485926B9B46FD6B532F26ADF44B2B5E1B1A6718519B8628C34D0E0487F3": [
      {
        "amount": 0.01,
        "end": 0,
        "id": "1721929501",
        "level": "0",
        "reward_amount": 3.9793e-4,
        "start": null
      },
      {
        "amount": 0.01,
        "end": 1784998800,
        "id": "1721929424",
        "level": "6",
        "reward_amount": 1.05481391,
        "start": 1721926800
      },
      {
        "amount": 0.01,
        "end": 1724518800,
        "id": "1721929367",
        "level": "1",
        "reward_amount": 0.09439707,
        "start": 1721926800
      },
      {
        "amount": 0.01,
        "end": 0,
        "id": "1721929342",
        "level": "0",
        "reward_amount": 7.3809e-4,
        "start": null
      },
      {
        "amount": 0.01,
        "end": 1729702800,
        "id": "1721929395",
        "level": "3",
        "reward_amount": 0.18067384,
        "start": 1721926800
      }
    ],
    "0000FDEBA3D305BED46E068C5333ED2D8FFFEEFA016B4E2AF505D98AED22079751CE": [
      {
        "amount": 29.39010433,
        "end": 1818018000,
        "id": "1723412600",
        "level": "7",
        "reward_amount": 2306.18613519,
        "start": 1723410000
      }
    ],
    "0000EBFE35D4B9964DC41D0AC22764B67407F20F9B309E26E1D1487AF35F6755A6AD": [
      {
        "amount": 67.67810588,
        "end": 1724612400,
        "id": "1722020752",
        "level": "1",
        "reward_amount": 652.3457137,
        "start": 1722020400
      },
      {
        "amount": 40.0,
        "end": 1816628400,
        "id": "1722020474",
        "level": "7",
        "reward_amount": 7621.07325885,
        "start": 1722020400
      },
      {
        "amount": 20.0,
        "end": 1816628400,
        "id": "1722020533",
        "level": "7",
        "reward_amount": 3810.53079228,
        "start": 1722020400
      },
      {
        "amount": 60.0,
        "end": 1729796400,
        "id": "1722020692",
        "level": "3",
        "reward_amount": 1085.25005009,
        "start": 1722020400
      }
    ],
    "00005C2BD26B5D2F4FF11FFD99819956951F4B693561537148234FFED99D20DB4F91": [
      {
        "amount": 7.76231264,
        "end": 1730296800,
        "id": "1722524267",
        "level": "3",
        "reward_amount": 139.64099263,
        "start": 1722520800
      },
      {
        "amount": 34.70006897,
        "end": 1817103600,
        "id": "1722496906",
        "level": "7",
        "reward_amount": 6611.29284813,
        "start": 1722495600
      }
    ],
    "0000F3C03F61A33CB9E95774AF19D956542D3284F90113A3E5837274CA9D258E4FA5": [
      {
        "amount": 41.75002557,
        "end": 1817125200,
        "id": "1721977125",
        "level": "7",
        "reward_amount": 7933.13394469,
        "start": 1722517200
      },
      {
        "amount": 30.0,
        "end": 1816581600,
        "id": "1721976242",
        "level": "7",
        "reward_amount": 5715.80142789,
        "start": 1721973600
      },
      {
        "amount": 45.0,
        "end": 1816844400,
        "id": "1721977068",
        "level": "7",
        "reward_amount": 8573.70892634,
        "start": 1722236400
      }
    ],
    "00007BFD0BCB91C1AB0D67F6D1954085441EC68908D5DDAAADC31D901D635EB56ADC": [
      {
        "amount": 5.31061115,
        "end": 1738011600,
        "id": "1722461473",
        "level": "4",
        "reward_amount": 172.00641975,
        "start": 1722459600
      },
      {
        "amount": 10.62122228,
        "end": 1785531600,
        "id": "1722461401",
        "level": "6",
        "reward_amount": 1121.27329746,
        "start": 1722459600
      },
      {
        "amount": 21.24244457,
        "end": 1817067600,
        "id": "1722461363",
        "level": "7",
        "reward_amount": 4047.25013937,
        "start": 1722459600
      },
      {
        "amount": 5.31061114,
        "end": 1753995600,
        "id": "1722461441",
        "level": "5",
        "reward_amount": 310.4747277,
        "start": 1722459600
      }
    ],
    "000099158E2C0FC1E717A1A8FCE1752EF366E20EAAA4CE9F38BAE864C13A32EAC9E6": [
      {
        "amount": 10.00551293,
        "end": 1816657200,
        "id": "1722050840",
        "level": "7",
        "reward_amount": 1906.31112102,
        "start": 1722049200
      }
    ],
    "00001C7C3F80CB5C15EB2537DF422A7EF4D55431EC05B30AED13EE5B7E1F81767487": [
      {
        "amount": 1.22352126,
        "end": 0,
        "id": "1722064320",
        "level": "0",
        "reward_amount": 0.74338033,
        "start": null
      },
      {
        "amount": 46.16596175,
        "end": 1724655600,
        "id": "1722063881",
        "level": "1",
        "reward_amount": 449.11259379,
        "start": 1722063600
      }
    ],
    "0000D8C63858B8062159808FA02E80C64F2BB119E13F52B9C81F7B178A971402F691": [
      {
        "amount": 26.32529758,
        "end": 1817215200,
        "id": "1721934053",
        "level": "7",
        "reward_amount": 4676.21896151,
        "start": 1722607200
      },
      {
        "amount": 1.9771422,
        "end": 1816542000,
        "id": "1721934986",
        "level": "7",
        "reward_amount": 376.69036736,
        "start": 1721934000
      }
    ],
    "00009B6AD59D37AAAAD1747B0B9E54D43AB03A3E2B991BCF6EC876FF1A0D0E6AB14D": [
      {
        "amount": 42.51770246,
        "end": 1817064000,
        "id": "1722458621",
        "level": "7",
        "reward_amount": 8100.76281559,
        "start": 1722456000
      }
    ],
    "00002B4F50927C12B2D51BF740B8DF859F2D5A97B360DF36DA6316EED20AD3497F69": [
      {
        "amount": 758.78276272,
        "end": 1818511200,
        "id": "1723904155",
        "level": "7",
        "reward_amount": 21063.48434658,
        "start": 1723903200
      }
    ],
    "000001F572D6467EDC154E09FA0B58BF5D7DC9D41EA0315C43610EF1406320934401": [
      {
        "amount": 1329.13816876,
        "end": 1724565600,
        "id": "1721975702",
        "level": "1",
        "reward_amount": 869.4445479,
        "start": 1723960800
      }
    ],
    "00001E3A03626544B66D236F259AF26A6BDA73EBF6C3EFE84DB351A57BEEA776F338": [
      {
        "amount": 61.98573547,
        "end": 1816862400,
        "id": "1722256545",
        "level": "7",
        "reward_amount": 11809.94965573,
        "start": 1722254400
      }
    ],
    "00007633A19FA04D0AEB498A13F0036F4A57B6B8D51A482B21856E2FEEA2062D2E1B": [
      {
        "amount": 105.01724955,
        "end": 1724770800,
        "id": "1722179896",
        "level": "1",
        "reward_amount": 1045.07973018,
        "start": 1722178800
      }
    ],
    "0000A4E8AAD6D7C5A7E98600D8ECA42D067CA9381AAD0CB1CD1C2B887FD3CF6DE9F9": [
      {
        "amount": 53.50219411,
        "end": 1818734400,
        "id": "1724128095",
        "level": "7",
        "reward_amount": 483.0063473,
        "start": 1724126400
      },
      {
        "amount": 22.49541696,
        "end": 1755403200,
        "id": "1723869811",
        "level": "5",
        "reward_amount": 214.31932785,
        "start": 1723867200
      }
    ],
    "00005CE8B2DF75E028E3A597C002168CE3515FDEFADCB690A54A214B7CC33D97D877": [
      {
        "amount": 182.18728409,
        "end": 1817139600,
        "id": "1722532691",
        "level": "7",
        "reward_amount": 34246.52813849,
        "start": 1722531600
      }
    ],
    "0000C15B3E78CC1D87238E3BFAAD5CF05CD56BA2160E1D68E8BEF7C5010B4AC87217": [
      {
        "amount": 29.50526354,
        "end": 0,
        "id": "1723637961",
        "level": "0",
        "reward_amount": 44.90869788,
        "start": null
      }
    ],
    "00001433FCDCB6526284D15595BA9D1646F6A053525C76BCDC8FBA7AAB6C10128FE5": [
      {
        "amount": 78.80771402,
        "end": 1817035200,
        "id": "1722429634",
        "level": "7",
        "reward_amount": 15014.99398523,
        "start": 1722427200
      },
      {
        "amount": 321.79211689,
        "end": 1816581600,
        "id": "1721974280",
        "level": "7",
        "reward_amount": 61310.10154269,
        "start": 1721973600
      }
    ],
    "000006FBF6B819682713C55101B6E40FD44EE4CB6FCAC79DECC9BA7937FA03B4105D": [
      {
        "amount": 107.25019302,
        "end": 1818280800,
        "id": "1721932444",
        "level": "7",
        "reward_amount": 5303.99087128,
        "start": 1723672800
      }
    ],
    "000019FC92D343ABC49E036ED1269A1519F7705DE521CD16A80568F9ACEA64AF630E": [
      {
        "amount": 4.80992698,
        "end": 1818104400,
        "id": "1723411848",
        "level": "7",
        "reward_amount": 330.0891407,
        "start": 1723496400
      },
      {
        "amount": 2.6725006,
        "end": 1818014400,
        "id": "1723409213",
        "level": "7",
        "reward_amount": 210.80128594,
        "start": 1723406400
      },
      {
        "amount": 2.67282051,
        "end": 1818000000,
        "id": "1723394536",
        "level": "7",
        "reward_amount": 215.22160162,
        "start": 1723392000
      },
      {
        "amount": 3.74973406,
        "end": 1731625200,
        "id": "1723849589",
        "level": "3",
        "reward_amount": 11.65005461,
        "start": 1723849200
      }
    ],
    "0000E82C3C5C9FC73EC8FF057BB18DE85342C3D22EC6A079F1290B5DB287E8B67B36": [
      {
        "amount": 1230.75929709,
        "end": 1817118000,
        "id": "1722510225",
        "level": "7",
        "reward_amount": 234492.96334741,
        "start": 1722510000
      }
    ],
    "0000CBA94C234B9812CADD90F969CE6283D1A9CA67646B0A1F7CDED665AE5EAF738E": [
      {
        "amount": 0.21072829,
        "end": 1786190400,
        "id": "1723119516",
        "level": "6",
        "reward_amount": 13.21735712,
        "start": 1723118400
      },
      {
        "amount": 0.23839507,
        "end": 1754071200,
        "id": "1722537580",
        "level": "5",
        "reward_amount": 13.71285266,
        "start": 1722535200
      },
      {
        "amount": 0.1,
        "end": 1816588800,
        "id": "1721981565",
        "level": "7",
        "reward_amount": 19.04181865,
        "start": 1721980800
      },
      {
        "amount": 0.93935458,
        "end": 1785607200,
        "id": "1722537247",
        "level": "6",
        "reward_amount": 97.57559192,
        "start": 1722535200
      }
    ],
    "0000B4B884CF98D325EA231AFF2EA5DC31F9C358F5FCB8B608472A3A96BE752A07F7": [
      {
        "amount": 254.72304285,
        "end": 1817121600,
        "id": "1722514104",
        "level": "7",
        "reward_amount": 48531.62626029,
        "start": 1722513600
      },
      {
        "amount": 9.44608568,
        "end": 1817373600,
        "id": "1722514351",
        "level": "7",
        "reward_amount": 1482.68622176,
        "start": 1722765600
      },
      {
        "amount": 37.78434274,
        "end": 1817175600,
        "id": "1722514247",
        "level": "7",
        "reward_amount": 6915.16650938,
        "start": 1722567600
      },
      {
        "amount": 18.89217137,
        "end": 1754049600,
        "id": "1722514298",
        "level": "5",
        "reward_amount": 1104.49672549,
        "start": 1722513600
      },
      {
        "amount": 4.72304284,
        "end": 1817373600,
        "id": "1722514397",
        "level": "7",
        "reward_amount": 741.33865935,
        "start": 1722765600
      },
      {
        "amount": 1.58757603,
        "end": 1817373600,
        "id": "1722514679",
        "level": "7",
        "reward_amount": 249.18344588,
        "start": 1722765600
      },
      {
        "amount": 87.28512712,
        "end": 1818262800,
        "id": "1723655698",
        "level": "7",
        "reward_amount": 4468.38492218,
        "start": 1723654800
      }
    ],
    "00004DC6EBEA8E26909D9E9FB1C604A7270F3A2CC804F5F64DCD03DA70CC903BC98D": [
      {
        "amount": 50.26752325,
        "end": 1737986400,
        "id": "1722437015",
        "level": "4",
        "reward_amount": 1628.12725708,
        "start": 1722434400
      }
    ],
    "00008DF280685C32B0693F69FC22C5122E1C54A9DFFEF88CE00A8828C72B4459C2F6": [
      {
        "amount": 47.94319205,
        "end": 1729713600,
        "id": "1721938117",
        "level": "3",
        "reward_amount": 867.17250811,
        "start": 1721937600
      }
    ],
    "00007C6409AF3DB9B3C6430AD466A43A186EB7144CF4289638E840E56186D3B1B9B4": [
      {
        "amount": 36.5809169,
        "end": 1818518400,
        "id": "1723911946",
        "level": "7",
        "reward_amount": 992.72264503,
        "start": 1723910400
      }
    ],
    "00001D52DD87EE906E25919F74B607790D87D17723EC9CA2B19224739708782A1D23": [
      {
        "amount": 2.96915153,
        "end": 1724522400,
        "id": "1721932389",
        "level": "1",
        "reward_amount": 28.06268667,
        "start": 1721930400
      }
    ],
    "000075EF1174A535403DF88EE3A27807B596539F09C6F63033A00A38F4E1B811AE1F": [
      {
        "amount": 1.81496057,
        "end": 1816855200,
        "id": "1722249973",
        "level": "7",
        "reward_amount": 345.7908209,
        "start": 1722247200
      }
    ],
    "0000D7F7B94DD148DCD31B25C51647090A34F2210EF612BF9C0988EA2A3C3B7B9712": [
      {
        "amount": 13.61565332,
        "end": 1817755200,
        "id": "1723150527",
        "level": "7",
        "reward_amount": 1492.74936646,
        "start": 1723147200
      },
      {
        "amount": 604.03017627,
        "end": 1816959600,
        "id": "1722353473",
        "level": "7",
        "reward_amount": 115084.09546456,
        "start": 1722351600
      }
    ],
    "00004A6F653B2A69335AF13A8F8E5512B3E53F3AFAFCF138435732199C9FAC4290C7": [
      {
        "amount": 10.9057332,
        "end": 1730217600,
        "id": "1722442119",
        "level": "3",
        "reward_amount": 197.25734747,
        "start": 1722441600
      }
    ],
    "00006D17EB8A194974555425952659CBD0F2C969CE33C0DE0EC890794FAAC5AE6A94": [
      {
        "amount": 131.01401512,
        "end": 1785168000,
        "id": "1722096944",
        "level": "6",
        "reward_amount": 13831.04489156,
        "start": 1722096000
      }
    ],
    "00003694D832E63C02120BA8697CF8FD2D4A79DB1175D8068D4772D80E2F8525147F": [
      {
        "amount": 4.47623045,
        "end": 1754719200,
        "id": "1723185134",
        "level": "5",
        "reward_amount": 144.47861382,
        "start": 1723183200
      },
      {
        "amount": 4.47623045,
        "end": 1817791200,
        "id": "1723184982",
        "level": "7",
        "reward_amount": 470.85151064,
        "start": 1723183200
      }
    ],
    "0000381ADEE3D08CE73D5BD8D98B35728546FDE56758915FA5B583A807E926049846": [
      {
        "amount": 48.71435884,
        "end": 1754258400,
        "id": "1722725692",
        "level": "5",
        "reward_amount": 2427.98956303,
        "start": 1722722400
      },
      {
        "amount": 120.67951889,
        "end": 1724634000,
        "id": "1722762931",
        "level": "1",
        "reward_amount": 58.72320984,
        "start": 1724029200
      }
    ],
    "0000DC7461F3C3EEDB63A9FEA48F458107A31866B401AF7B4BDDB8F1613CC7127F94": [
      {
        "amount": 25.32639252,
        "end": 1816704000,
        "id": "1722096427",
        "level": "7",
        "reward_amount": 4825.35394958,
        "start": 1722096000
      },
      {
        "amount": 20.0,
        "end": 1729868400,
        "id": "1722095578",
        "level": "3",
        "reward_amount": 361.74993624,
        "start": 1722092400
      },
      {
        "amount": 174.29235148,
        "end": 1816538400,
        "id": "1721932760",
        "level": "7",
        "reward_amount": 33207.40182397,
        "start": 1721930400
      },
      {
        "amount": 75.55517261,
        "end": 1816700400,
        "id": "1722095617",
        "level": "7",
        "reward_amount": 14395.29541371,
        "start": 1722092400
      }
    ],
    "0000671A0C8F7435F2CCFD6CAD5483AB34B2C51E4F78DCF5F82788A8B9259C2484D2": [
      {
        "amount": 212.99553293,
        "end": 1737554400,
        "id": "1722003953",
        "level": "4",
        "reward_amount": 6898.7666259,
        "start": 1722002400
      },
      {
        "amount": 212.99553293,
        "end": 1726819200,
        "id": "1722004019",
        "level": "2",
        "reward_amount": 12.72657526,
        "start": 1724227200
      }
    ],
    "000064A6D0868320FE9AB0F1D3E9AE2BF405E3F71B1F7DE7D89C74CDC70824F3265A": [
      {
        "amount": 124.06037092,
        "end": 1817143200,
        "id": "1722538565",
        "level": "7",
        "reward_amount": 23257.93873313,
        "start": 1722535200
      }
    ],
    "0000BC394288E559805ED17E843BAFA2925403613EADC6E00B095EE438D380F421F6": [
      {
        "amount": 10.47721692,
        "end": 1738260000,
        "id": "1722708675",
        "level": "4",
        "reward_amount": 292.53382828,
        "start": 1722708000
      },
      {
        "amount": 24.53124237,
        "end": 1817053200,
        "id": "1722447790",
        "level": "7",
        "reward_amount": 4673.85678972,
        "start": 1722445200
      }
    ],
    "000055919C53436351B1C3C38D274410A325C9105E0CA01B3CC9BA1DBC27FDD0C0C3": [
      {
        "amount": 5.97382296,
        "end": 1818255600,
        "id": "1723647670",
        "level": "7",
        "reward_amount": 310.01500461,
        "start": 1723647600
      }
    ],
    "0000ED23150531DF35F3E3B0554C22C8D4F3987A40CD32FEA8B55AB23A7EED1C682E": [
      {
        "amount": 25.78673523,
        "end": 1817488800,
        "id": "1722880963",
        "level": "7",
        "reward_amount": 3677.33077792,
        "start": 1722880800
      }
    ],
    "00002DB9771992B93696556A34A3BFD4170C1059ED3753643F7A1FE1EAD1FCE9BF68": [
      {
        "amount": 308.36502922,
        "end": 1817056800,
        "id": "1722450977",
        "level": "7",
        "reward_amount": 58751.87770653,
        "start": 1722448800
      },
      {
        "amount": 308.36502922,
        "end": 1785520800,
        "id": "1722450936",
        "level": "6",
        "reward_amount": 32553.85002191,
        "start": 1722448800
      },
      {
        "amount": 120.276501,
        "end": 1817110800,
        "id": "1722464339",
        "level": "7",
        "reward_amount": 22915.91939516,
        "start": 1722502800
      }
    ],
    "0000F6A8A7CC3DD8711A003DC58BE1F7FC905C4A2E6980682CA24329A02C534AF3F7": [
      {
        "amount": 44.18479913,
        "end": 1818691200,
        "id": "1723888698",
        "level": "7",
        "reward_amount": 550.23607412,
        "start": 1724083200
      },
      {
        "amount": 242.67902498,
        "end": 1818108000,
        "id": "1723503400",
        "level": "7",
        "reward_amount": 16554.98895588,
        "start": 1723500000
      }
    ],
    "0000FF3CF6D72B285283A3934D2E36A62AAB56E1BCC27082919B29E6A2831F799812": [
      {
        "amount": 71.9275237,
        "end": 1816848000,
        "id": "1722242554",
        "level": "7",
        "reward_amount": 13704.13001812,
        "start": 1722240000
      }
    ],
    "0000DCB5B70BD165848F9FB8AB83894A02F674496ABF2995DE18466402D8EBFF7D15": [
      {
        "amount": 49.87971046,
        "end": 1738015200,
        "id": "1722464705",
        "level": "4",
        "reward_amount": 1615.56613255,
        "start": 1722463200
      }
    ],
    "0000FB28E1A3B78D078B674B4E3A4DBEB4C4543FF2B54B6D1841A6FCAB2DE1C0936D": [
      {
        "amount": 59.82154437,
        "end": 1737576000,
        "id": "1722024930",
        "level": "4",
        "reward_amount": 1937.57502535,
        "start": 1722024000
      }
    ],
    "0000A6C97BFB871BF34606CE6A8E7230BF5703EA9DF1945B293B3F6A082EF2EDC56D": [
      {
        "amount": 0.45519111,
        "end": 1739206800,
        "id": "1723657354",
        "level": "4",
        "reward_amount": 3.96081596,
        "start": 1723654800
      }
    ],
    "0000734ED585CD05560B237E31C1CB53ED174E5B6EB330094B5C08282D4A556A0DA6": [
      {
        "amount": 6.13298006,
        "end": 1787173200,
        "id": "1724104402",
        "level": "6",
        "reward_amount": 37.41151745,
        "start": 1724101200
      }
    ],
    "00000DE4DFF7652D9F02A67BD1218F18311A52AADE2C85AB78AF12A0E5EC7CAAA891": [
      {
        "amount": 55.59720608,
        "end": 1738335600,
        "id": "1722784126",
        "level": "4",
        "reward_amount": 1461.99966174,
        "start": 1722783600
      },
      {
        "amount": 55.59720608,
        "end": 1730559600,
        "id": "1722784184",
        "level": "3",
        "reward_amount": 816.44123486,
        "start": 1722783600
      }
    ],
    "000044EFDE184CFC2A84F5D341A39F371A9523814B3945AE8280C249728D6144B67F": [
      {
        "amount": 27.63318712,
        "end": 1817330400,
        "id": "1722552026",
        "level": "7",
        "reward_amount": 4488.52330988,
        "start": 1722722400
      }
    ],
    "0000BB806DC0F952A529897ADD7504A4EF6F3DF0ADD721448CCFC44177759AD4607E": [
      {
        "amount": 300.31032189,
        "end": 1816686000,
        "id": "1722080419",
        "level": "7",
        "reward_amount": 57217.23735588,
        "start": 1722078000
      },
      {
        "amount": 372.0,
        "end": 1753614000,
        "id": "1722080230",
        "level": "5",
        "reward_amount": 21748.32445499,
        "start": 1722078000
      },
      {
        "amount": 300.0,
        "end": 1785150000,
        "id": "1722080321",
        "level": "6",
        "reward_amount": 31670.76084983,
        "start": 1722078000
      },
      {
        "amount": 62.02815161,
        "end": 1737630000,
        "id": "1722080782",
        "level": "4",
        "reward_amount": 2009.0451358,
        "start": 1722078000
      }
    ],
    "0000464CD8E96E1E15C3EA0FE9D5D5C5210AEAA912FB65046FD8480F772D85DBB598": [
      {
        "amount": 62.47482098,
        "end": 1731477600,
        "id": "1723705188",
        "level": "3",
        "reward_amount": 276.9600111,
        "start": 1723701600
      }
    ],
    "00009E5EE80B7C5103AA4DB54611751B3E86D29BCC69561F86B44337FC92078B85B2": [
      {
        "amount": 6.66048935,
        "end": 1816678800,
        "id": "1722071160",
        "level": "7",
        "reward_amount": 1268.99349748,
        "start": 1722070800
      },
      {
        "amount": 7.3489425,
        "end": 1817802000,
        "id": "1723194465",
        "level": "7",
        "reward_amount": 763.2384607,
        "start": 1723194000
      }
    ],
    "000072CD1D5DF1A97F6992C57209B4CAC143E0F1AFD8DC2B06714FB289408ADB65B5": [
      {
        "amount": 1.42406112,
        "end": 1738148400,
        "id": "1722596701",
        "level": "4",
        "reward_amount": 43.35055063,
        "start": 1722596400
      }
    ],
    "0000E70A43E0EB702B53D4879273C38A7C3CE5FCA753B21F59194BC5A32A81619FFC": [
      {
        "amount": 3.43620376,
        "end": 1753560000,
        "id": "1722026455",
        "level": "5",
        "reward_amount": 200.89104061,
        "start": 1722024000
      }
    ],
    "0000E8CC3360749967B5E155FCC354D4196DF18BA66673CF3806CDCEEB5B0CDA130C": [
      {
        "amount": 0.19591836,
        "end": 1816581600,
        "id": "1721977192",
        "level": "7",
        "reward_amount": 37.3181271,
        "start": 1721973600
      }
    ],
    "0000BD87C2E369137110E76B3610835EE04C4B2FF17B90F8B9C5662EBD6872B9CD85": [
      {
        "amount": 32.57882219,
        "end": 1817024400,
        "id": "1722416767",
        "level": "7",
        "reward_amount": 6207.13670803,
        "start": 1722416400
      },
      {
        "amount": 32.57882219,
        "end": 1753952400,
        "id": "1722416677",
        "level": "5",
        "reward_amount": 1904.66309844,
        "start": 1722416400
      }
    ],
    "00007F8DEF6ECCA96503E21C8F5B90A13CC5EF1BEB236952C55F4727B3E93E41CCF8": [
      {
        "amount": 12.5209424,
        "end": 1737493200,
        "id": "1721942574",
        "level": "4",
        "reward_amount": 405.54352736,
        "start": 1721941200
      },
      {
        "amount": 25.0,
        "end": 1724533200,
        "id": "1721942502",
        "level": "1",
        "reward_amount": 236.85062727,
        "start": 1721941200
      },
      {
        "amount": 150.04188478,
        "end": 1729710000,
        "id": "1721934998",
        "level": "3",
        "reward_amount": 2713.88306155,
        "start": 1721934000
      },
      {
        "amount": 185.0,
        "end": 1816542000,
        "id": "1721934872",
        "level": "7",
        "reward_amount": 35247.49905104,
        "start": 1721934000
      },
      {
        "amount": 50.0,
        "end": 1785013200,
        "id": "1721942343",
        "level": "6",
        "reward_amount": 5278.45973646,
        "start": 1721941200
      },
      {
        "amount": 50.0,
        "end": 1724338800,
        "id": "1721942427",
        "level": "1",
        "reward_amount": 62.57232933,
        "start": 1723734000
      },
      {
        "amount": 12.52094239,
        "end": 1729717200,
        "id": "1721942544",
        "level": "3",
        "reward_amount": 226.47246904,
        "start": 1721941200
      }
    ],
    "00000A089C97040872F00A5AC91D247264EE1C189D89511189264166BB873550A46F": [
      {
        "amount": 3.15641778,
        "end": 1817139600,
        "id": "1722531719",
        "level": "7",
        "reward_amount": 593.31498457,
        "start": 1722531600
      }
    ],
    "0000FAE37FC2D817C6865945AEE9A41AF95E058C1C8C64C58D15F038372961E7ADF1": [
      {
        "amount": 33.87956458,
        "end": 1817956800,
        "id": "1722674870",
        "level": "7",
        "reward_amount": 2895.63197608,
        "start": 1723348800
      },
      {
        "amount": 125.6663019,
        "end": 1730037600,
        "id": "1722262624",
        "level": "3",
        "reward_amount": 2272.98958478,
        "start": 1722261600
      },
      {
        "amount": 60.15832309,
        "end": 1754118000,
        "id": "1722583399",
        "level": "5",
        "reward_amount": 3341.86416946,
        "start": 1722582000
      },
      {
        "amount": 25.0,
        "end": 1817967600,
        "id": "1722674826",
        "level": "7",
        "reward_amount": 2105.77291388,
        "start": 1723359600
      }
    ],
    "00008EB87E1B3060B0A7E45E44DFE9DA23596A08779B278F30C54036F956D5A02406": [
      {
        "amount": 0.16243241,
        "end": 1817812800,
        "id": "1723205806",
        "level": "7",
        "reward_amount": 16.64692877,
        "start": 1723204800
      }
    ],
    "00009B8A94A9423E5308DFDA578E4DC4B79315A4E70A3030BD7D053AF40CAA124714": [
      {
        "amount": 479.34637575,
        "end": 1738314000,
        "id": "1722763348",
        "level": "4",
        "reward_amount": 12826.01666344,
        "start": 1722762000
      }
    ],
    "0000B970E7B817E83B6F85BD678B0ABC69459A9FD3E78AFADCF99A6ABA06A2CA7FDE": [
      {
        "amount": 0.42556994,
        "end": 1738051200,
        "id": "1722501635",
        "level": "4",
        "reward_amount": 13.78331783,
        "start": 1722499200
      }
    ],
    "0000FF978269EAB73B174410CF09E346A5947B1DFFEE59CF3074040913C14056D9F6": [
      {
        "amount": 1.97280053,
        "end": 1738072800,
        "id": "1721929526",
        "level": "4",
        "reward_amount": 63.55120454,
        "start": 1722520800
      }
    ],
    "00008330CD9373E57D9E870E2C967704CF3E79E7377E8466FAA85FE9A3461519DDE9": [
      {
        "amount": 60.0,
        "end": 1737752400,
        "id": "1722202561",
        "level": "4",
        "reward_amount": 1943.35486164,
        "start": 1722200400
      },
      {
        "amount": 20.0,
        "end": 1787104800,
        "id": "1722171304",
        "level": "6",
        "reward_amount": 184.50928803,
        "start": 1724032800
      },
      {
        "amount": 40.81427052,
        "end": 1753736400,
        "id": "1722202601",
        "level": "5",
        "reward_amount": 2386.13363788,
        "start": 1722200400
      }
    ],
    "0000E852F2C7991670CD5E54275FB3DFA30D1304370421A0E7956E7B91320957596A": [
      {
        "amount": 14.87378641,
        "end": 1726416000,
        "id": "1723825591",
        "level": "2",
        "reward_amount": 27.64846419,
        "start": 1723824000
      },
      {
        "amount": 24.96985465,
        "end": 1726340400,
        "id": "1723750688",
        "level": "2",
        "reward_amount": 55.87272131,
        "start": 1723748400
      }
    ],
    "000075841943354A1464AB072DA34D74F6341FAF821245C7FA06FE2F5F737C6070DB": [
      {
        "amount": 1.0e-5,
        "end": 1786222800,
        "id": "1723152030",
        "level": "6",
        "reward_amount": 0.0,
        "start": 1723150800
      },
      {
        "amount": 0.001,
        "end": 1754683200,
        "id": "1723150484",
        "level": "5",
        "reward_amount": 0.03320719,
        "start": 1723147200
      },
      {
        "amount": 1.0e-5,
        "end": 1753462800,
        "id": "1721929358",
        "level": "5",
        "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": 1816534800,
        "id": "1721929225",
        "level": "7",
        "reward_amount": 0.0,
        "start": 1721926800
      },
      {
        "amount": 1.0e-5,
        "end": 1737478800,
        "id": "1721929396",
        "level": "4",
        "reward_amount": 3.922e-5,
        "start": 1721926800
      },
      {
        "amount": 0.0001,
        "end": 0,
        "id": "1723152612",
        "level": "0",
        "reward_amount": 1.7899e-4,
        "start": null
      }
    ],
    "0000B0BE24E8884C4D245E8F6EDD9A52199ADC4E08CC99951462DD8578921F139DE6": [
      {
        "amount": 4.53317158,
        "end": 1817568000,
        "id": "1722961053",
        "level": "7",
        "reward_amount": 601.92227013,
        "start": 1722960000
      },
      {
        "amount": 8.86339504,
        "end": 1817197200,
        "id": "1721933039",
        "level": "7",
        "reward_amount": 1595.98219793,
        "start": 1722589200
      }
    ],
    "000004ABDBE9D35795ED9A78D0849805B885E116F6F40FF90D35DB568F15F6D1C652": [
      {
        "amount": 260.33469399,
        "end": 1817899200,
        "id": "1723293493",
        "level": "7",
        "reward_amount": 23973.21718339,
        "start": 1723291200
      }
    ],
    "00007FA07F4C3672640E3FD681E0FAE3C80863DD7908C1F81922E5AFD0587933703A": [
      {
        "amount": 3.26021228,
        "end": 1753509600,
        "id": "1721976509",
        "level": "5",
        "reward_amount": 190.60148857,
        "start": 1721973600
      },
      {
        "amount": 0.44083593,
        "end": 1724565600,
        "id": "1721976734",
        "level": "1",
        "reward_amount": 4.20635061,
        "start": 1721973600
      }
    ],
    "000078419299567E0F2FCD8C9D27EE704D1E67AA3F16D60676E4E59B6B553A408A7E": [
      {
        "amount": 439.71716668,
        "end": 1738339200,
        "id": "1722787622",
        "level": "4",
        "reward_amount": 11529.22427159,
        "start": 1722787200
      }
    ],
    "000032DC502B02DEC57A8E5C2246255DA7C246BA71AB9E0D360FCBC9B4DF6D00B96C": [
      {
        "amount": 75.78370887,
        "end": 1816542000,
        "id": "1721935026",
        "level": "7",
        "reward_amount": 14438.83952145,
        "start": 1721934000
      }
    ],
    "0000F1FA618295609C88112355B27B6408B4516FADBE52F1F5055773EF0D21481709": [
      {
        "amount": 250.0,
        "end": 1730365200,
        "id": "1722548174",
        "level": "3",
        "reward_amount": 4273.07292061,
        "start": 1722589200
      },
      {
        "amount": 132.0,
        "end": 1785013200,
        "id": "1721941249",
        "level": "6",
        "reward_amount": 13935.13467601,
        "start": 1721941200
      },
      {
        "amount": 100.0,
        "end": 1816549200,
        "id": "1721941422",
        "level": "7",
        "reward_amount": 19052.69856731,
        "start": 1721941200
      }
    ],
    "0000FC1BE15494A76BFD2DFF8E20AD98BB1CD30F341144547F8F059C430D3387ED6D": [
      {
        "amount": 2.49600361,
        "end": 1817478000,
        "id": "1722872077",
        "level": "7",
        "reward_amount": 359.29040585,
        "start": 1722870000
      },
      {
        "amount": 1859.77238396,
        "end": 1738789200,
        "id": "1723240504",
        "level": "4",
        "reward_amount": 31147.86390717,
        "start": 1723237200
      }
    ],
    "00008A4CB8CEA0D05A77DC99A98378D4D5DB614ACF9D643102B2C9A7B25362E17BA7": [
      {
        "amount": 0.48461404,
        "end": 1818666000,
        "id": "1724060289",
        "level": "7",
        "reward_amount": 7.02893096,
        "start": 1724058000
      }
    ],
    "00003912E3ACB6D77934667E13274828D5AD9AC54A887B5D050C0935ACCCDA8D1E40": [
      {
        "amount": 17.67651906,
        "end": 1753977600,
        "id": "1722444706",
        "level": "5",
        "reward_amount": 1033.4254855,
        "start": 1722441600
      },
      {
        "amount": 17.67651906,
        "end": 1817049600,
        "id": "1722444656",
        "level": "7",
        "reward_amount": 3367.84674937,
        "start": 1722441600
      }
    ],
    "0000092A47748F78775B696FC9376E24AF2927B73E1E4B8D0A1ADFCEA1367B4CB509": [
      {
        "amount": 1.01595724,
        "end": 1816959600,
        "id": "1722354784",
        "level": "7",
        "reward_amount": 193.55759189,
        "start": 1722351600
      }
    ],
    "000073A7AC558F5016CB4892C7827C520A219196863D29C83BD6EF0A570BB2E4B592": [
      {
        "amount": 2.6120638,
        "end": 1817301600,
        "id": "1722696281",
        "level": "7",
        "reward_amount": 433.83581546,
        "start": 1722693600
      },
      {
        "amount": 10.43290415,
        "end": 1738245600,
        "id": "1722696182",
        "level": "4",
        "reward_amount": 294.54206643,
        "start": 1722693600
      }
    ],
    "00007A37924F7BD618236ACE864E9FA1FBAFAB393DD45ED65B3A5A7940BECB39FC04": [
      {
        "amount": 1.91991801,
        "end": 1818183600,
        "id": "1723577244",
        "level": "7",
        "reward_amount": 114.77067723,
        "start": 1723575600
      }
    ],
    "000032687AA8603CA859AEFB8E12CDFB6D28916B2C09E73DB3BA543F09B222A98403": [
      {
        "amount": 110.69792489,
        "end": 1816876800,
        "id": "1722269359",
        "level": "7",
        "reward_amount": 21090.94145063,
        "start": 1722268800
      }
    ],
    "0000FD163D0CAD7CF62A6239A037EDABC27AD8467AD2898F899A88C7200DE2FB657A": [
      {
        "amount": 74.16892683,
        "end": 1729735200,
        "id": "1721959925",
        "level": "3",
        "reward_amount": 1341.530612,
        "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": 91296.19555357,
        "start": 1722682800
      }
    ],
    "00003933C19DE8F6195AD0F7103D928C52A0B831DCA872F32740F0400C6998CA9CCB": [
      {
        "amount": 49.68521042,
        "end": 1725364800,
        "id": "1722775181",
        "level": "2",
        "reward_amount": 410.79890178,
        "start": 1722772800
      }
    ],
    "000078568EA8D66A60EC971FF34A4A53487674EDBB88CF58ED2BB73AD05CE21A94E8": [
      {
        "amount": 2.82762956,
        "end": 1726599600,
        "id": "1722782115",
        "level": "2",
        "reward_amount": 2.81558912,
        "start": 1724007600
      }
    ],
    "0000801092626879C235480C13BFC18B9568CA51649E42C3BED6D8AC482D4B91F9C5": [
      {
        "amount": 23.00584072,
        "end": 1817532000,
        "id": "1722927504",
        "level": "7",
        "reward_amount": 3157.38735031,
        "start": 1722924000
      },
      {
        "amount": 3.70605259,
        "end": 1816812000,
        "id": "1722204811",
        "level": "7",
        "reward_amount": 706.0941347,
        "start": 1722204000
      },
      {
        "amount": 0.36723386,
        "end": 1816779600,
        "id": "1722174812",
        "level": "7",
        "reward_amount": 69.95739637,
        "start": 1722171600
      },
      {
        "amount": 2.0,
        "end": 1738476000,
        "id": "1722927446",
        "level": "4",
        "reward_amount": 46.65623273,
        "start": 1722924000
      }
    ],
    "00007F1492C7E870854B53AD203A499739CCB6F89CD27815BBC4BDD3BE81222C9440": [
      {
        "amount": 1.4037579,
        "end": 1817204400,
        "id": "1722598748",
        "level": "7",
        "reward_amount": 251.39223606,
        "start": 1722596400
      }
    ],
    "0000BBC821314DDC42500CE5323C1FEBF4FAD1DD23B66D2A6E26056B7DE4BAC368BE": [
      {
        "amount": 50.47108125,
        "end": 1818446400,
        "id": "1723839883",
        "level": "7",
        "reward_amount": 1702.89208427,
        "start": 1723838400
      }
    ],
    "0000658314D9BA0FEFFE2F5DE0813BC53B25D3CDD49A54D59C991E8790A7F5375D5B": [
      {
        "amount": 174.28968373,
        "end": 1754226000,
        "id": "1722690048",
        "level": "5",
        "reward_amount": 8907.04896768,
        "start": 1722690000
      }
    ],
    "0000B0545556A79213679C1CF272B02D979C4E19400B44129989F81627A61C521716": [
      {
        "amount": 89.19491166,
        "end": 1817024400,
        "id": "1722418516",
        "level": "7",
        "reward_amount": 16994.03439436,
        "start": 1722416400
      }
    ],
    "00005B4473C5D282EBC71AF34C1E78870510C81BE8384493468500047E2B4FF9A000": [
      {
        "amount": 19.05256979,
        "end": 1729940400,
        "id": "1722165282",
        "level": "3",
        "reward_amount": 344.61326406,
        "start": 1722164400
      }
    ],
    "0000D098F675C8F040C1E25B25891F317E4857B9550A8FED31A2C3C3B759A39FA75B": [
      {
        "amount": 184.24142176,
        "end": 1731168000,
        "id": "1723393405",
        "level": "3",
        "reward_amount": 1408.26491141,
        "start": 1723392000
      }
    ],
    "00004C0F3FFD1B78130730BF1F0C122ADDFC0CE82C37C28F1B9C605895A743ECCA23": [
      {
        "amount": 4.25171936,
        "end": 1817931600,
        "id": "1723324837",
        "level": "7",
        "reward_amount": 375.69141889,
        "start": 1723323600
      },
      {
        "amount": 6.6505941,
        "end": 1731135600,
        "id": "1723362226",
        "level": "3",
        "reward_amount": 53.17435469,
        "start": 1723359600
      }
    ],
    "0000D80508879A4DA21AC5FEA1F984C8E260BFE13F088C1C9041417B71366E605669": [
      {
        "amount": 40.0,
        "end": 1816552800,
        "id": "1721946923",
        "level": "7",
        "reward_amount": 7621.07325885,
        "start": 1721944800
      },
      {
        "amount": 8.22453894,
        "end": 1753480800,
        "id": "1721946823",
        "level": "5",
        "reward_amount": 480.83236776,
        "start": 1721944800
      },
      {
        "amount": 10.0,
        "end": 1785016800,
        "id": "1721946894",
        "level": "6",
        "reward_amount": 1055.69118761,
        "start": 1721944800
      }
    ],
    "0000B80188376223239FDD24F1A3CFC6528B6FCF41DCF14D256C51D0E3BF27BF8252": [
      {
        "amount": 7.92679203,
        "end": 1817899200,
        "id": "1723291831",
        "level": "7",
        "reward_amount": 729.94126364,
        "start": 1723291200
      }
    ],
    "000028DFBAC45E559E66DB44A7A0B75C7F950D9A0C516E1DC615DEDB8D29FD84680A": [
      {
        "amount": 99.99706986,
        "end": 1786950000,
        "id": "1723666027",
        "level": "6",
        "reward_amount": 1664.45756801,
        "start": 1723878000
      },
      {
        "amount": 300.0,
        "end": 1818403200,
        "id": "1723665928",
        "level": "7",
        "reward_amount": 11333.86746007,
        "start": 1723795200
      },
      {
        "amount": 300.0,
        "end": 1786719600,
        "id": "1723650718",
        "level": "6",
        "reward_amount": 8626.44542523,
        "start": 1723647600
      },
      {
        "amount": 200.0,
        "end": 1818255600,
        "id": "1723650497",
        "level": "7",
        "reward_amount": 10379.22633159,
        "start": 1723647600
      },
      {
        "amount": 600.0,
        "end": 1818252000,
        "id": "1723644028",
        "level": "7",
        "reward_amount": 31356.51729204,
        "start": 1723644000
      },
      {
        "amount": 600.0,
        "end": 1755180000,
        "id": "1723644127",
        "level": "5",
        "reward_amount": 9621.53669341,
        "start": 1723644000
      },
      {
        "amount": 300.0,
        "end": 1818230400,
        "id": "1723622574",
        "level": "7",
        "reward_amount": 16377.68862819,
        "start": 1723622400
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538611",
        "level": "7",
        "reward_amount": 578.77389318,
        "start": 1724094000
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538505",
        "level": "7",
        "reward_amount": 578.77389318,
        "start": 1724094000
      },
      {
        "amount": 108.06605186,
        "end": 1739725200,
        "id": "1723538332",
        "level": "4",
        "reward_amount": 98.42587492,
        "start": 1724173200
      },
      {
        "amount": 100.0,
        "end": 1739127600,
        "id": "1723579119",
        "level": "4",
        "reward_amount": 1016.15012975,
        "start": 1723575600
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723579371",
        "level": "7",
        "reward_amount": 1736.32444515,
        "start": 1724094000
      },
      {
        "amount": 145.48629854,
        "end": 1818486000,
        "id": "1723579626",
        "level": "7",
        "reward_amount": 4370.50868732,
        "start": 1723878000
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723622714",
        "level": "7",
        "reward_amount": 1736.32444515,
        "start": 1724094000
      },
      {
        "amount": 300.0,
        "end": 1739196000,
        "id": "1723644222",
        "level": "4",
        "reward_amount": 2664.95761607,
        "start": 1723644000
      },
      {
        "amount": 300.0,
        "end": 1818486000,
        "id": "1723644433",
        "level": "7",
        "reward_amount": 9012.20761814,
        "start": 1723878000
      },
      {
        "amount": 300.0,
        "end": 1755183600,
        "id": "1723650558",
        "level": "5",
        "reward_amount": 4777.19490291,
        "start": 1723647600
      },
      {
        "amount": 369.17389677,
        "end": 1818702000,
        "id": "1723650878",
        "level": "7",
        "reward_amount": 4273.37120312,
        "start": 1724094000
      },
      {
        "amount": 900.0,
        "end": 1818666000,
        "id": "1723665834",
        "level": "7",
        "reward_amount": 13055.22438219,
        "start": 1724058000
      },
      {
        "amount": 46.3,
        "end": 1818349200,
        "id": "1723665986",
        "level": "7",
        "reward_amount": 1987.22113325,
        "start": 1723741200
      }
    ],
    "0000EFDED9E6F9CA05F381554221EEEA88CC5AC1678AC35D340C56769E2A9EACDBF2": [
      {
        "amount": 1.30611653,
        "end": 1739613600,
        "id": "1724063344",
        "level": "4",
        "reward_amount": 3.15531456,
        "start": 1724061600
      }
    ],
    "00000F3CF7C963A098F6215C07466411CD95E07F93D7117EF8FE16DA3BE691760DC8": [
      {
        "amount": 47.8635734,
        "end": 1738065600,
        "id": "1722516149",
        "level": "4",
        "reward_amount": 1550.26507002,
        "start": 1722513600
      }
    ],
    "00004D2EF8BD21C17E05EF99F64446E28D8C70B5B3B3BBDB0B92A728CDA363AD1805": [
      {
        "amount": 0.67011237,
        "end": 1724522400,
        "id": "1721933831",
        "level": "1",
        "reward_amount": 6.3334839,
        "start": 1721930400
      },
      {
        "amount": 2.0,
        "end": 1816538400,
        "id": "1721933667",
        "level": "7",
        "reward_amount": 381.0443238,
        "start": 1721930400
      }
    ],
    "00009B697D797598F4ED3FDE3FF5EC00D10AC723A784DFB6EC9A6F8819D4A6EECC8D": [
      {
        "amount": 225.51623442,
        "end": 1817892000,
        "id": "1723287006",
        "level": "7",
        "reward_amount": 20957.60369889,
        "start": 1723284000
      }
    ],
    "000059A6082E05094B0AE076618B015A062172EEE73FA24D7D61994E796309C8DD42": [
      {
        "amount": 166.26275985,
        "end": 1818586800,
        "id": "1723978992",
        "level": "7",
        "reward_amount": 3532.52725995,
        "start": 1723978800
      }
    ],
    "0000F9EB9BE130704D0955D4AA1646357D22F0ADE0CCBEA3443F4A3A632729BAA588": [
      {
        "amount": 51.85740662,
        "end": 1754222400,
        "id": "1722688751",
        "level": "5",
        "reward_amount": 2657.48319947,
        "start": 1722686400
      },
      {
        "amount": 620.65359476,
        "end": 1729706400,
        "id": "1721932806",
        "level": "3",
        "reward_amount": 11226.07431542,
        "start": 1721930400
      }
    ],
    "0000BCED16C487F268B038B6660746D265E586A959EE526942DA3A87CD1FFB720302": [
      {
        "amount": 3.75132465,
        "end": 1724738400,
        "id": "1724133674",
        "level": "1",
        "reward_amount": 0.91110906,
        "start": 1724133600
      }
    ],
    "0000FB9C2BC25B3A67E1CE324F6E3CE81F6FFD596F31358E85BB31BECCAC61F08FF7": [
      {
        "amount": 50.12595538,
        "end": 1724522400,
        "id": "1721930366",
        "level": "1",
        "reward_amount": 473.76175612,
        "start": 1721930400
      }
    ]
  },
  "last_calculation_timestamp": 1724241600,
  "lp_tokens_deposited": 28425.16318086,
  "lp_tokens_deposited_by_level": {
    "0": 30.7488848,
    "1": 1801.64638469,
    "2": 306.22720823,
    "3": 1885.94115528,
    "4": 4099.72941644,
    "5": 3249.68567018,
    "6": 1736.5316771,
    "7": 15314.65278414
  },
  "rewards_distributed": 35870.44513884,
  "rewards_reserved": 2429784.80601671
}
                  
Movements (0)

Ownerships (1)

  • Secret shared with 1 key

    Encoded secret

    3212C977B65894F17BFE384B636127006BADA6712D8EF3217860D0F61CFF4E6A417AF7A5FA912D2DEEE20C6339540E60A3C7744985776CD0AB3189BA

    Authorized keys

    • 000122A6CD9ED07E46835D6E88E5BD0BEE84C3F5E5DBF8E916AD9B2EC912C44AFEC2

Contract recipients (0)

Inputs (0)

Contract inputs (0)

Unspent outputs (0)

Proofs and signatures

Previous public key

0001308D18D1197B7CF7729F245ACE4085CC374A8B8E23DEA836A86C66A4F8FDF219

Previous signature

7548515DE227102C4D5C688217827D91BA53A14156496299A18703BB20ED3CE725E74C417957EA676FDDA81628C29602333EFCCFCB83AC33F237C0768B366800

Origin signature

304402207EA36BE11700825DE7BF8D5FE00B54B175CCA8FF999CFE61495C8514C084CC82022051CE54B10023E3C7F732520D8CDA69DB1D1ACCF24D194D037D4797A7903C5E92

Proof of work

010104294BD98CA56FA4D6BF0A5157D36210B3E0B8FE1EFD897F77F88F6C0C07FE68F43D0B2E1F6C27E9A902D7C311E0491EC75EB2406FD7B60705ACF4909E2DC026D9

Proof of integrity

00A6A66C30629724950A95FC86A00428B58588AF6D7B2494F4D1E21CCBC973D330

Coordinator signature

55F10442D1AB5FA01CA70AE060D0EEB802EFBBCBB61CC83E9497A6E298289F13314BB19F7C4A5B3F24E4141AF5F740B2F070D22527DD05BD90383E0090A93E01

Validator #1 public key

0001936CCE1295F6988DB49825C6CDE26CF96AC12657C56CA7AC06C1D4C98E99E9D4

Validator #1 signature

0066BD95BC62EF01C883A6EEF7B39D0A33055B56BDADCEE93092F7D06B827F8212131ADB06867193988179D0F278663399352373F99B2CFC94A5CF8CCFB46E0F

Validator #2 public key

0001A9F0500AF81DE5A035239617CCCB9C0C6F57CF6657C72CDC809182518FA6BF2F

Validator #2 signature

6404857C34E105A3F726B3CA8A8A1F4F3EFB559E5DD2BA0BBD1FBB6F4B6A7DCCA8121D17A0BAC6775DA60BC55A84CDE8A1DBCA0E352FA71002DE9CD13929DE06