Budget: 10000 UAH Deadline: 4 days
Good day. I studied the task. The main reason for discrepancies with Nansen is the incorrect consideration of FIFO/LIFO during partial sales, ignoring Gas Fee in the token's cost, and the incorrect labeling of regular transfers/liquidity pools as transactions.
Technical solution:
I will rewrite the logic for processing arrays from Moralis in TypeScript/Node.js. I will implement a strict FIFO algorithm for Realized PnL. I will identify swaps by matching transaction_hash between native transfers and ERC-20, adding the gas spent to the position's cost. For tokens that came via regular transfer (without a swap), I will pull the historical price at the block moment through the DeFiLlama API. Based on the adjusted PnL, I will recalculate ROI and Win Rate (percentage of closed tokens in profit).
Experience regarding your points:
Similar tasks & Crypto statistics: I have developed custom portfolio trackers, I understand the mathematics of on-chain metrics and raw transaction processing.
Nansen: I use it as an analytical benchmark, I understand their logic for tracking Smart Money.
Moralis & DeFiLlama: I constantly work with the Token API from Moralis for collecting transfers and the Price API from DeFiLlama for historical quotes.
Plan and deadlines:
In 4 days, I will audit your code, rewrite the FIFO calculation considering gas, and calibrate the metrics using test wallets so that the numbers fully match with Nansen.
Questions regarding the task:
How does your system currently label incoming token transfers that are not the result of a swap on DEX — does it consider them a purchase at zero price or does it take the market value at the time of the transaction?