DeFi strategy aggregated PnL
Imagine you supplied 2 wETH to Aave, borrowed 400 USDT, and then borrowed $200 two more times. You want to know how profitable your strategy is. In other words, whether the yield from supplying ETH covers the cost of servicing the USDT debt.
Use the Lambda App Analytics page to create multi-asset, multi-DeFi reports that aggregate balances, rewards, and price metrics, with the ability to drill down into a single asset.
PnL = SUM( Rewards[token_i] ) + SUM ( Price_growth[token_i] ) - SUM ( Price_fall[token_i] )
In the video:
- We supplied 2 wETH - you can see on the chart and Balance history table
- We borrowed 400 + 200 + 200 = 800 USDT
- We earned $ 5.75 on supplying wETH
- We lost $ 1.48 on borrow fees for USDT
- Total rewards = $ 5.75 - $ 1.48 = $4.27
- PnL = Rewards + Price changes = $4.27 + $ 207.55 = $ 211.82
Updated 2 months ago
What’s Next
