Proof of Profitability
// 每个操作的收益
// profit0 : token0的收益
// exit0: 退出时 token0的数量
// invest0: 投入的token0的数量
// profit1 : token1的收益
// exit1: 退出时 token1的数量
// invest1: 投入的token1的数量
// etherPrice: 最新的以太的价格 , 这里是目前为token1的价格
// duration 这次操作的时长,单位秒
// currSDuration: 这个策略的总的时长,单位秒
// currentSeconds:当前时间 单位秒
// endTS: 这次操作的时间
// ONE_YEAR_SECONDS: 一年的时长 单位秒
// const profit = (item.profit0 + item.exit0 - item.invest0 +
// ((item.profit1 + item.exit1 - item.invest1) * etherPrice)) /
// (item.invest0 + item.invest1 * etherPrice) / duration * (duration / currSDuration) * ONE_YEAR_SECONDS
// year += profit
// pop += profit * 0.3 * (1 / (currentSeconds - item.endTS))
// 每个策略的操作求平均
// currSDuration 当前策略运行的时间
// durationAllS 所有策略运行的时间
// info.year += year / count * currSDuration / durationAllS
// info.pop += pop / count * currSDuration / durationAllS
// 用户所有的策略求平均
// info.year = info.year / countS
// info.pop = info.pop / countS
更新: 增加每个策略所占的时长占用户所有时长的一个百分比的影响因素Last updated