oceanprotocol / df-web

https://df.oceandao.org/
0 stars 4 forks source link

[APY calc v2] Include Fees inside the Lock OCEAN component #677

Closed KatunaNorbert closed 9 months ago

KatunaNorbert commented 10 months ago

Background / motivation

When some users engage in Passive DF by locking OCEAN to get passive rewards, by the time they've got some rewards they often feel blindsided by the tx fees. Often to the point where they've lost $. (Esp if they've locked a small amount of OCEAN for a short time.)

These issues led to this Slack discussion from Nov 21, 2023. One outcome of that discussion is the TODOs of this issue.

Detailed specs

Also in the slack discussion, we (got specs:

Ultimately the user wants to know: How much $ do I stand to net, and what is my APY? (Where APY accounts for costs.) Let's give them a practical tool.

The "$ to net" / "APY" values are based on:

  1. current tentative values for # OCEAN to lock and lock time (or ones already committeD)
  2. tx costs based on realistic estimates of tx costs including realistic counts of # txs needed eg in a given claim session
  3. how often the user would compound (which incurs more tx fees). This is critical, for reasons mentioned above in this comment.

I am imagining a widget where the user can see these values.

For gas usage estimates: we run some simulated txs, count the gas used, and then take the max # observed.

TODO

Inside the Lock OCEAN component add information about the tx fees costs in the following way:

KatunaNorbert commented 9 months ago

Proposed UI: