       from(
         b in Block,
         where: b.index >= ^min and b.index <= ^max,
-        select: map(b, [:index, :total_sys_fee, :gas_generated])
+        select: map(b, [:index, :total_sys_fee])
       )
 
     Repo.all(query)
-    |> Enum.map(fn %{:index => index, :total_sys_fee => sys, :gas_generated => gen} ->
-      %{:index => index, :gas => sys + gen}
+    |> Enum.map(fn %{:index => index, :total_sys_fee => sys} ->
+      %{:index => index, :claim => BlockGasGeneration.get_amount_generate_in_block(index), :sys => sys}
     end)
   end
 

      get_unclaimed_block_range(unclaimed)
      |> get_blocks_gas

    Enum.reduce(unclaimed, 0, fn vout, acc -> acc + compute_vout_bonus(vout, blocks_with_gas) end)
  end

  # proceed calculus if there are unclaimed results, otherwise return 0

      Enum.filter(blocks_with_gas, fn %{:index => index} ->
        index > start_height && index <= end_height
      end)
      |> Enum.reduce(%{:claimable => 0, :sys_fee => 0}, fn %{:claim => claim, :sys => sys}, acc -> %{:claimable => claim + acc.claimable, :sys_fee => sys + acc.sys_fee} end)

    %{:claim => round(value) * total_gas.claimable / total_neo(),
      :sys_fee => round(value) * total_gas.sys_fee / total_neo(),
     }
  end

  # get all unclaimed transaction vouts
