Type
CONTRACT
Validation date
2024-08-20 16:05:05 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.49 KB)

 
{
  "deposits": {
    "000065ED9197B2A42733A3B013918A99978FC7B0B1D122C7CFD4C2771ACA32A9A498": [
      {
        "amount": 1012.34031492,
        "end": 1753675200,
        "id": "1722142705",
        "level": "5",
        "reward_amount": 57432.54568232,
        "start": 1722139200
      }
    ],
    "00005A8AD2778CF4E75EF89CCAC998933DF85BC77554CA613AD9C57614F96C84BC7D": [
      {
        "amount": 0.87519426,
        "end": 1726743600,
        "id": "1724154892",
        "level": "2",
        "reward_amount": 0.06544346,
        "start": 1724151600
      }
    ],
    "0000252072D93B1C449ACC6CF87E775CF3A2B3DA2C12EF46383727AE0506BE523710": [
      {
        "amount": 171.49774951,
        "end": 1817028000,
        "id": "1722420833",
        "level": "7",
        "reward_amount": 31707.59860883,
        "start": 1722420000
      }
    ],
    "000046EDE1CCA30F2CF949644A1E96B7C9B068DB9B19B62A36DF01141A4F6E9100C8": [
      {
        "amount": 64.51723278,
        "end": 1739552400,
        "id": "1724002504",
        "level": "4",
        "reward_amount": 150.97520601,
        "start": 1724000400
      }
    ],
    "0000826DEC97863D0818C0640973AADE01E0C777305109A83C5FB4EA225464E4790B": [
      {
        "amount": 4.7798319,
        "end": 1730296800,
        "id": "1722524308",
        "level": "3",
        "reward_amount": 83.42795007,
        "start": 1722520800
      },
      {
        "amount": 13.89066514,
        "end": 1817103600,
        "id": "1722497039",
        "level": "7",
        "reward_amount": 2568.18468385,
        "start": 1722495600
      }
    ],
    "0000BCD3704EE34991D1089D301EB3909BBC9BA3CDDFA8EA813DBA8672AF9F633CA8": [
      {
        "amount": 5.40278223,
        "end": 1738004400,
        "id": "1722453909",
        "level": "4",
        "reward_amount": 169.8115367,
        "start": 1722452400
      }
    ],
    "00005EC81836452C89EEBDC720E3E39915E86043088DF9F6FA064EACF3370CE2C028": [
      {
        "amount": 27.26909363,
        "end": 1817755200,
        "id": "1723150189",
        "level": "7",
        "reward_amount": 2835.83242396,
        "start": 1723147200
      }
    ],
    "0000E8078E064F1726753697FEE0290FA9BFE7B03608517F29632029E74AC7904819": [
      {
        "amount": 423.85680263,
        "end": 1817107200,
        "id": "1722499858",
        "level": "7",
        "reward_amount": 78365.36908736,
        "start": 1722499200
      },
      {
        "amount": 423.85680262,
        "end": 1754035200,
        "id": "1722499733",
        "level": "5",
        "reward_amount": 24046.43412425,
        "start": 1722499200
      }
    ],
    "000009FF674C87EAE7F4C98977E366BFBEA91CB2A017C9097A17058EE15A7C09B87F": [
      {
        "amount": 47.37426984,
        "end": 1729962000,
        "id": "1722189537",
        "level": "3",
        "reward_amount": 831.51684162,
        "start": 1722186000
      },
      {
        "amount": 47.37426983,
        "end": 1816794000,
        "id": "1722189498",
        "level": "7",
        "reward_amount": 8758.8507748,
        "start": 1722186000
      }
    ],
    "000092174345CF579DCA98B190387763669BC5D1A45A737F5AF17ABAF5E2B27C8DF7": [
      {
        "amount": 39.53442209,
        "end": 1816542000,
        "id": "1721934957",
        "level": "7",
        "reward_amount": 7309.3690369,
        "start": 1721934000
      }
    ],
    "0000D6E65A30304EE9909CA661F2229408048CE7DB515CD2A9D38E63A0CBA44076AE": [
      {
        "amount": 24.53218931,
        "end": 1817060400,
        "id": "1722453904",
        "level": "7",
        "reward_amount": 4535.65947825,
        "start": 1722452400
      },
      {
        "amount": 49.06437862,
        "end": 1753988400,
        "id": "1722453803",
        "level": "5",
        "reward_amount": 2783.54183619,
        "start": 1722452400
      },
      {
        "amount": 0.24513861,
        "end": 1816610400,
        "id": "1722003018",
        "level": "7",
        "reward_amount": 45.31299982,
        "start": 1722002400
      },
      {
        "amount": 98.12875723,
        "end": 1738004400,
        "id": "1722453752",
        "level": "4",
        "reward_amount": 3084.23285913,
        "start": 1722452400
      },
      {
        "amount": 24.53218931,
        "end": 1785524400,
        "id": "1722453868",
        "level": "6",
        "reward_amount": 2513.17031327,
        "start": 1722452400
      }
    ],
    "0000D620FC554D881E327CC59321CD09CDF3B1C3FBA201A2A58FE9B9B0F3B696FBCE": [
      {
        "amount": 4.52073371,
        "end": 1817575200,
        "id": "1722967412",
        "level": "7",
        "reward_amount": 570.73930939,
        "start": 1722967200
      },
      {
        "amount": 27.03971832,
        "end": 1817629200,
        "id": "1723022105",
        "level": "7",
        "reward_amount": 3233.04640012,
        "start": 1723021200
      }
    ],
    "0000FB9D022F9A2BABE63AD726FC8038958A73F8999170CD0DE666716911B37D57CD": [
      {
        "amount": 51.03800725,
        "end": 1816887600,
        "id": "1722279880",
        "level": "7",
        "reward_amount": 9436.2274256,
        "start": 1722279600
      }
    ],
    "00003BC98F60FA93EE3CF4460CAB7CE7206745F04722B7521480695429EDF731FDE2": [
      {
        "amount": 342.70907838,
        "end": 1785740400,
        "id": "1722669540",
        "level": "6",
        "reward_amount": 31092.02491575,
        "start": 1722668400
      },
      {
        "amount": 2988.25934822,
        "end": 1816617600,
        "id": "1722011226",
        "level": "7",
        "reward_amount": 552488.64252324,
        "start": 1722009600
      }
    ],
    "0000B10AC91AC815D0914645315546479564BC330FC92868B56FC7B505708278B776": [
      {
        "amount": 35.20322403,
        "end": 1817121600,
        "id": "1722516784",
        "level": "7",
        "reward_amount": 6508.59242882,
        "start": 1722513600
      }
    ],
    "000044305A6A17545FCF99E6DC1D6AAD4A53519877FD44E9BD26DB054B511CAE338F": [
      {
        "amount": 122.34781822,
        "end": 1730556000,
        "id": "1722783119",
        "level": "3",
        "reward_amount": 1736.40517072,
        "start": 1722780000
      },
      {
        "amount": 68.88470637,
        "end": 1816977600,
        "id": "1721973718",
        "level": "7",
        "reward_amount": 12735.84023575,
        "start": 1722369600
      }
    ],
    "00002F6D49B04D55B9B553068CFFBCF4E8D410F4E270748FC5E8DD7BC1791BE13974": [
      {
        "amount": 15.69235238,
        "end": 1818151200,
        "id": "1723543970",
        "level": "7",
        "reward_amount": 906.26553921,
        "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.02360687,
        "start": 1721926800
      },
      {
        "amount": 0.01,
        "end": 1724518800,
        "id": "1721929367",
        "level": "1",
        "reward_amount": 0.09277903,
        "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.17532212,
        "start": 1721926800
      }
    ],
    "0000FDEBA3D305BED46E068C5333ED2D8FFFEEFA016B4E2AF505D98AED22079751CE": [
      {
        "amount": 29.39010433,
        "end": 1818018000,
        "id": "1723412600",
        "level": "7",
        "reward_amount": 2140.40773441,
        "start": 1723410000
      }
    ],
    "0000EBFE35D4B9964DC41D0AC22764B67407F20F9B309E26E1D1487AF35F6755A6AD": [
      {
        "amount": 67.67810588,
        "end": 1724612400,
        "id": "1722020752",
        "level": "1",
        "reward_amount": 641.39052215,
        "start": 1722020400
      },
      {
        "amount": 40.0,
        "end": 1816628400,
        "id": "1722020474",
        "level": "7",
        "reward_amount": 7395.44867222,
        "start": 1722020400
      },
      {
        "amount": 20.0,
        "end": 1816628400,
        "id": "1722020533",
        "level": "7",
        "reward_amount": 3697.71893095,
        "start": 1722020400
      },
      {
        "amount": 60.0,
        "end": 1729796400,
        "id": "1722020692",
        "level": "3",
        "reward_amount": 1053.12460641,
        "start": 1722020400
      }
    ],
    "00005C2BD26B5D2F4FF11FFD99819956951F4B693561537148234FFED99D20DB4F91": [
      {
        "amount": 7.76231264,
        "end": 1730296800,
        "id": "1722524267",
        "level": "3",
        "reward_amount": 135.48486595,
        "start": 1722520800
      },
      {
        "amount": 34.70006897,
        "end": 1817103600,
        "id": "1722496906",
        "level": "7",
        "reward_amount": 6415.56327953,
        "start": 1722495600
      }
    ],
    "0000F3C03F61A33CB9E95774AF19D956542D3284F90113A3E5837274CA9D258E4FA5": [
      {
        "amount": 41.75002557,
        "end": 1817125200,
        "id": "1721977125",
        "level": "7",
        "reward_amount": 7697.63822301,
        "start": 1722517200
      },
      {
        "amount": 30.0,
        "end": 1816581600,
        "id": "1721976242",
        "level": "7",
        "reward_amount": 5546.58320391,
        "start": 1721973600
      },
      {
        "amount": 45.0,
        "end": 1816844400,
        "id": "1721977068",
        "level": "7",
        "reward_amount": 8319.88072645,
        "start": 1722236400
      }
    ],
    "00007BFD0BCB91C1AB0D67F6D1954085441EC68908D5DDAAADC31D901D635EB56ADC": [
      {
        "amount": 5.31061115,
        "end": 1738011600,
        "id": "1722461473",
        "level": "4",
        "reward_amount": 166.91472342,
        "start": 1722459600
      },
      {
        "amount": 10.62122228,
        "end": 1785531600,
        "id": "1722461401",
        "level": "6",
        "reward_amount": 1088.07792499,
        "start": 1722459600
      },
      {
        "amount": 21.24244457,
        "end": 1817067600,
        "id": "1722461363",
        "level": "7",
        "reward_amount": 3927.42991898,
        "start": 1722459600
      },
      {
        "amount": 5.31061114,
        "end": 1753995600,
        "id": "1722461441",
        "level": "5",
        "reward_amount": 301.28319037,
        "start": 1722459600
      }
    ],
    "000099158E2C0FC1E717A1A8FCE1752EF366E20EAAA4CE9F38BAE864C13A32EAC9E6": [
      {
        "amount": 10.00551293,
        "end": 1816657200,
        "id": "1722050840",
        "level": "7",
        "reward_amount": 1849.87452398,
        "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": 441.63961594,
        "start": 1722063600
      }
    ],
    "0000D8C63858B8062159808FA02E80C64F2BB119E13F52B9C81F7B178A971402F691": [
      {
        "amount": 26.32529758,
        "end": 1817215200,
        "id": "1721934053",
        "level": "7",
        "reward_amount": 4527.72778875,
        "start": 1722607200
      },
      {
        "amount": 1.9771422,
        "end": 1816542000,
        "id": "1721934986",
        "level": "7",
        "reward_amount": 365.53815308,
        "start": 1721934000
      }
    ],
    "00009B6AD59D37AAAAD1747B0B9E54D43AB03A3E2B991BCF6EC876FF1A0D0E6AB14D": [
      {
        "amount": 42.51770246,
        "end": 1817064000,
        "id": "1722458621",
        "level": "7",
        "reward_amount": 7860.93664844,
        "start": 1722456000
      }
    ],
    "00002B4F50927C12B2D51BF740B8DF859F2D5A97B360DF36DA6316EED20AD3497F69": [
      {
        "amount": 758.78276272,
        "end": 1818511200,
        "id": "1723904155",
        "level": "7",
        "reward_amount": 16783.47092996,
        "start": 1723903200
      }
    ],
    "000001F572D6467EDC154E09FA0B58BF5D7DC9D41EA0315C43610EF1406320934401": [
      {
        "amount": 1329.13816876,
        "end": 1724565600,
        "id": "1721975702",
        "level": "1",
        "reward_amount": 654.29423958,
        "start": 1723960800
      }
    ],
    "00001E3A03626544B66D236F259AF26A6BDA73EBF6C3EFE84DB351A57BEEA776F338": [
      {
        "amount": 61.98573547,
        "end": 1816862400,
        "id": "1722256545",
        "level": "7",
        "reward_amount": 11460.31175422,
        "start": 1722254400
      }
    ],
    "00007633A19FA04D0AEB498A13F0036F4A57B6B8D51A482B21856E2FEEA2062D2E1B": [
      {
        "amount": 105.01724955,
        "end": 1724770800,
        "id": "1722179896",
        "level": "1",
        "reward_amount": 1028.08037464,
        "start": 1722178800
      }
    ],
    "0000A4E8AAD6D7C5A7E98600D8ECA42D067CA9381AAD0CB1CD1C2B887FD3CF6DE9F9": [
      {
        "amount": 53.50219411,
        "end": 1818734400,
        "id": "1724128095",
        "level": "7",
        "reward_amount": 181.22103412,
        "start": 1724126400
      },
      {
        "amount": 22.49541696,
        "end": 1755403200,
        "id": "1723869811",
        "level": "5",
        "reward_amount": 175.38453132,
        "start": 1723867200
      }
    ],
    "00005CE8B2DF75E028E3A597C002168CE3515FDEFADCB690A54A214B7CC33D97D877": [
      {
        "amount": 182.18728409,
        "end": 1817139600,
        "id": "1722532691",
        "level": "7",
        "reward_amount": 33218.87706775,
        "start": 1722531600
      }
    ],
    "0000C15B3E78CC1D87238E3BFAAD5CF05CD56BA2160E1D68E8BEF7C5010B4AC87217": [
      {
        "amount": 29.50526354,
        "end": 1724241600,
        "id": "1723637961",
        "level": "1",
        "reward_amount": 40.1326213,
        "start": 1723636800
      }
    ],
    "00001433FCDCB6526284D15595BA9D1646F6A053525C76BCDC8FBA7AAB6C10128FE5": [
      {
        "amount": 78.80771402,
        "end": 1817035200,
        "id": "1722429634",
        "level": "7",
        "reward_amount": 14570.46896653,
        "start": 1722427200
      },
      {
        "amount": 321.79211689,
        "end": 1816581600,
        "id": "1721974280",
        "level": "7",
        "reward_amount": 59494.99097402,
        "start": 1721973600
      }
    ],
    "000006FBF6B819682713C55101B6E40FD44EE4CB6FCAC79DECC9BA7937FA03B4105D": [
      {
        "amount": 107.25019302,
        "end": 1818280800,
        "id": "1721932444",
        "level": "7",
        "reward_amount": 4699.03291278,
        "start": 1723672800
      }
    ],
    "000019FC92D343ABC49E036ED1269A1519F7705DE521CD16A80568F9ACEA64AF630E": [
      {
        "amount": 4.80992698,
        "end": 1818104400,
        "id": "1723411848",
        "level": "7",
        "reward_amount": 302.95842067,
        "start": 1723496400
      },
      {
        "amount": 2.6725006,
        "end": 1818014400,
        "id": "1723409213",
        "level": "7",
        "reward_amount": 195.72722401,
        "start": 1723406400
      },
      {
        "amount": 2.67282051,
        "end": 1818000000,
        "id": "1723394536",
        "level": "7",
        "reward_amount": 200.14581202,
        "start": 1723392000
      },
      {
        "amount": 3.74973406,
        "end": 1731625200,
        "id": "1723849589",
        "level": "3",
        "reward_amount": 9.64236279,
        "start": 1723849200
      }
    ],
    "0000E82C3C5C9FC73EC8FF057BB18DE85342C3D22EC6A079F1290B5DB287E8B67B36": [
      {
        "amount": 1230.75929709,
        "end": 1817118000,
        "id": "1722510225",
        "level": "7",
        "reward_amount": 227550.70471912,
        "start": 1722510000
      }
    ],
    "0000CBA94C234B9812CADD90F969CE6283D1A9CA67646B0A1F7CDED665AE5EAF738E": [
      {
        "amount": 0.21072829,
        "end": 1786190400,
        "id": "1723119516",
        "level": "6",
        "reward_amount": 12.55875118,
        "start": 1723118400
      },
      {
        "amount": 0.23839507,
        "end": 1754071200,
        "id": "1722537580",
        "level": "5",
        "reward_amount": 13.30029406,
        "start": 1722535200
      },
      {
        "amount": 0.1,
        "end": 1816588800,
        "id": "1721981565",
        "level": "7",
        "reward_amount": 18.47859306,
        "start": 1721980800
      },
      {
        "amount": 0.93935458,
        "end": 1785607200,
        "id": "1722537247",
        "level": "6",
        "reward_amount": 94.63978844,
        "start": 1722535200
      }
    ],
    "0000B4B884CF98D325EA231AFF2EA5DC31F9C358F5FCB8B608472A3A96BE752A07F7": [
      {
        "amount": 254.72304285,
        "end": 1817121600,
        "id": "1722514104",
        "level": "7",
        "reward_amount": 47094.82800091,
        "start": 1722513600
      },
      {
        "amount": 9.44608568,
        "end": 1817373600,
        "id": "1722514351",
        "level": "7",
        "reward_amount": 1429.4043797,
        "start": 1722765600
      },
      {
        "amount": 37.78434274,
        "end": 1817175600,
        "id": "1722514247",
        "level": "7",
        "reward_amount": 6702.03914084,
        "start": 1722567600
      },
      {
        "amount": 18.89217137,
        "end": 1754049600,
        "id": "1722514298",
        "level": "5",
        "reward_amount": 1071.79839884,
        "start": 1722513600
      },
      {
        "amount": 4.72304284,
        "end": 1817373600,
        "id": "1722514397",
        "level": "7",
        "reward_amount": 714.69773837,
        "start": 1722765600
      },
      {
        "amount": 1.58757603,
        "end": 1817373600,
        "id": "1722514679",
        "level": "7",
        "reward_amount": 240.22884842,
        "start": 1722765600
      },
      {
        "amount": 87.28512712,
        "end": 1818262800,
        "id": "1723655698",
        "level": "7",
        "reward_amount": 3976.04186893,
        "start": 1723654800
      }
    ],
    "00004DC6EBEA8E26909D9E9FB1C604A7270F3A2CC804F5F64DCD03DA70CC903BC98D": [
      {
        "amount": 50.26752325,
        "end": 1737986400,
        "id": "1722437015",
        "level": "4",
        "reward_amount": 1579.93163223,
        "start": 1722434400
      }
    ],
    "00008DF280685C32B0693F69FC22C5122E1C54A9DFFEF88CE00A8828C72B4459C2F6": [
      {
        "amount": 47.94319205,
        "end": 1729713600,
        "id": "1721938117",
        "level": "3",
        "reward_amount": 841.50256769,
        "start": 1721937600
      }
    ],
    "00007C6409AF3DB9B3C6430AD466A43A186EB7144CF4289638E840E56186D3B1B9B4": [
      {
        "amount": 36.5809169,
        "end": 1818518400,
        "id": "1723911946",
        "level": "7",
        "reward_amount": 786.38335552,
        "start": 1723910400
      }
    ],
    "00001D52DD87EE906E25919F74B607790D87D17723EC9CA2B19224739708782A1D23": [
      {
        "amount": 2.96915153,
        "end": 1724522400,
        "id": "1721932389",
        "level": "1",
        "reward_amount": 27.58206552,
        "start": 1721930400
      }
    ],
    "000075EF1174A535403DF88EE3A27807B596539F09C6F63033A00A38F4E1B811AE1F": [
      {
        "amount": 1.81496057,
        "end": 1816855200,
        "id": "1722249973",
        "level": "7",
        "reward_amount": 335.55341647,
        "start": 1722247200
      }
    ],
    "0000D7F7B94DD148DCD31B25C51647090A34F2210EF612BF9C0988EA2A3C3B7B9712": [
      {
        "amount": 13.61565332,
        "end": 1817755200,
        "id": "1723150527",
        "level": "7",
        "reward_amount": 1415.94853226,
        "start": 1723147200
      },
      {
        "amount": 604.03017627,
        "end": 1816959600,
        "id": "1722353473",
        "level": "7",
        "reward_amount": 111676.98426657,
        "start": 1722351600
      }
    ],
    "00004A6F653B2A69335AF13A8F8E5512B3E53F3AFAFCF138435732199C9FAC4290C7": [
      {
        "amount": 10.9057332,
        "end": 1730217600,
        "id": "1722442119",
        "level": "3",
        "reward_amount": 191.41816254,
        "start": 1722441600
      }
    ],
    "00006D17EB8A194974555425952659CBD0F2C969CE33C0DE0EC890794FAAC5AE6A94": [
      {
        "amount": 131.01401512,
        "end": 1785168000,
        "id": "1722096944",
        "level": "6",
        "reward_amount": 13421.57597587,
        "start": 1722096000
      }
    ],
    "00003694D832E63C02120BA8697CF8FD2D4A79DB1175D8068D4772D80E2F8525147F": [
      {
        "amount": 4.47623045,
        "end": 1754719200,
        "id": "1723185134",
        "level": "5",
        "reward_amount": 136.73122873,
        "start": 1723183200
      },
      {
        "amount": 4.47623045,
        "end": 1817791200,
        "id": "1723184982",
        "level": "7",
        "reward_amount": 445.60310472,
        "start": 1723183200
      }
    ],
    "0000381ADEE3D08CE73D5BD8D98B35728546FDE56758915FA5B583A807E926049846": [
      {
        "amount": 48.71435884,
        "end": 1754258400,
        "id": "1722725692",
        "level": "5",
        "reward_amount": 2343.67528021,
        "start": 1722722400
      },
      {
        "amount": 120.67951889,
        "end": 1724634000,
        "id": "1722762931",
        "level": "1",
        "reward_amount": 39.18857282,
        "start": 1724029200
      }
    ],
    "0000DC7461F3C3EEDB63A9FEA48F458107A31866B401AF7B4BDDB8F1613CC7127F94": [
      {
        "amount": 25.32639252,
        "end": 1816704000,
        "id": "1722096427",
        "level": "7",
        "reward_amount": 4682.49762535,
        "start": 1722096000
      },
      {
        "amount": 20.0,
        "end": 1729868400,
        "id": "1722095578",
        "level": "3",
        "reward_amount": 351.04145843,
        "start": 1722092400
      },
      {
        "amount": 174.29235148,
        "end": 1816538400,
        "id": "1721932760",
        "level": "7",
        "reward_amount": 32224.28359255,
        "start": 1721930400
      },
      {
        "amount": 75.55517261,
        "end": 1816700400,
        "id": "1722095617",
        "level": "7",
        "reward_amount": 13969.1166947,
        "start": 1722092400
      }
    ],
    "0000671A0C8F7435F2CCFD6CAD5483AB34B2C51E4F78DCF5F82788A8B9259C2484D2": [
      {
        "amount": 212.99553293,
        "end": 1724594400,
        "id": "1722004019",
        "level": "1",
        "reward_amount": 2010.64912633,
        "start": 1722002400
      },
      {
        "amount": 212.99553293,
        "end": 1737554400,
        "id": "1722003953",
        "level": "4",
        "reward_amount": 6694.55023882,
        "start": 1722002400
      }
    ],
    "000064A6D0868320FE9AB0F1D3E9AE2BF405E3F71B1F7DE7D89C74CDC70824F3265A": [
      {
        "amount": 124.06037092,
        "end": 1817143200,
        "id": "1722538565",
        "level": "7",
        "reward_amount": 22558.16017337,
        "start": 1722535200
      }
    ],
    "0000BC394288E559805ED17E843BAFA2925403613EADC6E00B095EE438D380F421F6": [
      {
        "amount": 10.47721692,
        "end": 1738260000,
        "id": "1722708675",
        "level": "4",
        "reward_amount": 282.48848323,
        "start": 1722708000
      },
      {
        "amount": 24.53124237,
        "end": 1817053200,
        "id": "1722447790",
        "level": "7",
        "reward_amount": 4535.48553885,
        "start": 1722445200
      }
    ],
    "000055919C53436351B1C3C38D274410A325C9105E0CA01B3CC9BA1DBC27FDD0C0C3": [
      {
        "amount": 5.97382296,
        "end": 1818255600,
        "id": "1723647670",
        "level": "7",
        "reward_amount": 276.31907704,
        "start": 1723647600
      }
    ],
    "0000ED23150531DF35F3E3B0554C22C8D4F3987A40CD32FEA8B55AB23A7EED1C682E": [
      {
        "amount": 25.78673523,
        "end": 1817488800,
        "id": "1722880963",
        "level": "7",
        "reward_amount": 3531.87774136,
        "start": 1722880800
      }
    ],
    "00002DB9771992B93696556A34A3BFD4170C1059ED3753643F7A1FE1EAD1FCE9BF68": [
      {
        "amount": 308.36502922,
        "end": 1817056800,
        "id": "1722450977",
        "level": "7",
        "reward_amount": 57012.50458128,
        "start": 1722448800
      },
      {
        "amount": 308.36502922,
        "end": 1785520800,
        "id": "1722450936",
        "level": "6",
        "reward_amount": 31590.09131658,
        "start": 1722448800
      },
      {
        "amount": 120.276501,
        "end": 1817110800,
        "id": "1722464339",
        "level": "7",
        "reward_amount": 22237.48467062,
        "start": 1722502800
      }
    ],
    "0000F6A8A7CC3DD8711A003DC58BE1F7FC905C4A2E6980682CA24329A02C534AF3F7": [
      {
        "amount": 44.18479913,
        "end": 1818691200,
        "id": "1723888698",
        "level": "7",
        "reward_amount": 301.00611104,
        "start": 1724083200
      },
      {
        "amount": 242.67902498,
        "end": 1818108000,
        "id": "1723503400",
        "level": "7",
        "reward_amount": 15186.12677296,
        "start": 1723500000
      }
    ],
    "0000FF3CF6D72B285283A3934D2E36A62AAB56E1BCC27082919B29E6A2831F799812": [
      {
        "amount": 71.9275237,
        "end": 1816848000,
        "id": "1722242554",
        "level": "7",
        "reward_amount": 13298.41401436,
        "start": 1722240000
      }
    ],
    "0000DCB5B70BD165848F9FB8AB83894A02F674496ABF2995DE18466402D8EBFF7D15": [
      {
        "amount": 49.87971046,
        "end": 1738015200,
        "id": "1722464705",
        "level": "4",
        "reward_amount": 1567.74235449,
        "start": 1722463200
      }
    ],
    "0000FB28E1A3B78D078B674B4E3A4DBEB4C4543FF2B54B6D1841A6FCAB2DE1C0936D": [
      {
        "amount": 59.82154437,
        "end": 1737576000,
        "id": "1722024930",
        "level": "4",
        "reward_amount": 1880.2191803,
        "start": 1722024000
      }
    ],
    "0000A6C97BFB871BF34606CE6A8E7230BF5703EA9DF1945B293B3F6A082EF2EDC56D": [
      {
        "amount": 0.45519111,
        "end": 1739206800,
        "id": "1723657354",
        "level": "4",
        "reward_amount": 3.52442342,
        "start": 1723654800
      }
    ],
    "0000734ED585CD05560B237E31C1CB53ED174E5B6EB330094B5C08282D4A556A0DA6": [
      {
        "amount": 6.13298006,
        "end": 1787173200,
        "id": "1724104402",
        "level": "6",
        "reward_amount": 18.24361238,
        "start": 1724101200
      }
    ],
    "00000DE4DFF7652D9F02A67BD1218F18311A52AADE2C85AB78AF12A0E5EC7CAAA891": [
      {
        "amount": 55.59720608,
        "end": 1738335600,
        "id": "1722784126",
        "level": "4",
        "reward_amount": 1408.69405976,
        "start": 1722783600
      },
      {
        "amount": 55.59720608,
        "end": 1730559600,
        "id": "1722784184",
        "level": "3",
        "reward_amount": 786.67314914,
        "start": 1722783600
      }
    ],
    "000044EFDE184CFC2A84F5D341A39F371A9523814B3945AE8280C249728D6144B67F": [
      {
        "amount": 27.63318712,
        "end": 1817330400,
        "id": "1722552026",
        "level": "7",
        "reward_amount": 4332.65491711,
        "start": 1722722400
      }
    ],
    "0000BB806DC0F952A529897ADD7504A4EF6F3DF0ADD721448CCFC44177759AD4607E": [
      {
        "amount": 300.31032189,
        "end": 1816686000,
        "id": "1722080419",
        "level": "7",
        "reward_amount": 55523.29805828,
        "start": 1722078000
      },
      {
        "amount": 372.0,
        "end": 1753614000,
        "id": "1722080230",
        "level": "5",
        "reward_amount": 21104.47081028,
        "start": 1722078000
      },
      {
        "amount": 300.0,
        "end": 1785150000,
        "id": "1722080321",
        "level": "6",
        "reward_amount": 30733.14600921,
        "start": 1722078000
      },
      {
        "amount": 62.02815161,
        "end": 1737630000,
        "id": "1722080782",
        "level": "4",
        "reward_amount": 1949.5736438,
        "start": 1722078000
      }
    ],
    "0000464CD8E96E1E15C3EA0FE9D5D5C5210AEAA912FB65046FD8480F772D85DBB598": [
      {
        "amount": 62.47482098,
        "end": 1731477600,
        "id": "1723705188",
        "level": "3",
        "reward_amount": 243.50948567,
        "start": 1723701600
      }
    ],
    "00009E5EE80B7C5103AA4DB54611751B3E86D29BCC69561F86B44337FC92078B85B2": [
      {
        "amount": 6.66048935,
        "end": 1816678800,
        "id": "1722071160",
        "level": "7",
        "reward_amount": 1231.4249613,
        "start": 1722070800
      },
      {
        "amount": 7.3489425,
        "end": 1817802000,
        "id": "1723194465",
        "level": "7",
        "reward_amount": 721.786086,
        "start": 1723194000
      }
    ],
    "000072CD1D5DF1A97F6992C57209B4CAC143E0F1AFD8DC2B06714FB289408ADB65B5": [
      {
        "amount": 1.42406112,
        "end": 1738148400,
        "id": "1722596701",
        "level": "4",
        "reward_amount": 41.98520567,
        "start": 1722596400
      }
    ],
    "0000E70A43E0EB702B53D4879273C38A7C3CE5FCA753B21F59194BC5A32A81619FFC": [
      {
        "amount": 3.43620376,
        "end": 1753560000,
        "id": "1722026455",
        "level": "5",
        "reward_amount": 194.94372751,
        "start": 1722024000
      }
    ],
    "0000E8CC3360749967B5E155FCC354D4196DF18BA66673CF3806CDCEEB5B0CDA130C": [
      {
        "amount": 0.19591836,
        "end": 1816581600,
        "id": "1721977192",
        "level": "7",
        "reward_amount": 36.21327188,
        "start": 1721973600
      }
    ],
    "0000BD87C2E369137110E76B3610835EE04C4B2FF17B90F8B9C5662EBD6872B9CD85": [
      {
        "amount": 32.57882219,
        "end": 1817024400,
        "id": "1722416767",
        "level": "7",
        "reward_amount": 6023.37223014,
        "start": 1722416400
      },
      {
        "amount": 32.57882219,
        "end": 1753952400,
        "id": "1722416677",
        "level": "5",
        "reward_amount": 1848.27602918,
        "start": 1722416400
      }
    ],
    "00007F8DEF6ECCA96503E21C8F5B90A13CC5EF1BEB236952C55F4727B3E93E41CCF8": [
      {
        "amount": 12.5209424,
        "end": 1737493200,
        "id": "1721942574",
        "level": "4",
        "reward_amount": 393.53870292,
        "start": 1721941200
      },
      {
        "amount": 25.0,
        "end": 1724533200,
        "id": "1721942502",
        "level": "1",
        "reward_amount": 232.80382876,
        "start": 1721941200
      },
      {
        "amount": 150.04188478,
        "end": 1729710000,
        "id": "1721934998",
        "level": "3",
        "reward_amount": 2633.5470199,
        "start": 1721934000
      },
      {
        "amount": 185.0,
        "end": 1816542000,
        "id": "1721934872",
        "level": "7",
        "reward_amount": 34203.98263802,
        "start": 1721934000
      },
      {
        "amount": 50.0,
        "end": 1785013200,
        "id": "1721942343",
        "level": "6",
        "reward_amount": 5122.19062358,
        "start": 1721941200
      },
      {
        "amount": 50.0,
        "end": 1724338800,
        "id": "1721942427",
        "level": "1",
        "reward_amount": 54.47872958,
        "start": 1723734000
      },
      {
        "amount": 12.52094239,
        "end": 1729717200,
        "id": "1721942544",
        "level": "3",
        "reward_amount": 219.76845939,
        "start": 1721941200
      }
    ],
    "00000A089C97040872F00A5AC91D247264EE1C189D89511189264166BB873550A46F": [
      {
        "amount": 3.15641778,
        "end": 1817139600,
        "id": "1722531719",
        "level": "7",
        "reward_amount": 575.51117846,
        "start": 1722531600
      }
    ],
    "0000FAE37FC2D817C6865945AEE9A41AF95E058C1C8C64C58D15F038372961E7ADF1": [
      {
        "amount": 33.87956458,
        "end": 1817956800,
        "id": "1722674870",
        "level": "7",
        "reward_amount": 2704.53001496,
        "start": 1723348800
      },
      {
        "amount": 125.6663019,
        "end": 1730037600,
        "id": "1722262624",
        "level": "3",
        "reward_amount": 2205.704818,
        "start": 1722261600
      },
      {
        "amount": 60.15832309,
        "end": 1754118000,
        "id": "1722583399",
        "level": "5",
        "reward_amount": 3237.74279528,
        "start": 1722582000
      },
      {
        "amount": 25.0,
        "end": 1817967600,
        "id": "1722674826",
        "level": "7",
        "reward_amount": 1964.7574393,
        "start": 1723359600
      }
    ],
    "00008EB87E1B3060B0A7E45E44DFE9DA23596A08779B278F30C54036F956D5A02406": [
      {
        "amount": 0.16243241,
        "end": 1817812800,
        "id": "1723205806",
        "level": "7",
        "reward_amount": 15.73125519,
        "start": 1723204800
      }
    ],
    "00009B8A94A9423E5308DFDA578E4DC4B79315A4E70A3030BD7D053AF40CAA124714": [
      {
        "amount": 479.34637575,
        "end": 1738314000,
        "id": "1722763348",
        "level": "4",
        "reward_amount": 12366.42770251,
        "start": 1722762000
      }
    ],
    "0000B970E7B817E83B6F85BD678B0ABC69459A9FD3E78AFADCF99A6ABA06A2CA7FDE": [
      {
        "amount": 0.42556994,
        "end": 1738051200,
        "id": "1722501635",
        "level": "4",
        "reward_amount": 13.37530619,
        "start": 1722499200
      }
    ],
    "0000FF978269EAB73B174410CF09E346A5947B1DFFEE59CF3074040913C14056D9F6": [
      {
        "amount": 1.97280053,
        "end": 1738072800,
        "id": "1721929526",
        "level": "4",
        "reward_amount": 61.65972755,
        "start": 1722520800
      }
    ],
    "00008330CD9373E57D9E870E2C967704CF3E79E7377E8466FAA85FE9A3461519DDE9": [
      {
        "amount": 60.0,
        "end": 1737752400,
        "id": "1722202561",
        "level": "4",
        "reward_amount": 1885.8279127,
        "start": 1722200400
      },
      {
        "amount": 20.0,
        "end": 1787104800,
        "id": "1722171304",
        "level": "6",
        "reward_amount": 122.00163208,
        "start": 1724032800
      },
      {
        "amount": 40.81427052,
        "end": 1753736400,
        "id": "1722202601",
        "level": "5",
        "reward_amount": 2315.49273648,
        "start": 1722200400
      }
    ],
    "0000E852F2C7991670CD5E54275FB3DFA30D1304370421A0E7956E7B91320957596A": [
      {
        "amount": 14.87378641,
        "end": 1726416000,
        "id": "1723825591",
        "level": "2",
        "reward_amount": 23.20364483,
        "start": 1723824000
      },
      {
        "amount": 24.96985465,
        "end": 1726340400,
        "id": "1723750688",
        "level": "2",
        "reward_amount": 48.4108356,
        "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.03151993,
        "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": 576.35251457,
        "start": 1722960000
      },
      {
        "amount": 8.86339504,
        "end": 1817197200,
        "id": "1721933039",
        "level": "7",
        "reward_amount": 1545.98727883,
        "start": 1722589200
      }
    ],
    "000004ABDBE9D35795ED9A78D0849805B885E116F6F40FF90D35DB568F15F6D1C652": [
      {
        "amount": 260.33469399,
        "end": 1817899200,
        "id": "1723293493",
        "level": "7",
        "reward_amount": 22504.7659853,
        "start": 1723291200
      }
    ],
    "00007FA07F4C3672640E3FD681E0FAE3C80863DD7908C1F81922E5AFD0587933703A": [
      {
        "amount": 3.26021228,
        "end": 1753509600,
        "id": "1721976509",
        "level": "5",
        "reward_amount": 184.95879957,
        "start": 1721973600
      },
      {
        "amount": 0.44083593,
        "end": 1724565600,
        "id": "1721976734",
        "level": "1",
        "reward_amount": 4.13499386,
        "start": 1721973600
      }
    ],
    "000078419299567E0F2FCD8C9D27EE704D1E67AA3F16D60676E4E59B6B553A408A7E": [
      {
        "amount": 439.71716668,
        "end": 1738339200,
        "id": "1722787622",
        "level": "4",
        "reward_amount": 11107.63111276,
        "start": 1722787200
      }
    ],
    "000032DC502B02DEC57A8E5C2246255DA7C246BA71AB9E0D360FCBC9B4DF6D00B96C": [
      {
        "amount": 75.78370887,
        "end": 1816542000,
        "id": "1721935026",
        "level": "7",
        "reward_amount": 14011.37194852,
        "start": 1721934000
      }
    ],
    "0000F1FA618295609C88112355B27B6408B4516FADBE52F1F5055773EF0D21481709": [
      {
        "amount": 250.0,
        "end": 1730365200,
        "id": "1722548174",
        "level": "3",
        "reward_amount": 4139.21689639,
        "start": 1722589200
      },
      {
        "amount": 132.0,
        "end": 1785013200,
        "id": "1721941249",
        "level": "6",
        "reward_amount": 13522.58417875,
        "start": 1721941200
      },
      {
        "amount": 100.0,
        "end": 1816549200,
        "id": "1721941422",
        "level": "7",
        "reward_amount": 18488.63580482,
        "start": 1721941200
      }
    ],
    "0000FC1BE15494A76BFD2DFF8E20AD98BB1CD30F341144547F8F059C430D3387ED6D": [
      {
        "amount": 2.49600361,
        "end": 1817478000,
        "id": "1722872077",
        "level": "7",
        "reward_amount": 345.21149118,
        "start": 1722870000
      },
      {
        "amount": 1859.77238396,
        "end": 1738789200,
        "id": "1723240504",
        "level": "4",
        "reward_amount": 29364.74645366,
        "start": 1723237200
      }
    ],
    "00008A4CB8CEA0D05A77DC99A98378D4D5DB614ACF9D643102B2C9A7B25362E17BA7": [
      {
        "amount": 0.48461404,
        "end": 1818666000,
        "id": "1724060289",
        "level": "7",
        "reward_amount": 4.2957315,
        "start": 1724058000
      }
    ],
    "00003912E3ACB6D77934667E13274828D5AD9AC54A887B5D050C0935ACCCDA8D1E40": [
      {
        "amount": 17.67651906,
        "end": 1753977600,
        "id": "1722444706",
        "level": "5",
        "reward_amount": 1002.83118002,
        "start": 1722441600
      },
      {
        "amount": 17.67651906,
        "end": 1817049600,
        "id": "1722444656",
        "level": "7",
        "reward_amount": 3268.14025165,
        "start": 1722441600
      }
    ],
    "0000092A47748F78775B696FC9376E24AF2927B73E1E4B8D0A1ADFCEA1367B4CB509": [
      {
        "amount": 1.01595724,
        "end": 1816959600,
        "id": "1722354784",
        "level": "7",
        "reward_amount": 187.82772076,
        "start": 1722351600
      }
    ],
    "000073A7AC558F5016CB4892C7827C520A219196863D29C83BD6EF0A570BB2E4B592": [
      {
        "amount": 2.6120638,
        "end": 1817301600,
        "id": "1722696281",
        "level": "7",
        "reward_amount": 419.10297155,
        "start": 1722693600
      },
      {
        "amount": 10.43290415,
        "end": 1738245600,
        "id": "1722696182",
        "level": "4",
        "reward_amount": 284.53921226,
        "start": 1722693600
      }
    ],
    "00007A37924F7BD618236ACE864E9FA1FBAFAB393DD45ED65B3A5A7940BECB39FC04": [
      {
        "amount": 1.91991801,
        "end": 1818183600,
        "id": "1723577244",
        "level": "7",
        "reward_amount": 103.94154028,
        "start": 1723575600
      }
    ],
    "000032687AA8603CA859AEFB8E12CDFB6D28916B2C09E73DB3BA543F09B222A98403": [
      {
        "amount": 110.69792489,
        "end": 1816876800,
        "id": "1722269359",
        "level": "7",
        "reward_amount": 20466.53579251,
        "start": 1722268800
      }
    ],
    "0000FD163D0CAD7CF62A6239A037EDABC27AD8467AD2898F899A88C7200DE2FB657A": [
      {
        "amount": 74.16892683,
        "end": 1729735200,
        "id": "1721959925",
        "level": "3",
        "reward_amount": 1301.81878387,
        "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": 88221.22425141,
        "start": 1722682800
      }
    ],
    "00003933C19DE8F6195AD0F7103D928C52A0B831DCA872F32740F0400C6998CA9CCB": [
      {
        "amount": 49.68521042,
        "end": 1725364800,
        "id": "1722775181",
        "level": "2",
        "reward_amount": 395.95118355,
        "start": 1722772800
      }
    ],
    "000078568EA8D66A60EC971FF34A4A53487674EDBB88CF58ED2BB73AD05CE21A94E8": [
      {
        "amount": 2.82762956,
        "end": 1726599600,
        "id": "1722782115",
        "level": "2",
        "reward_amount": 1.97059252,
        "start": 1724007600
      }
    ],
    "0000801092626879C235480C13BFC18B9568CA51649E42C3BED6D8AC482D4B91F9C5": [
      {
        "amount": 23.00584072,
        "end": 1817532000,
        "id": "1722927504",
        "level": "7",
        "reward_amount": 3027.61997667,
        "start": 1722924000
      },
      {
        "amount": 3.70605259,
        "end": 1816812000,
        "id": "1722204811",
        "level": "7",
        "reward_amount": 685.1899957,
        "start": 1722204000
      },
      {
        "amount": 0.36723386,
        "end": 1816779600,
        "id": "1722174812",
        "level": "7",
        "reward_amount": 67.88676458,
        "start": 1722171600
      },
      {
        "amount": 2.0,
        "end": 1738476000,
        "id": "1722927446",
        "level": "4",
        "reward_amount": 44.73869477,
        "start": 1722924000
      }
    ],
    "00007F1492C7E870854B53AD203A499739CCB6F89CD27815BBC4BDD3BE81222C9440": [
      {
        "amount": 1.4037579,
        "end": 1817204400,
        "id": "1722598748",
        "level": "7",
        "reward_amount": 243.47425035,
        "start": 1722596400
      }
    ],
    "0000BBC821314DDC42500CE5323C1FEBF4FAD1DD23B66D2A6E26056B7DE4BAC368BE": [
      {
        "amount": 50.47108125,
        "end": 1818446400,
        "id": "1723839883",
        "level": "7",
        "reward_amount": 1418.20395363,
        "start": 1723838400
      }
    ],
    "0000658314D9BA0FEFFE2F5DE0813BC53B25D3CDD49A54D59C991E8790A7F5375D5B": [
      {
        "amount": 174.28968373,
        "end": 1754226000,
        "id": "1722690048",
        "level": "5",
        "reward_amount": 8605.3902225,
        "start": 1722690000
      }
    ],
    "0000B0545556A79213679C1CF272B02D979C4E19400B44129989F81627A61C521716": [
      {
        "amount": 89.19491166,
        "end": 1817024400,
        "id": "1722418516",
        "level": "7",
        "reward_amount": 16490.91921767,
        "start": 1722416400
      }
    ],
    "00005B4473C5D282EBC71AF34C1E78870510C81BE8384493468500047E2B4FF9A000": [
      {
        "amount": 19.05256979,
        "end": 1729940400,
        "id": "1722165282",
        "level": "3",
        "reward_amount": 334.41205854,
        "start": 1722164400
      }
    ],
    "0000D098F675C8F040C1E25B25891F317E4857B9550A8FED31A2C3C3B759A39FA75B": [
      {
        "amount": 184.24142176,
        "end": 1731168000,
        "id": "1723393405",
        "level": "3",
        "reward_amount": 1309.61760862,
        "start": 1723392000
      }
    ],
    "00004C0F3FFD1B78130730BF1F0C122ADDFC0CE82C37C28F1B9C605895A743ECCA23": [
      {
        "amount": 4.25171936,
        "end": 1817931600,
        "id": "1723324837",
        "level": "7",
        "reward_amount": 351.70940696,
        "start": 1723323600
      },
      {
        "amount": 6.6505941,
        "end": 1731135600,
        "id": "1723362226",
        "level": "3",
        "reward_amount": 49.61347219,
        "start": 1723359600
      }
    ],
    "0000D80508879A4DA21AC5FEA1F984C8E260BFE13F088C1C9041417B71366E605669": [
      {
        "amount": 40.0,
        "end": 1816552800,
        "id": "1721946923",
        "level": "7",
        "reward_amount": 7395.44867222,
        "start": 1721944800
      },
      {
        "amount": 8.22453894,
        "end": 1753480800,
        "id": "1721946823",
        "level": "5",
        "reward_amount": 466.59743414,
        "start": 1721944800
      },
      {
        "amount": 10.0,
        "end": 1785016800,
        "id": "1721946894",
        "level": "6",
        "reward_amount": 1024.43738683,
        "start": 1721944800
      }
    ],
    "0000B80188376223239FDD24F1A3CFC6528B6FCF41DCF14D256C51D0E3BF27BF8252": [
      {
        "amount": 7.92679203,
        "end": 1817899200,
        "id": "1723291831",
        "level": "7",
        "reward_amount": 685.22960894,
        "start": 1723291200
      }
    ],
    "000028DFBAC45E559E66DB44A7A0B75C7F950D9A0C516E1DC615DEDB8D29FD84680A": [
      {
        "amount": 99.99706986,
        "end": 1786950000,
        "id": "1723666027",
        "level": "6",
        "reward_amount": 1351.92846004,
        "start": 1723878000
      },
      {
        "amount": 300.0,
        "end": 1818403200,
        "id": "1723665928",
        "level": "7",
        "reward_amount": 9641.67830857,
        "start": 1723795200
      },
      {
        "amount": 300.0,
        "end": 1786719600,
        "id": "1723650718",
        "level": "6",
        "reward_amount": 7688.83058461,
        "start": 1723647600
      },
      {
        "amount": 200.0,
        "end": 1818255600,
        "id": "1723650497",
        "level": "7",
        "reward_amount": 9251.10080651,
        "start": 1723647600
      },
      {
        "amount": 600.0,
        "end": 1818252000,
        "id": "1723644028",
        "level": "7",
        "reward_amount": 27972.13898895,
        "start": 1723644000
      },
      {
        "amount": 600.0,
        "end": 1755180000,
        "id": "1723644127",
        "level": "5",
        "reward_amount": 8583.06299302,
        "start": 1723644000
      },
      {
        "amount": 300.0,
        "end": 1818230400,
        "id": "1723622574",
        "level": "7",
        "reward_amount": 14685.49947669,
        "start": 1723622400
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538611",
        "level": "7",
        "reward_amount": 296.74294392,
        "start": 1724094000
      },
      {
        "amount": 50.0,
        "end": 1818702000,
        "id": "1723538505",
        "level": "7",
        "reward_amount": 296.74294392,
        "start": 1724094000
      },
      {
        "amount": 108.06605186,
        "end": 0,
        "id": "1723538332",
        "level": "0",
        "reward_amount": 174.59160126,
        "start": null
      },
      {
        "amount": 100.0,
        "end": 1739127600,
        "id": "1723579119",
        "level": "4",
        "reward_amount": 920.27187953,
        "start": 1723575600
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723579371",
        "level": "7",
        "reward_amount": 890.22986945,
        "start": 1724094000
      },
      {
        "amount": 145.48629854,
        "end": 1818486000,
        "id": "1723579626",
        "level": "7",
        "reward_amount": 3549.87415921,
        "start": 1723878000
      },
      {
        "amount": 150.0,
        "end": 1818702000,
        "id": "1723622714",
        "level": "7",
        "reward_amount": 890.22986945,
        "start": 1724094000
      },
      {
        "amount": 300.0,
        "end": 1739196000,
        "id": "1723644222",
        "level": "4",
        "reward_amount": 2377.32282792,
        "start": 1723644000
      },
      {
        "amount": 300.0,
        "end": 1818486000,
        "id": "1723644433",
        "level": "7",
        "reward_amount": 7320.01846664,
        "start": 1723878000
      },
      {
        "amount": 300.0,
        "end": 1755183600,
        "id": "1723650558",
        "level": "5",
        "reward_amount": 4257.95805278,
        "start": 1723647600
      },
      {
        "amount": 369.17389677,
        "end": 1818702000,
        "id": "1723650878",
        "level": "7",
        "reward_amount": 2190.99794663,
        "start": 1724094000
      },
      {
        "amount": 900.0,
        "end": 1818666000,
        "id": "1723665834",
        "level": "7",
        "reward_amount": 7978.65692748,
        "start": 1724058000
      },
      {
        "amount": 46.3,
        "end": 1818349200,
        "id": "1723665986",
        "level": "7",
        "reward_amount": 1726.06063318,
        "start": 1723741200
      }
    ],
    "0000EFDED9E6F9CA05F381554221EEEA88CC5AC1678AC35D340C56769E2A9EACDBF2": [
      {
        "amount": 1.30611653,
        "end": 1739613600,
        "id": "1724063344",
        "level": "4",
        "reward_amount": 1.90305554,
        "start": 1724061600
      }
    ],
    "00000F3CF7C963A098F6215C07466411CD95E07F93D7117EF8FE16DA3BE691760DC8": [
      {
        "amount": 47.8635734,
        "end": 1738065600,
        "id": "1722516149",
        "level": "4",
        "reward_amount": 1504.37431783,
        "start": 1722513600
      }
    ],
    "00004D2EF8BD21C17E05EF99F64446E28D8C70B5B3B3BBDB0B92A728CDA363AD1805": [
      {
        "amount": 0.67011237,
        "end": 1724522400,
        "id": "1721933831",
        "level": "1",
        "reward_amount": 6.22501428,
        "start": 1721930400
      },
      {
        "amount": 2.0,
        "end": 1816538400,
        "id": "1721933667",
        "level": "7",
        "reward_amount": 369.76339691,
        "start": 1721930400
      }
    ],
    "00009B697D797598F4ED3FDE3FF5EC00D10AC723A784DFB6EC9A6F8819D4A6EECC8D": [
      {
        "amount": 225.51623442,
        "end": 1817892000,
        "id": "1723287006",
        "level": "7",
        "reward_amount": 19685.54982021,
        "start": 1723284000
      }
    ],
    "000059A6082E05094B0AE076618B015A062172EEE73FA24D7D61994E796309C8DD42": [
      {
        "amount": 166.26275985,
        "end": 1818586800,
        "id": "1723978992",
        "level": "7",
        "reward_amount": 2594.7011859,
        "start": 1723978800
      }
    ],
    "0000F9EB9BE130704D0955D4AA1646357D22F0ADE0CCBEA3443F4A3A632729BAA588": [
      {
        "amount": 51.85740662,
        "end": 1754222400,
        "id": "1722688751",
        "level": "5",
        "reward_amount": 2567.72899156,
        "start": 1722686400
      },
      {
        "amount": 620.65359476,
        "end": 1729706400,
        "id": "1721932806",
        "level": "3",
        "reward_amount": 10893.7614103,
        "start": 1721930400
      }
    ],
    "0000BCED16C487F268B038B6660746D265E586A959EE526942DA3A87CD1FFB720302": [
      {
        "amount": 3.75132465,
        "end": 1724738400,
        "id": "1724133674",
        "level": "1",
        "reward_amount": 0.30387592,
        "start": 1724133600
      }
    ],
    "0000FB9C2BC25B3A67E1CE324F6E3CE81F6FFD596F31358E85BB31BECCAC61F08FF7": [
      {
        "amount": 50.12595538,
        "end": 1724522400,
        "id": "1721930366",
        "level": "1",
        "reward_amount": 465.64776736,
        "start": 1721930400
      }
    ]
  },
  "last_calculation_timestamp": 1724169600,
  "lp_tokens_deposited": 28425.16318086,
  "lp_tokens_deposited_by_level": {
    "0": 109.30967312,
    "1": 2044.14718116,
    "2": 93.2316753,
    "3": 1885.94115528,
    "4": 3991.66336458,
    "5": 3249.68567018,
    "6": 1736.5316771,
    "7": 15314.65278414
  },
  "rewards_distributed": 33657.61996961,
  "rewards_reserved": 2329261.54427055
}
                  
Movements (0)

Ownerships (1)

  • Secret shared with 1 key

    Encoded secret

    3B4F43E86E2A1C90BABB89288F8AD8A8B52987D40F4050E7D5F6A3E6A224EE1A09E920F34D84D525D02F6FD0F9E13E98A34D9D35EDC49BCE9167ECA3

    Authorized keys

    • 000122A6CD9ED07E46835D6E88E5BD0BEE84C3F5E5DBF8E916AD9B2EC912C44AFEC2

Contract recipients (0)

Inputs (0)

Contract inputs (0)

Unspent outputs (0)

Proofs and signatures

Previous public key

00012414CC28C67891B593540D1CB93E4D9D6A889814003EB073B0A7E0DC4291D531

Previous signature

E85FBFD33089FD4289B364F1AF065C5E67FA3B780AF335C3E42F4934DD169D988B3267A3FA0E0D6065F903BDD4B902BDC947B8DADC1FAFCB175D563882BEE108

Origin signature

30440220183D552007ABBF758BF388B18D615C9D61EA98BF5CB2933FF6DFB824156820DB02206D4BC83B92D4070F618AF4643B05CCD7F3910131B1F0DD1E21F0039BDCA8CD9A

Proof of work

010204AA023E1E039788AD4B8F713C8871CA39A177414A99A0788993AD725B1FBB7AD5E4CAC86151A9E03451DCACB1EFC100B1E450FCEDAF5E5005F3A4C503D1D29712

Proof of integrity

0082AB8A8B10643666880DB0D53B4C02DE8AFC89D5DDB64A7A57F8925FC091DA49

Coordinator signature

379E39352928C8BAB78B154E0211EF20D948000BF78E1A8B0951C7F9A08B74DFD345BCF24E01C152917B71D823C1C2EAD62E2D59487073B223FF5B60A6877009

Validator #1 public key

00013979F182FBF100A7D850091072443374862E8A007B24B5E14A1405B1F3B1F406

Validator #1 signature

04828C80B5100B604DA89C1A0D1DC0C7A6A5FCE1A084FBC156F897A99A1E7FE4886F822D292A84CB0AC3B8F4DFBCE9CEDB81B21A76455F390612CE954B266102

Validator #2 public key

0001AAFBD70CD1928E509736D7A3F072694F7AD7AA7BF5716FB0239146EE4B633F45

Validator #2 signature

E8A4D58726580531BF839D45CC970A954CCA6BBAC0FF6ACB4CE38E4BDA78D124BDD179246D6AAC4732FB927ADFEA2014E0A3CEB609951ED05C3B2CF72B4B5B03