Because the RewardClaimed events only include "to" and "reward" (qty) attributes, there is no way to match them with the position the accrued the fees being claimed. This issue seems to be pretty deep within the contract design as the rewards mapping only uses reward token addresses and owner address, so potentially a call to claimRewards is claiming rewards for multiple rewards programs or multiple positions.
getRewardInfo is of course handy to get unclaimed rewards for a position, but not for rewards that have already been claimed.
Given the above, there seems to be no path to accurately account for all the rewards accrued by a specific position with blockchain data.
Was there some thought put into how to match total rewards (claimed+unclaimed) to their corresponding NFT ids? Perhaps there is some path I'm not considering. Thanks.
Closing this since realized a possible path is to filter logs for TokenUnstaked events for a specific NFT id, and then get the RewardClaim events emitted in the same transaction.
Because the
RewardClaimed
events only include "to" and "reward" (qty) attributes, there is no way to match them with the position the accrued the fees being claimed. This issue seems to be pretty deep within the contract design as therewards
mapping only uses reward token addresses and owner address, so potentially a call toclaimRewards
is claiming rewards for multiple rewards programs or multiple positions.getRewardInfo
is of course handy to get unclaimed rewards for a position, but not for rewards that have already been claimed.Given the above, there seems to be no path to accurately account for all the rewards accrued by a specific position with blockchain data.
Was there some thought put into how to match total rewards (claimed+unclaimed) to their corresponding NFT ids? Perhaps there is some path I'm not considering. Thanks.