Type
CONTRACT
Validation date
2024-08-24 06:05:04 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 (31.6 KB)

 
{
  "deposits": {
    "000065ED9197B2A42733A3B013918A99978FC7B0B1D122C7CFD4C2771ACA32A9A498": [
      {
        "amount": 1012.34031492,
        "end": 1753675200,
        "id": "1722142705",
        "level": "5",
        "reward_amount": 64904.59625565,
        "start": 1722139200
      }
    ],
    "00002A66DA71EAC3F89593AF98030DCA2992793C6B21C29957DE33C6AA8EDF304863": [
      {
        "amount": 100.1091199,
        "end": 1819065600,
        "id": "1724460531",
        "level": "7",
        "reward_amount": 164.66368548,
        "start": 1724457600
      },
      {
        "amount": 249.1831584,
        "end": 1818979200,
        "id": "1724371528",
        "level": "7",
        "reward_amount": 2063.30919669,
        "start": 1724371200
      }
    ],
    "00005A8AD2778CF4E75EF89CCAC998933DF85BC77554CA613AD9C57614F96C84BC7D": [
      {
        "amount": 0.87519426,
        "end": 1726743600,
        "id": "1724154892",
        "level": "2",
        "reward_amount": 1.18079203,
        "start": 1724151600
      }
    ],
    "0000252072D93B1C449ACC6CF87E775CF3A2B3DA2C12EF46383727AE0506BE523710": [
      {
        "amount": 171.49774951,
        "end": 1817028000,
        "id": "1722420833",
        "level": "7",
        "reward_amount": 35832.89208185,
        "start": 1722420000
      }
    ],
    "000046EDE1CCA30F2CF949644A1E96B7C9B068DB9B19B62A36DF01141A4F6E9100C8": [
      {
        "amount": 64.51723278,
        "end": 1739552400,
        "id": "1724002504",
        "level": "4",
        "reward_amount": 414.7690622,
        "start": 1724000400
      }
    ],
    "0000826DEC97863D0818C0640973AADE01E0C777305109A83C5FB4EA225464E4790B": [
      {
        "amount": 4.7798319,
        "end": 1730296800,
        "id": "1722524308",
        "level": "3",
        "reward_amount": 94.3418185,
        "start": 1722520800
      },
      {
        "amount": 13.89066514,
        "end": 1817103600,
        "id": "1722497039",
        "level": "7",
        "reward_amount": 2902.31616737,
        "start": 1722495600
      }
    ],
    "0000BCD3704EE34991D1089D301EB3909BBC9BA3CDDFA8EA813DBA8672AF9F633CA8": [
      {
        "amount": 5.40278223,
        "end": 1738004400,
        "id": "1722453909",
        "level": "4",
        "reward_amount": 191.90194674,
        "start": 1722452400
      }
    ],
    "00005EC81836452C89EEBDC720E3E39915E86043088DF9F6FA064EACF3370CE2C028": [
      {
        "amount": 29.80858377,
        "end": 1818950400,
        "id": "1724343421",
        "level": "7",
        "reward_amount": 313.82921505,
        "start": 1724342400
      },
      {
        "amount": 27.26909363,
        "end": 1817755200,
        "id": "1723150189",
        "level": "7",
        "reward_amount": 3491.77568484,
        "start": 1723147200
      }
    ],
    "0000E8078E064F1726753697FEE0290FA9BFE7B03608517F29632029E74AC7904819": [
      {
        "amount": 423.85680263,
        "end": 1817107200,
        "id": "1722499858",
        "level": "7",
        "reward_amount": 88561.04042578,
        "start": 1722499200
      },
      {
        "amount": 423.85680262,
        "end": 1754035200,
        "id": "1722499733",
        "level": "5",
        "reward_amount": 27174.90725393,
        "start": 1722499200
      }
    ],
    "000009FF674C87EAE7F4C98977E366BFBEA91CB2A017C9097A17058EE15A7C09B87F": [
      {
        "amount": 47.37426984,
        "end": 1729962000,
        "id": "1722189537",
        "level": "3",
        "reward_amount": 939.68744122,
        "start": 1722186000
      },
      {
        "amount": 47.37426983,
        "end": 1816794000,
        "id": "1722189498",
        "level": "7",
        "reward_amount": 9898.41400474,
        "start": 1722186000
      }
    ],
    "000092174345CF579DCA98B190387763669BC5D1A45A737F5AF17ABAF5E2B27C8DF7": [
      {
        "amount": 39.53442209,
        "end": 1816542000,
        "id": "1721934957",
        "level": "7",
        "reward_amount": 8260.34777614,
        "start": 1721934000
      }
    ],
    "0000D6E65A30304EE9909CA661F2229408048CE7DB515CD2A9D38E63A0CBA44076AE": [
      {
        "amount": 24.53218931,
        "end": 1785524400,
        "id": "1722453868",
        "level": "6",
        "reward_amount": 2840.14060647,
        "start": 1722452400
      },
      {
        "amount": 98.12875723,
        "end": 1738004400,
        "id": "1722453752",
        "level": "4",
        "reward_amount": 3485.45550577,
        "start": 1722452400
      },
      {
        "amount": 0.24513861,
        "end": 1816610400,
        "id": "1722003018",
        "level": "7",
        "reward_amount": 51.20702535,
        "start": 1722002400
      },
      {
        "amount": 49.06437862,
        "end": 1753988400,
        "id": "1722453803",
        "level": "5",
        "reward_amount": 3145.6843577,
        "start": 1722452400
      },
      {
        "amount": 24.53218931,
        "end": 1817060400,
        "id": "1722453904",
        "level": "7",
        "reward_amount": 5125.7673736,
        "start": 1722452400
      },
      {
        "amount": 11.70730649,
        "end": 1726858800,
        "id": "1724269876",
        "level": "2",
        "reward_amount": 10.1975124,
        "start": 1724266800
      }
    ],
    "0000D620FC554D881E327CC59321CD09CDF3B1C3FBA201A2A58FE9B9B0F3B696FBCE": [
      {
        "amount": 4.52073371,
        "end": 1817575200,
        "id": "1722967412",
        "level": "7",
        "reward_amount": 679.48184775,
        "start": 1722967200
      },
      {
        "amount": 27.03971832,
        "end": 1817629200,
        "id": "1723022105",
        "level": "7",
        "reward_amount": 3883.47271335,
        "start": 1723021200
      }
    ],
    "0000FB9D022F9A2BABE63AD726FC8038958A73F8999170CD0DE666716911B37D57CD": [
      {
        "amount": 51.03800725,
        "end": 1816887600,
        "id": "1722279880",
        "level": "7",
        "reward_amount": 10663.91985433,
        "start": 1722279600
      }
    ],
    "00003BC98F60FA93EE3CF4460CAB7CE7206745F04722B7521480695429EDF731FDE2": [
      {
        "amount": 342.70907838,
        "end": 1785740400,
        "id": "1722669540",
        "level": "6",
        "reward_amount": 35659.72750395,
        "start": 1722668400
      },
      {
        "amount": 2988.25934822,
        "end": 1816617600,
        "id": "1722011226",
        "level": "7",
        "reward_amount": 624369.78973118,
        "start": 1722009600
      }
    ],
    "0000B10AC91AC815D0914645315546479564BC330FC92868B56FC7B505708278B776": [
      {
        "amount": 35.20322403,
        "end": 1817121600,
        "id": "1722516784",
        "level": "7",
        "reward_amount": 7355.38782376,
        "start": 1722513600
      }
    ],
    "000044305A6A17545FCF99E6DC1D6AAD4A53519877FD44E9BD26DB054B511CAE338F": [
      {
        "amount": 122.34781822,
        "end": 1730556000,
        "id": "1722783119",
        "level": "3",
        "reward_amount": 2015.76437788,
        "start": 1722780000
      },
      {
        "amount": 68.88470637,
        "end": 1816977600,
        "id": "1721973718",
        "level": "7",
        "reward_amount": 14392.82706422,
        "start": 1722369600
      }
    ],
    "00002F6D49B04D55B9B553068CFFBCF4E8D410F4E270748FC5E8DD7BC1791BE13974": [
      {
        "amount": 15.69235238,
        "end": 1818151200,
        "id": "1723543970",
        "level": "7",
        "reward_amount": 1283.735388,
        "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.15667772,
        "start": 1721926800
      },
      {
        "amount": 0.01,
        "end": 1724518800,
        "id": "1721929367",
        "level": "1",
        "reward_amount": 0.09967722,
        "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.19813817,
        "start": 1721926800
      }
    ],
    "0000FDEBA3D305BED46E068C5333ED2D8FFFEEFA016B4E2AF505D98AED22079751CE": [
      {
        "amount": 29.39010433,
        "end": 1818018000,
        "id": "1723412600",
        "level": "7",
        "reward_amount": 2847.37021077,
        "start": 1723410000
      }
    ],
    "0000EBFE35D4B9964DC41D0AC22764B67407F20F9B309E26E1D1487AF35F6755A6AD": [
      {
        "amount": 67.67810588,
        "end": 1724612400,
        "id": "1722020752",
        "level": "1",
        "reward_amount": 688.10905357,
        "start": 1722020400
      },
      {
        "amount": 40.0,
        "end": 1816628400,
        "id": "1722020474",
        "level": "7",
        "reward_amount": 8357.62684613,
        "start": 1722020400
      },
      {
        "amount": 20.0,
        "end": 1816628400,
        "id": "1722020533",
        "level": "7",
        "reward_amount": 4178.80655036,
        "start": 1722020400
      },
      {
        "amount": 60.0,
        "end": 1729796400,
        "id": "1722020692",
        "level": "3",
        "reward_amount": 1190.12380009,
        "start": 1722020400
      }
    ],
    "00005C2BD26B5D2F4FF11FFD99819956951F4B693561537148234FFED99D20DB4F91": [
      {
        "amount": 7.76231264,
        "end": 1730296800,
        "id": "1722524267",
        "level": "3",
        "reward_amount": 153.20869738,
        "start": 1722520800
      },
      {
        "amount": 34.70006897,
        "end": 1817103600,
        "id": "1722496906",
        "level": "7",
        "reward_amount": 7250.25482344,
        "start": 1722495600
      }
    ],
    "0000F3C03F61A33CB9E95774AF19D956542D3284F90113A3E5837274CA9D258E4FA5": [
      {
        "amount": 41.75002557,
        "end": 1817125200,
        "id": "1721977125",
        "level": "7",
        "reward_amount": 8701.91245159,
        "start": 1722517200
      },
      {
        "amount": 30.0,
        "end": 1816581600,
        "id": "1721976242",
        "level": "7",
        "reward_amount": 6268.21683397,
        "start": 1721973600
      },
      {
        "amount": 45.0,
        "end": 1816844400,
        "id": "1721977068",
        "level": "7",
        "reward_amount": 9402.33324351,
        "start": 1722236400
      }
    ],
    "00007BFD0BCB91C1AB0D67F6D1954085441EC68908D5DDAAADC31D901D635EB56ADC": [
      {
        "amount": 5.31061115,
        "end": 1738011600,
        "id": "1722461473",
        "level": "4",
        "reward_amount": 188.62830732,
        "start": 1722459600
      },
      {
        "amount": 10.62122228,
        "end": 1785531600,
        "id": "1722461401",
        "level": "6",
        "reward_amount": 1229.63986393,
        "start": 1722459600
      },
      {
        "amount": 21.24244457,
        "end": 1817067600,
        "id": "1722461363",
        "level": "7",
        "reward_amount": 4438.40505137,
        "start": 1722459600
      },
      {
        "amount": 5.31061114,
        "end": 1753995600,
        "id": "1722461441",
        "level": "5",
        "reward_amount": 340.48058298,
        "start": 1722459600
      }
    ],
    "000099158E2C0FC1E717A1A8FCE1752EF366E20EAAA4CE9F38BAE864C13A32EAC9E6": [
      {
        "amount": 10.00551293,
        "end": 1816657200,
        "id": "1722050840",
        "level": "7",
        "reward_amount": 2090.54947775,
        "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": 473.50820861,
        "start": 1722063600
      }
    ],
    "0000D8C63858B8062159808FA02E80C64F2BB119E13F52B9C81F7B178A971402F691": [
      {
        "amount": 26.32529758,
        "end": 1817215200,
        "id": "1721934053",
        "level": "7",
        "reward_amount": 5160.96924192,
        "start": 1722607200
      },
      {
        "amount": 1.9771422,
        "end": 1816542000,
        "id": "1721934986",
        "level": "7",
        "reward_amount": 413.09540127,
        "start": 1721934000
      }
    ],
    "00009B6AD59D37AAAAD1747B0B9E54D43AB03A3E2B991BCF6EC876FF1A0D0E6AB14D": [
      {
        "amount": 42.51770246,
        "end": 1817064000,
        "id": "1722458621",
        "level": "7",
        "reward_amount": 8883.67835308,
        "start": 1722456000
      }
    ],
    "00002B4F50927C12B2D51BF740B8DF859F2D5A97B360DF36DA6316EED20AD3497F69": [
      {
        "amount": 758.78276272,
        "end": 1818511200,
        "id": "1723904155",
        "level": "7",
        "reward_amount": 35035.62561902,
        "start": 1723903200
      }
    ],
    "000001F572D6467EDC154E09FA0B58BF5D7DC9D41EA0315C43610EF1406320934401": [
      {
        "amount": 1329.13816876,
        "end": 1724565600,
        "id": "1721975702",
        "level": "1",
        "reward_amount": 1571.80502671,
        "start": 1723960800
      }
    ],
    "00001E3A03626544B66D236F259AF26A6BDA73EBF6C3EFE84DB351A57BEEA776F338": [
      {
        "amount": 61.98573547,
        "end": 1816862400,
        "id": "1722256545",
        "level": "7",
        "reward_amount": 12951.34719884,
        "start": 1722254400
      }
    ],
    "00007633A19FA04D0AEB498A13F0036F4A57B6B8D51A482B21856E2FEEA2062D2E1B": [
      {
        "amount": 105.01724955,
        "end": 1724770800,
        "id": "1722179896",
        "level": "1",
        "reward_amount": 1100.57430454,
        "start": 1722178800
      }
    ],
    "0000A4E8AAD6D7C5A7E98600D8ECA42D067CA9381AAD0CB1CD1C2B887FD3CF6DE9F9": [
      {
        "amount": 1.93830928,
        "end": 1818914400,
        "id": "1724309514",
        "level": "7",
        "reward_amount": 25.86025851,
        "start": 1724306400
      },
      {
        "amount": 22.49541696,
        "end": 1755403200,
        "id": "1723869811",
        "level": "5",
        "reward_amount": 341.42231714,
        "start": 1723867200
      },
      {
        "amount": 53.50219411,
        "end": 1818734400,
        "id": "1724128095",
        "level": "7",
        "reward_amount": 1468.18799064,
        "start": 1724126400
      }
    ],
    "00005CE8B2DF75E028E3A597C002168CE3515FDEFADCB690A54A214B7CC33D97D877": [
      {
        "amount": 182.18728409,
        "end": 1817139600,
        "id": "1722532691",
        "level": "7",
        "reward_amount": 37601.3028695,
        "start": 1722531600
      }
    ],
    "0000C15B3E78CC1D87238E3BFAAD5CF05CD56BA2160E1D68E8BEF7C5010B4AC87217": [
      {
        "amount": 14.75263177,
        "end": 1726837200,
        "id": "1724245865",
        "level": "2",
        "reward_amount": 14.17179117,
        "start": 1724245200
      },
      {
        "amount": 14.75263177,
        "end": 1724850000,
        "id": "1724246079",
        "level": "1",
        "reward_amount": 7.67640004,
        "start": 1724245200
      }
    ],
    "00001433FCDCB6526284D15595BA9D1646F6A053525C76BCDC8FBA7AAB6C10128FE5": [
      {
        "amount": 78.80771402,
        "end": 1817035200,
        "id": "1722429634",
        "level": "7",
        "reward_amount": 16466.14956009,
        "start": 1722427200
      },
      {
        "amount": 321.79211689,
        "end": 1816581600,
        "id": "1721974280",
        "level": "7",
        "reward_amount": 67235.54474852,
        "start": 1721973600
      }
    ],
    "000006FBF6B819682713C55101B6E40FD44EE4CB6FCAC79DECC9BA7937FA03B4105D": [
      {
        "amount": 107.25019302,
        "end": 1818280800,
        "id": "1721932444",
        "level": "7",
        "reward_amount": 7278.8823424,
        "start": 1723672800
      }
    ],
    "000019FC92D343ABC49E036ED1269A1519F7705DE521CD16A80568F9ACEA64AF630E": [
      {
        "amount": 4.80992698,
        "end": 1818104400,
        "id": "1723411848",
        "level": "7",
        "reward_amount": 418.65742999,
        "start": 1723496400
      },
      {
        "amount": 2.6725006,
        "end": 1818014400,
        "id": "1723409213",
        "level": "7",
        "reward_amount": 260.01078038,
        "start": 1723406400
      },
      {
        "amount": 2.67282051,
        "end": 1818000000,
        "id": "1723394536",
        "level": "7",
        "reward_amount": 264.43679075,
        "start": 1723392000
      },
      {
        "amount": 3.74973406,
        "end": 1731625200,
        "id": "1723849589",
        "level": "3",
        "reward_amount": 18.20418379,
        "start": 1723849200
      }
    ],
    "0000E82C3C5C9FC73EC8FF057BB18DE85342C3D22EC6A079F1290B5DB287E8B67B36": [
      {
        "amount": 1230.75929709,
        "end": 1817118000,
        "id": "1722510225",
        "level": "7",
        "reward_amount": 257156.02850345,
        "start": 1722510000
      }
    ],
    "0000CBA94C234B9812CADD90F969CE6283D1A9CA67646B0A1F7CDED665AE5EAF738E": [
      {
        "amount": 0.21072829,
        "end": 1786190400,
        "id": "1723119516",
        "level": "6",
        "reward_amount": 15.367381,
        "start": 1723118400
      },
      {
        "amount": 0.23839507,
        "end": 1754071200,
        "id": "1722537580",
        "level": "5",
        "reward_amount": 15.05965378,
        "start": 1722535200
      },
      {
        "amount": 0.1,
        "end": 1816588800,
        "id": "1721981565",
        "level": "7",
        "reward_amount": 20.8813934,
        "start": 1721980800
      },
      {
        "amount": 0.93935458,
        "end": 1785607200,
        "id": "1722537247",
        "level": "6",
        "reward_amount": 107.15955139,
        "start": 1722535200
      }
    ],
    "0000B4B884CF98D325EA231AFF2EA5DC31F9C358F5FCB8B608472A3A96BE752A07F7": [
      {
        "amount": 254.72304285,
        "end": 1817121600,
        "id": "1722514104",
        "level": "7",
        "reward_amount": 53222.06645867,
        "start": 1722513600
      },
      {
        "amount": 9.44608568,
        "end": 1817373600,
        "id": "1722514351",
        "level": "7",
        "reward_amount": 1656.62399405,
        "start": 1722765600
      },
      {
        "amount": 37.78434274,
        "end": 1817175600,
        "id": "1722514247",
        "level": "7",
        "reward_amount": 7610.92191225,
        "start": 1722567600
      },
      {
        "amount": 18.89217137,
        "end": 1754049600,
        "id": "1722514298",
        "level": "5",
        "reward_amount": 1211.24070343,
        "start": 1722513600
      },
      {
        "amount": 4.72304284,
        "end": 1817373600,
        "id": "1722514397",
        "level": "7",
        "reward_amount": 828.30689845,
        "start": 1722765600
      },
      {
        "amount": 1.58757603,
        "end": 1817373600,
        "id": "1722514679",
        "level": "7",
        "reward_amount": 278.41586315,
        "start": 1722765600
      },
      {
        "amount": 87.28512712,
        "end": 1818262800,
        "id": "1723655698",
        "level": "7",
        "reward_amount": 6075.6413803,
        "start": 1723654800
      }
    ],
    "00004DC6EBEA8E26909D9E9FB1C604A7270F3A2CC804F5F64DCD03DA70CC903BC98D": [
      {
        "amount": 50.26752325,
        "end": 1737986400,
        "id": "1722437015",
        "level": "4",
        "reward_amount": 1785.46230866,
        "start": 1722434400
      }
    ],
    "00008DF280685C32B0693F69FC22C5122E1C54A9DFFEF88CE00A8828C72B4459C2F6": [
      {
        "amount": 47.94319205,
        "end": 1729713600,
        "id": "1721938117",
        "level": "3",
        "reward_amount": 950.97220888,
        "start": 1721937600
      }
    ],
    "00007C6409AF3DB9B3C6430AD466A43A186EB7144CF4289638E840E56186D3B1B9B4": [
      {
        "amount": 36.5809169,
        "end": 1818518400,
        "id": "1723911946",
        "level": "7",
        "reward_amount": 1666.3185891,
        "start": 1723910400
      }
    ],
    "00001D52DD87EE906E25919F74B607790D87D17723EC9CA2B19224739708782A1D23": [
      {
        "amount": 2.96915153,
        "end": 1724522400,
        "id": "1721932389",
        "level": "1",
        "reward_amount": 29.63167923,
        "start": 1721930400
      }
    ],
    "000075EF1174A535403DF88EE3A27807B596539F09C6F63033A00A38F4E1B811AE1F": [
      {
        "amount": 1.81496057,
        "end": 1816855200,
        "id": "1722249973",
        "level": "7",
        "reward_amount": 379.21008331,
        "start": 1722247200
      }
    ],
    "0000D7F7B94DD148DCD31B25C51647090A34F2210EF612BF9C0988EA2A3C3B7B9712": [
      {
        "amount": 13.61565332,
        "end": 1817755200,
        "id": "1723150527",
        "level": "7",
        "reward_amount": 1743.46471859,
        "start": 1723147200
      },
      {
        "amount": 604.03017627,
        "end": 1816959600,
        "id": "1722353473",
        "level": "7",
        "reward_amount": 126206.63907537,
        "start": 1722351600
      }
    ],
    "00004A6F653B2A69335AF13A8F8E5512B3E53F3AFAFCF138435732199C9FAC4290C7": [
      {
        "amount": 10.9057332,
        "end": 1730217600,
        "id": "1722442119",
        "level": "3",
        "reward_amount": 216.31941143,
        "start": 1722441600
      }
    ],
    "00006D17EB8A194974555425952659CBD0F2C969CE33C0DE0EC890794FAAC5AE6A94": [
      {
        "amount": 131.01401512,
        "end": 1785168000,
        "id": "1722096944",
        "level": "6",
        "reward_amount": 15167.75970507,
        "start": 1722096000
      }
    ],
    "00003694D832E63C02120BA8697CF8FD2D4A79DB1175D8068D4772D80E2F8525147F": [
      {
        "amount": 4.47623045,
        "end": 1754719200,
        "id": "1723185134",
        "level": "5",
        "reward_amount": 169.77002132,
        "start": 1723183200
      },
      {
        "amount": 4.47623045,
        "end": 1817791200,
        "id": "1723184982",
        "level": "7",
        "reward_amount": 553.27499811,
        "start": 1723183200
      }
    ],
    "0000381ADEE3D08CE73D5BD8D98B35728546FDE56758915FA5B583A807E926049846": [
      {
        "amount": 48.71435884,
        "end": 1754258400,
        "id": "1722725692",
        "level": "5",
        "reward_amount": 2703.23428862,
        "start": 1722722400
      },
      {
        "amount": 120.67951889,
        "end": 1724634000,
        "id": "1722762931",
        "level": "1",
        "reward_amount": 122.49424498,
        "start": 1724029200
      }
    ],
    "0000DC7461F3C3EEDB63A9FEA48F458107A31866B401AF7B4BDDB8F1613CC7127F94": [
      {
        "amount": 25.32639252,
        "end": 1816704000,
        "id": "1722096427",
        "level": "7",
        "reward_amount": 5291.70942846,
        "start": 1722096000
      },
      {
        "amount": 20.0,
        "end": 1729868400,
        "id": "1722095578",
        "level": "3",
        "reward_amount": 396.7078413,
        "start": 1722092400
      },
      {
        "amount": 174.29235148,
        "end": 1816538400,
        "id": "1721932760",
        "level": "7",
        "reward_amount": 36416.80137817,
        "start": 1721930400
      },
      {
        "amount": 75.55517261,
        "end": 1816700400,
        "id": "1722095617",
        "level": "7",
        "reward_amount": 15786.55858452,
        "start": 1722092400
      }
    ],
    "0000671A0C8F7435F2CCFD6CAD5483AB34B2C51E4F78DCF5F82788A8B9259C2484D2": [
      {
        "amount": 212.99553293,
        "end": 1737554400,
        "id": "1722003953",
        "level": "4",
        "reward_amount": 7565.43284246,
        "start": 1722002400
      },
      {
        "amount": 212.99553293,
        "end": 1726819200,
        "id": "1722004019",
        "level": "2",
        "reward_amount": 220.51795784,
        "start": 1724227200
      }
    ],
    "000064A6D0868320FE9AB0F1D3E9AE2BF405E3F71B1F7DE7D89C74CDC70824F3265A": [
      {
        "amount": 124.06037092,
        "end": 1817143200,
        "id": "1722538565",
        "level": "7",
        "reward_amount": 25542.37114548,
        "start": 1722535200
      }
    ],
    "0000BC394288E559805ED17E843BAFA2925403613EADC6E00B095EE438D380F421F6": [
      {
        "amount": 10.47721692,
        "end": 1738260000,
        "id": "1722708675",
        "level": "4",
        "reward_amount": 325.32694509,
        "start": 1722708000
      },
      {
        "amount": 24.53124237,
        "end": 1817053200,
        "id": "1722447790",
        "level": "7",
        "reward_amount": 5125.57116698,
        "start": 1722445200
      }
    ],
    "000055919C53436351B1C3C38D274410A325C9105E0CA01B3CC9BA1DBC27FDD0C0C3": [
      {
        "amount": 5.97382296,
        "end": 1818255600,
        "id": "1723647670",
        "level": "7",
        "reward_amount": 420.01546445,
        "start": 1723647600
      }
    ],
    "0000ED23150531DF35F3E3B0554C22C8D4F3987A40CD32FEA8B55AB23A7EED1C682E": [
      {
        "amount": 25.78673523,
        "end": 1817488800,
        "id": "1722880963",
        "level": "7",
        "reward_amount": 4152.16305651,
        "start": 1722880800
      }
    ],
    "00002DB9771992B93696556A34A3BFD4170C1059ED3753643F7A1FE1EAD1FCE9BF68": [
      {
        "amount": 308.36502922,
        "end": 1817056800,
        "id": "1722450977",
        "level": "7",
        "reward_amount": 64430.07633416,
        "start": 1722448800
      },
      {
        "amount": 308.36502922,
        "end": 1785520800,
        "id": "1722450936",
        "level": "6",
        "reward_amount": 35700.04866178,
        "start": 1722448800
      },
      {
        "amount": 120.276501,
        "end": 1817110800,
        "id": "1722464339",
        "level": "7",
        "reward_amount": 25130.67669552,
        "start": 1722502800
      }
    ],
    "0000F6A8A7CC3DD8711A003DC58BE1F7FC905C4A2E6980682CA24329A02C534AF3F7": [
      {
        "amount": 44.18479913,
        "end": 1818691200,
        "id": "1723888698",
        "level": "7",
        "reward_amount": 1363.84913136,
        "start": 1724083200
      },
      {
        "amount": 242.67902498,
        "end": 1818108000,
        "id": "1723503400",
        "level": "7",
        "reward_amount": 21023.65268149,
        "start": 1723500000
      }
    ],
    "0000FF3CF6D72B285283A3934D2E36A62AAB56E1BCC27082919B29E6A2831F799812": [
      {
        "amount": 71.9275237,
        "end": 1816848000,
        "id": "1722242554",
        "level": "7",
        "reward_amount": 15028.59409511,
        "start": 1722240000
      }
    ],
    "0000DCB5B70BD165848F9FB8AB83894A02F674496ABF2995DE18466402D8EBFF7D15": [
      {
        "amount": 49.87971046,
        "end": 1738015200,
        "id": "1722464705",
        "level": "4",
        "reward_amount": 1771.68728008,
        "start": 1722463200
      }
    ],
    "0000FB28E1A3B78D078B674B4E3A4DBEB4C4543FF2B54B6D1841A6FCAB2DE1C0936D": [
      {
        "amount": 59.82154437,
        "end": 1737576000,
        "id": "1722024930",
        "level": "4",
        "reward_amount": 2124.81369184,
        "start": 1722024000
      }
    ],
    "0000A6C97BFB871BF34606CE6A8E7230BF5703EA9DF1945B293B3F6A082EF2EDC56D": [
      {
        "amount": 0.45519111,
        "end": 1739206800,
        "id": "1723657354",
        "level": "4",
        "reward_amount": 5.38542051,
        "start": 1723654800
      }
    ],
    "0000734ED585CD05560B237E31C1CB53ED174E5B6EB330094B5C08282D4A556A0DA6": [
      {
        "amount": 6.13298006,
        "end": 1787173200,
        "id": "1724104402",
        "level": "6",
        "reward_amount": 99.98528294,
        "start": 1724101200
      }
    ],
    "00000DE4DFF7652D9F02A67BD1218F18311A52AADE2C85AB78AF12A0E5EC7CAAA891": [
      {
        "amount": 55.59720608,
        "end": 1738335600,
        "id": "1722784126",
        "level": "4",
        "reward_amount": 1636.01626985,
        "start": 1722783600
      },
      {
        "amount": 55.59720608,
        "end": 1730559600,
        "id": "1722784184",
        "level": "3",
        "reward_amount": 913.61934891,
        "start": 1722783600
      }
    ],
    "000044EFDE184CFC2A84F5D341A39F371A9523814B3945AE8280C249728D6144B67F": [
      {
        "amount": 27.63318712,
        "end": 1817330400,
        "id": "1722552026",
        "level": "7",
        "reward_amount": 4997.35666432,
        "start": 1722722400
      }
    ],
    "0000BB806DC0F952A529897ADD7504A4EF6F3DF0ADD721448CCFC44177759AD4607E": [
      {
        "amount": 300.31032189,
        "end": 1816686000,
        "id": "1722080419",
        "level": "7",
        "reward_amount": 62747.11705485,
        "start": 1722078000
      },
      {
        "amount": 372.0,
        "end": 1753614000,
        "id": "1722080230",
        "level": "5",
        "reward_amount": 23850.19039976,
        "start": 1722078000
      },
      {
        "amount": 300.0,
        "end": 1785150000,
        "id": "1722080321",
        "level": "6",
        "reward_amount": 34731.61256676,
        "start": 1722078000
      },
      {
        "amount": 62.02815161,
        "end": 1737630000,
        "id": "1722080782",
        "level": "4",
        "reward_amount": 2203.19035162,
        "start": 1722078000
      }
    ],
    "0000464CD8E96E1E15C3EA0FE9D5D5C5210AEAA912FB65046FD8480F772D85DBB598": [
      {
        "amount": 62.47482098,
        "end": 1731477600,
        "id": "1723705188",
        "level": "3",
        "reward_amount": 386.15947978,
        "start": 1723701600
      }
    ],
    "00009E5EE80B7C5103AA4DB54611751B3E86D29BCC69561F86B44337FC92078B85B2": [
      {
        "amount": 6.66048935,
        "end": 1816678800,
        "id": "1722071160",
        "level": "7",
        "reward_amount": 1391.63767046,
        "start": 1722070800
      },
      {
        "amount": 7.3489425,
        "end": 1817802000,
        "id": "1723194465",
        "level": "7",
        "reward_amount": 898.56025702,
        "start": 1723194000
      }
    ],
    "000072CD1D5DF1A97F6992C57209B4CAC143E0F1AFD8DC2B06714FB289408ADB65B5": [
      {
        "amount": 1.42406112,
        "end": 1738148400,
        "id": "1722596701",
        "level": "4",
        "reward_amount": 47.80773392,
        "start": 1722596400
      }
    ],
    "0000E70A43E0EB702B53D4879273C38A7C3CE5FCA753B21F59194BC5A32A81619FFC": [
      {
        "amount": 3.43620376,
        "end": 1753560000,
        "id": "1722026455",
        "level": "5",
        "reward_amount": 220.30609706,
        "start": 1722024000
      }
    ],
    "0000E8CC3360749967B5E155FCC354D4196DF18BA66673CF3806CDCEEB5B0CDA130C": [
      {
        "amount": 0.19591836,
        "end": 1816581600,
        "id": "1721977192",
        "level": "7",
        "reward_amount": 40.92428056,
        "start": 1721973600
      }
    ],
    "0000BD87C2E369137110E76B3610835EE04C4B2FF17B90F8B9C5662EBD6872B9CD85": [
      {
        "amount": 32.57882219,
        "end": 1817024400,
        "id": "1722416767",
        "level": "7",
        "reward_amount": 6807.03851767,
        "start": 1722416400
      },
      {
        "amount": 32.57882219,
        "end": 1753952400,
        "id": "1722416677",
        "level": "5",
        "reward_amount": 2088.73918718,
        "start": 1722416400
      }
    ],
    "00007F8DEF6ECCA96503E21C8F5B90A13CC5EF1BEB236952C55F4727B3E93E41CCF8": [
      {
        "amount": 12.5209424,
        "end": 1737493200,
        "id": "1721942574",
        "level": "4",
        "reward_amount": 444.73337951,
        "start": 1721941200
      },
      {
        "amount": 25.0,
        "end": 1724533200,
        "id": "1721942502",
        "level": "1",
        "reward_amount": 250.06144512,
        "start": 1721941200
      },
      {
        "amount": 150.04188478,
        "end": 1729710000,
        "id": "1721934998",
        "level": "3",
        "reward_amount": 2976.14064982,
        "start": 1721934000
      },
      {
        "amount": 185.0,
        "end": 1816542000,
        "id": "1721934872",
        "level": "7",
        "reward_amount": 38654.06782843,
        "start": 1721934000
      },
      {
        "amount": 50.0,
        "end": 1785013200,
        "id": "1721942343",
        "level": "6",
        "reward_amount": 5788.60160597,
        "start": 1721941200
      },
      {
        "amount": 50.0,
        "end": 0,
        "id": "1721942427",
        "level": "0",
        "reward_amount": 73.48351161,
        "start": null
      },
      {
        "amount": 12.52094239,
        "end": 1729717200,
        "id": "1721942544",
        "level": "3",
        "reward_amount": 248.35775155,
        "start": 1721941200
      }
    ],
    "00000A089C97040872F00A5AC91D247264EE1C189D89511189264166BB873550A46F": [
      {
        "amount": 3.15641778,
        "end": 1817139600,
        "id": "1722531719",
        "level": "7",
        "reward_amount": 651.43485602,
        "start": 1722531600
      }
    ],
    "0000FAE37FC2D817C6865945AEE9A41AF95E058C1C8C64C58D15F038372961E7ADF1": [
      {
        "amount": 33.87956458,
        "end": 1817956800,
        "id": "1722674870",
        "level": "7",
        "reward_amount": 3519.48441396,
        "start": 1723348800
      },
      {
        "amount": 125.6663019,
        "end": 1730037600,
        "id": "1722262624",
        "level": "3",
        "reward_amount": 2492.64119517,
        "start": 1722261600
      },
      {
        "amount": 60.15832309,
        "end": 1754118000,
        "id": "1722583399",
        "level": "5",
        "reward_amount": 3681.76932067,
        "start": 1722582000
      },
      {
        "amount": 25.0,
        "end": 1817967600,
        "id": "1722674826",
        "level": "7",
        "reward_amount": 2566.11897058,
        "start": 1723359600
      }
    ],
    "00008EB87E1B3060B0A7E45E44DFE9DA23596A08779B278F30C54036F956D5A02406": [
      {
        "amount": 0.16243241,
        "end": 1817812800,
        "id": "1723205806",
        "level": "7",
        "reward_amount": 19.63623791,
        "start": 1723204800
      }
    ],
    "00009B8A94A9423E5308DFDA578E4DC4B79315A4E70A3030BD7D053AF40CAA124714": [
      {
        "amount": 479.34637575,
        "end": 1738314000,
        "id": "1722763348",
        "level": "4",
        "reward_amount": 14326.34892931,
        "start": 1722762000
      }
    ],
    "0000B970E7B817E83B6F85BD678B0ABC69459A9FD3E78AFADCF99A6ABA06A2CA7FDE": [
      {
        "amount": 0.42556994,
        "end": 1738051200,
        "id": "1722501635",
        "level": "4",
        "reward_amount": 15.11527562,
        "start": 1722499200
      }
    ],
    "0000FF978269EAB73B174410CF09E346A5947B1DFFEE59CF3074040913C14056D9F6": [
      {
        "amount": 1.97280053,
        "end": 1738072800,
        "id": "1721929526",
        "level": "4",
        "reward_amount": 69.72594653,
        "start": 1722520800
      }
    ],
    "00008330CD9373E57D9E870E2C967704CF3E79E7377E8466FAA85FE9A3461519DDE9": [
      {
        "amount": 60.0,
        "end": 1737752400,
        "id": "1722202561",
        "level": "4",
        "reward_amount": 2131.15210361,
        "start": 1722200400
      },
      {
        "amount": 20.0,
        "end": 1787104800,
        "id": "1722171304",
        "level": "6",
        "reward_amount": 388.56602145,
        "start": 1724032800
      },
      {
        "amount": 40.81427052,
        "end": 1753736400,
        "id": "1722202601",
        "level": "5",
        "reward_amount": 2616.7414882,
        "start": 1722200400
      }
    ],
    "0000E852F2C7991670CD5E54275FB3DFA30D1304370421A0E7956E7B91320957596A": [
      {
        "amount": 14.87378641,
        "end": 1726416000,
        "id": "1723825591",
        "level": "2",
        "reward_amount": 42.15883444,
        "start": 1723824000
      },
      {
        "amount": 24.96985465,
        "end": 1726340400,
        "id": "1723750688",
        "level": "2",
        "reward_amount": 80.23248086,
        "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.03871524,
        "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": 685.39505736,
        "start": 1722960000
      },
      {
        "amount": 8.86339504,
        "end": 1817197200,
        "id": "1721933039",
        "level": "7",
        "reward_amount": 1759.18994968,
        "start": 1722589200
      }
    ],
    "000004ABDBE9D35795ED9A78D0849805B885E116F6F40FF90D35DB568F15F6D1C652": [
      {
        "amount": 260.33469399,
        "end": 1817899200,
        "id": "1723293493",
        "level": "7",
        "reward_amount": 28766.99033182,
        "start": 1723291200
      }
    ],
    "00007FA07F4C3672640E3FD681E0FAE3C80863DD7908C1F81922E5AFD0587933703A": [
      {
        "amount": 3.26021228,
        "end": 1753509600,
        "id": "1721976509",
        "level": "5",
        "reward_amount": 209.02209694,
        "start": 1721973600
      },
      {
        "amount": 0.44083593,
        "end": 1724565600,
        "id": "1721976734",
        "level": "1",
        "reward_amount": 4.43929819,
        "start": 1721973600
      }
    ],
    "000078419299567E0F2FCD8C9D27EE704D1E67AA3F16D60676E4E59B6B553A408A7E": [
      {
        "amount": 439.71716668,
        "end": 1738339200,
        "id": "1722787622",
        "level": "4",
        "reward_amount": 12905.51889899,
        "start": 1722787200
      }
    ],
    "000032DC502B02DEC57A8E5C2246255DA7C246BA71AB9E0D360FCBC9B4DF6D00B96C": [
      {
        "amount": 8.90820647,
        "end": 1818856800,
        "id": "1724249800",
        "level": "7",
        "reward_amount": 159.01081971,
        "start": 1724248800
      },
      {
        "amount": 75.78370887,
        "end": 1816542000,
        "id": "1721935026",
        "level": "7",
        "reward_amount": 15834.31093581,
        "start": 1721934000
      }
    ],
    "0000F1FA618295609C88112355B27B6408B4516FADBE52F1F5055773EF0D21481709": [
      {
        "amount": 250.0,
        "end": 1730365200,
        "id": "1722548174",
        "level": "3",
        "reward_amount": 4710.04688124,
        "start": 1722589200
      },
      {
        "amount": 132.0,
        "end": 1785013200,
        "id": "1721941249",
        "level": "6",
        "reward_amount": 15281.90935401,
        "start": 1721941200
      },
      {
        "amount": 100.0,
        "end": 1816549200,
        "id": "1721941422",
        "level": "7",
        "reward_amount": 20894.08590148,
        "start": 1721941200
      }
    ],
    "0000FC1BE15494A76BFD2DFF8E20AD98BB1CD30F341144547F8F059C430D3387ED6D": [
      {
        "amount": 2.49600361,
        "end": 1817478000,
        "id": "1722872077",
        "level": "7",
        "reward_amount": 405.24975443,
        "start": 1722870000
      },
      {
        "amount": 1859.77238396,
        "end": 1738789200,
        "id": "1723240504",
        "level": "4",
        "reward_amount": 36968.86675708,
        "start": 1723237200
      }
    ],
    "00008A4CB8CEA0D05A77DC99A98378D4D5DB614ACF9D643102B2C9A7B25362E17BA7": [
      {
        "amount": 0.48461404,
        "end": 1818666000,
        "id": "1724060289",
        "level": "7",
        "reward_amount": 15.95112837,
        "start": 1724058000
      }
    ],
    "00003912E3ACB6D77934667E13274828D5AD9AC54A887B5D050C0935ACCCDA8D1E40": [
      {
        "amount": 17.67651906,
        "end": 1753977600,
        "id": "1722444706",
        "level": "5",
        "reward_amount": 1133.30086776,
        "start": 1722441600
      },
      {
        "amount": 17.67651906,
        "end": 1817049600,
        "id": "1722444656",
        "level": "7",
        "reward_amount": 3693.33892802,
        "start": 1722441600
      }
    ],
    "0000092A47748F78775B696FC9376E24AF2927B73E1E4B8D0A1ADFCEA1367B4CB509": [
      {
        "amount": 1.01595724,
        "end": 1816959600,
        "id": "1722354784",
        "level": "7",
        "reward_amount": 212.26448236,
        "start": 1722351600
      }
    ],
    "000073A7AC558F5016CB4892C7827C520A219196863D29C83BD6EF0A570BB2E4B592": [
      {
        "amount": 2.6120638,
        "end": 1817301600,
        "id": "1722696281",
        "level": "7",
        "reward_amount": 481.93285053,
        "start": 1722693600
      },
      {
        "amount": 10.43290415,
        "end": 1738245600,
        "id": "1722696182",
        "level": "4",
        "reward_amount": 327.19646964,
        "start": 1722693600
      }
    ],
    "00007A37924F7BD618236ACE864E9FA1FBAFAB393DD45ED65B3A5A7940BECB39FC04": [
      {
        "amount": 1.91991801,
        "end": 1818183600,
        "id": "1723577244",
        "level": "7",
        "reward_amount": 150.12287414,
        "start": 1723575600
      }
    ],
    "000032687AA8603CA859AEFB8E12CDFB6D28916B2C09E73DB3BA543F09B222A98403": [
      {
        "amount": 110.69792489,
        "end": 1816876800,
        "id": "1722269359",
        "level": "7",
        "reward_amount": 23129.3198317,
        "start": 1722268800
      }
    ],
    "0000FD163D0CAD7CF62A6239A037EDABC27AD8467AD2898F899A88C7200DE2FB657A": [
      {
        "amount": 74.16892683,
        "end": 1729735200,
        "id": "1721959925",
        "level": "3",
        "reward_amount": 1471.17016112,
        "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": 101334.46629262,
        "start": 1722682800
      }
    ],
    "00003933C19DE8F6195AD0F7103D928C52A0B831DCA872F32740F0400C6998CA9CCB": [
      {
        "amount": 49.68521042,
        "end": 1725364800,
        "id": "1722775181",
        "level": "2",
        "reward_amount": 459.27014599,
        "start": 1722772800
      }
    ],
    "000078568EA8D66A60EC971FF34A4A53487674EDBB88CF58ED2BB73AD05CE21A94E8": [
      {
        "amount": 2.82762956,
        "end": 1726599600,
        "id": "1722782115",
        "level": "2",
        "reward_amount": 5.57412631,
        "start": 1724007600
      }
    ],
    "0000801092626879C235480C13BFC18B9568CA51649E42C3BED6D8AC482D4B91F9C5": [
      {
        "amount": 23.00584072,
        "end": 1817532000,
        "id": "1722927504",
        "level": "7",
        "reward_amount": 3581.01240065,
        "start": 1722924000
      },
      {
        "amount": 3.70605259,
        "end": 1816812000,
        "id": "1722204811",
        "level": "7",
        "reward_amount": 774.33546518,
        "start": 1722204000
      },
      {
        "amount": 0.36723386,
        "end": 1816779600,
        "id": "1722174812",
        "level": "7",
        "reward_amount": 76.71852437,
        "start": 1722171600
      },
      {
        "amount": 2.0,
        "end": 1738476000,
        "id": "1722927446",
        "level": "4",
        "reward_amount": 52.91605063,
        "start": 1722924000
      }
    ],
    "00007F1492C7E870854B53AD203A499739CCB6F89CD27815BBC4BDD3BE81222C9440": [
      {
        "amount": 1.4037579,
        "end": 1817204400,
        "id": "1722598748",
        "level": "7",
        "reward_amount": 277.2393863,
        "start": 1722596400
      }
    ],
    "0000BBC821314DDC42500CE5323C1FEBF4FAD1DD23B66D2A6E26056B7DE4BAC368BE": [
      {
        "amount": 50.47108125,
        "end": 1818446400,
        "id": "1723839883",
        "level": "7",
        "reward_amount": 2632.25953758,
        "start": 1723838400
      }
    ],
    "0000658314D9BA0FEFFE2F5DE0813BC53B25D3CDD49A54D59C991E8790A7F5375D5B": [
      {
        "amount": 174.28968373,
        "end": 1754226000,
        "id": "1722690048",
        "level": "5",
        "reward_amount": 9891.81662197,
        "start": 1722690000
      }
    ],
    "0000B0545556A79213679C1CF272B02D979C4E19400B44129989F81627A61C521716": [
      {
        "amount": 89.19491166,
        "end": 1817024400,
        "id": "1722418516",
        "level": "7",
        "reward_amount": 18636.45848801,
        "start": 1722416400
      }
    ],
    "00005B4473C5D282EBC71AF34C1E78870510C81BE8384493468500047E2B4FF9A000": [
      {
        "amount": 19.05256979,
        "end": 1729940400,
        "id": "1722165282",
        "level": "3",
        "reward_amount": 377.91515757,
        "start": 1722164400
      }
    ],
    "0000D098F675C8F040C1E25B25891F317E4857B9550A8FED31A2C3C3B759A39FA75B": [
      {
        "amount": 40.03242048,
        "end": 1787490000,
        "id": "1724418662",
        "level": "6",
        "reward_amount": 103.73428825,
        "start": 1724418000
      },
      {
        "amount": 184.24142176,
        "end": 1787490000,
        "id": "1723393405",
        "level": "6",
        "reward_amount": 477.41690696,
        "start": 1724418000
      }
    ],
    "00004C0F3FFD1B78130730BF1F0C122ADDFC0CE82C37C28F1B9C605895A743ECCA23": [
      {
        "amount": 4.25171936,
        "end": 1817931600,
        "id": "1723324837",
        "level": "7",
        "reward_amount": 453.98043593,
        "start": 1723323600
      },
      {
        "amount": 6.6505941,
        "end": 1731135600,
        "id": "1723362226",
        "level": "3",
        "reward_amount": 64.79888874,
        "start": 1723359600
      }
    ],
    "0000D80508879A4DA21AC5FEA1F984C8E260BFE13F088C1C9041417B71366E605669": [
      {
        "amount": 40.0,
        "end": 1816552800,
        "id": "1721946923",
        "level": "7",
        "reward_amount": 8357.62684613,
        "start": 1721944800
      },
      {
        "amount": 8.22453894,
        "end": 1753480800,
        "id": "1721946823",
        "level": "5",
        "reward_amount": 527.30243511,
        "start": 1721944800
      },
      {
        "amount": 10.0,
        "end": 1785016800,
        "id": "1721946894",
        "level": "6",
        "reward_amount": 1157.71948805,
        "start": 1721944800
      }
    ],
    "0000B80188376223239FDD24F1A3CFC6528B6FCF41DCF14D256C51D0E3BF27BF8252": [
      {
        "amount": 7.92679203,
        "end": 1817899200,
        "id": "1723291831",
        "level": "7",
        "reward_amount": 875.90248164,
        "start": 1723291200
      }
    ],
    "000028DFBAC45E559E66DB44A7A0B75C7F950D9A0C516E1DC615DEDB8D29FD84680A": [
      {
        "amount": 99.99706986,
        "end": 1786950000,
        "id": "1723666027",
        "level": "6",
        "reward_amount": 2684.71153095,
        "start": 1723878000
      },
      {
        "amount": 300.0,
        "end": 1818403200,
        "id": "1723665928",
        "level": "7",
        "reward_amount": 16858.03248306,
        "start": 1723795200
      },
      {
        "amount": 300.0,
        "end": 1786719600,
        "id": "1723650718",
        "level": "6",
        "reward_amount": 11687.29714216,
        "start": 1723647600
      },
      {
        "amount": 200.0,
        "end": 1818255600,
        "id": "1723650497",
        "level": "7",
        "reward_amount": 14062.00298477,
        "start": 1723647600
      },
      {
        "amount": 600.0,
        "end": 1818252000,
        "id": "1723644028",
        "level": "7",
        "reward_amount": 42404.84940872,
        "start": 1723644000
      },
      {
        "amount": 600.0,
        "end": 1755180000,
        "id": "1723644127",
        "level": "5",
        "reward_amount": 13011.6433168,
        "start": 1723644000
      },
      {
        "amount": 300.0,
        "end": 1818230400,
        "id": "1723622574",
        "level": "7",
        "reward_amount": 21901.85365118,
        "start": 1723622400
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538611",
        "level": "7",
        "reward_amount": 1499.46643813,
        "start": 1724094000
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538505",
        "level": "7",
        "reward_amount": 1499.46643813,
        "start": 1724094000
      },
      {
        "amount": 108.06605186,
        "end": 1739725200,
        "id": "1723538332",
        "level": "4",
        "reward_amount": 436.66765941,
        "start": 1724173200
      },
      {
        "amount": 100.0,
        "end": 1739127600,
        "id": "1723579119",
        "level": "4",
        "reward_amount": 1329.14553322,
        "start": 1723575600
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723579371",
        "level": "7",
        "reward_amount": 4498.40639551,
        "start": 1724094000
      },
      {
        "amount": 145.48629854,
        "end": 1818486000,
        "id": "1723579626",
        "level": "7",
        "reward_amount": 7049.47627377,
        "start": 1723878000
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723622714",
        "level": "7",
        "reward_amount": 4498.40639551,
        "start": 1724094000
      },
      {
        "amount": 300.0,
        "end": 1739196000,
        "id": "1723644222",
        "level": "4",
        "reward_amount": 3603.94395556,
        "start": 1723644000
      },
      {
        "amount": 300.0,
        "end": 1818486000,
        "id": "1723644433",
        "level": "7",
        "reward_amount": 14536.37264113,
        "start": 1723878000
      },
      {
        "amount": 300.0,
        "end": 1755183600,
        "id": "1723650558",
        "level": "5",
        "reward_amount": 6472.24821441,
        "start": 1723647600
      },
      {
        "amount": 369.17389677,
        "end": 1818702000,
        "id": "1723650878",
        "level": "7",
        "reward_amount": 11071.29749128,
        "start": 1724094000
      },
      {
        "amount": 900.0,
        "end": 1818666000,
        "id": "1723665834",
        "level": "7",
        "reward_amount": 29627.72393804,
        "start": 1724058000
      },
      {
        "amount": 46.3,
        "end": 1818349200,
        "id": "1723665986",
        "level": "7",
        "reward_amount": 2839.7827914,
        "start": 1723741200
      }
    ],
    "0000EFDED9E6F9CA05F381554221EEEA88CC5AC1678AC35D340C56769E2A9EACDBF2": [
      {
        "amount": 1.30611653,
        "end": 1739613600,
        "id": "1724063344",
        "level": "4",
        "reward_amount": 7.24332209,
        "start": 1724061600
      }
    ],
    "0000DE32ED0EAECB98CE5DF85320A2710884A2E8AF27B8281C3C43D662182CF8B34E": [
      {
        "amount": 148.71227324,
        "end": 1726884000,
        "id": "1724293855",
        "level": "2",
        "reward_amount": 113.99269827,
        "start": 1724292000
      },
      {
        "amount": 148.71227323,
        "end": 1732068000,
        "id": "1724293798",
        "level": "3",
        "reward_amount": 204.2374852,
        "start": 1724292000
      }
    ],
    "00000F3CF7C963A098F6215C07466411CD95E07F93D7117EF8FE16DA3BE691760DC8": [
      {
        "amount": 47.8635734,
        "end": 1738065600,
        "id": "1722516149",
        "level": "4",
        "reward_amount": 1700.07584131,
        "start": 1722513600
      }
    ],
    "00004D2EF8BD21C17E05EF99F64446E28D8C70B5B3B3BBDB0B92A728CDA363AD1805": [
      {
        "amount": 2.0,
        "end": 1816538400,
        "id": "1721933667",
        "level": "7",
        "reward_amount": 417.87094145,
        "start": 1721930400
      },
      {
        "amount": 0.67011237,
        "end": 1818950400,
        "id": "1721933831",
        "level": "7",
        "reward_amount": 7.05438118,
        "start": 1724342400
      }
    ],
    "00009B697D797598F4ED3FDE3FF5EC00D10AC723A784DFB6EC9A6F8819D4A6EECC8D": [
      {
        "amount": 225.51623442,
        "end": 1817892000,
        "id": "1723287006",
        "level": "7",
        "reward_amount": 25110.23361235,
        "start": 1723284000
      }
    ],
    "000059A6082E05094B0AE076618B015A062172EEE73FA24D7D61994E796309C8DD42": [
      {
        "amount": 166.26275985,
        "end": 1818586800,
        "id": "1723978992",
        "level": "7",
        "reward_amount": 6594.06993536,
        "start": 1723978800
      }
    ],
    "0000F9EB9BE130704D0955D4AA1646357D22F0ADE0CCBEA3443F4A3A632729BAA588": [
      {
        "amount": 51.85740662,
        "end": 1754222400,
        "id": "1722688751",
        "level": "5",
        "reward_amount": 2950.48660885,
        "start": 1722686400
      },
      {
        "amount": 620.65359476,
        "end": 1729706400,
        "id": "1721932806",
        "level": "3",
        "reward_amount": 12310.91221294,
        "start": 1721930400
      }
    ],
    "0000BCED16C487F268B038B6660746D265E586A959EE526942DA3A87CD1FFB720302": [
      {
        "amount": 3.75132465,
        "end": 1724738400,
        "id": "1724133674",
        "level": "1",
        "reward_amount": 2.89342621,
        "start": 1724133600
      }
    ],
    "0000FB9C2BC25B3A67E1CE324F6E3CE81F6FFD596F31358E85BB31BECCAC61F08FF7": [
      {
        "amount": 50.12595538,
        "end": 1724522400,
        "id": "1721930366",
        "level": "1",
        "reward_amount": 500.24996278,
        "start": 1721930400
      }
    ]
  },
  "last_calculation_timestamp": 1724479200,
  "lp_tokens_deposited": 29164.27483212,
  "lp_tokens_deposited_by_level": {
    "0": 51.24362126,
    "1": 1765.72890409,
    "2": 481.39941973,
    "3": 1850.41200675,
    "4": 4099.72941644,
    "5": 3249.68567018,
    "6": 1960.80551934,
    "7": 15705.27027433
  },
  "rewards_distributed": 37570.35016818,
  "rewards_reserved": 2767112.95147511
}
                  
Movements (0)

Ownerships (1)

  • Secret shared with 1 key

    Encoded secret

    F9DF052B028B597B38C5C730E2905EA9BA05A9895FDB9195A13CD4C806C0E6BBBD85E48031BA87FBC8C6ACF2636ABDEA36D325EA0564A225498E7559

    Authorized keys

    • 000122A6CD9ED07E46835D6E88E5BD0BEE84C3F5E5DBF8E916AD9B2EC912C44AFEC2

Contract recipients (0)

Inputs (0)

Contract inputs (0)

Unspent outputs (0)

Proofs and signatures

Previous public key

000156D22121B8C6940C00C1AB7D5E1AED2EE9E0661A14C6B97059947E484359C71E

Previous signature

6A4CA4ADAF110E5B8194292065ABA06009F991C887FD047356E1181C1E1D193D1A1FE03D3295AFA1283C6EE2ADC2484821FC727D4045D52FC1BE565D837BC60F

Origin signature

3046022100C26781A16FEA392365386C1A78F480541E593A7FD7DD9058AF4CE1D8E599B714022100A50E25B77C517702A45B97D837F34871BF3B2641E6F4086507304E5E8340A91A

Proof of work

010204E9BB401A767B0C92D5DB139379AAB18E1B449B455F49E3A44F3466B2D38E59F0516B79493A528A95E5A74CF46F79CF12DEB73293458F6A4403D2B3E57D697347

Proof of integrity

003D0F5666972D68C97DE5DA65995ACADAAFDA1AB21A941A10B82AD86DC911C675

Coordinator signature

FCDB021AE6B98672CDF6C0C15D087CF757D6309F80216569721FFC1C2A8D96820466C00E6630F487D228F22656A61ED26C6AE4ACFBC534533B6E0421F9C32906

Validator #1 public key

0001AD128AAE351A4BBC1153FDF8E5BBC27A9B30C336BC60004465963E1964A6145B

Validator #1 signature

1465A5D7CCA1F42DAE32688F8E7A3C78449714250DB4E88019EF773F01520F834346039742B8F9D61F07C29B7AA420DFA42B542C679E624ED220B94164ADF10A

Validator #2 public key

00016BD1443F1CD524796698001AE001C31DBC438FEE3DEC41D74C61D37A1271DB39

Validator #2 signature

2E04B95504D94C22E69930AAAB8D92578FEA0427326090BDFDC938F81AA5C8497107A51B472BA3916E0B0B3DBBD7D8E4353EDEFF4A53104D9E1A070DAD75500F