Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mint Modal Expected Tokens #431

Open
3 tasks
Tracked by #390
dospore opened this issue Jan 18, 2022 · 2 comments
Open
3 tasks
Tracked by #390

Mint Modal Expected Tokens #431

dospore opened this issue Jan 18, 2022 · 2 comments

Comments

@dospore
Copy link
Contributor

dospore commented Jan 18, 2022

  • Display total costs
  • Display expected tokens
  • Display equivalent exposure

Designs: https://www.figma.com/file/UkNDXVtYoQcaT6bRcTTcn9/Tracer-Deploy-1.3?node-id=192%3A39641

@dospore dospore mentioned this issue Jan 18, 2022
24 tasks
@dospore dospore changed the title Expected tokens minted breakdown, showing expected amount of tokens they will receive, and the expected price per token Mint Modal Expected Tokens Jan 25, 2022
@dweberdev dweberdev self-assigned this Jan 25, 2022
@dweberdev
Copy link
Contributor

Couple of questions:

  1. Protocol fee: Is the information in the link correct? 1% of TVL as an annual protocol fee. I think this is changing in v2 right?
    https://docs.tracer.finance/market-types/perpetual-pools/mechanism-design/fees?pk_vid=b6385656365eb2a51643243215c1c698#keeper-fees

  2. Gas fee: currently we display gwei in the top corner. Is there an API we currently use for USD conversion?

Screen Shot 2022-01-26 at 6 26 40 PM
https://www.figma.com/file/UkNDXVtYoQcaT6bRcTTcn9/Tracer-Deploy-1.3?node-id=215%3A39335

@chrdevmar
Copy link
Collaborator

chrdevmar commented Jan 27, 2022

  1. protocol fees for v1 are not quite as simple as this Unfortunately. The annualized 1% is taken during upkeep split proportionately between long and short collateral holdings. We don't have code to calculate this and writing that code is probs not worth it imo. v2 have minting/burning fees that we know at the time of user committing so will be better then.
    @issy-fleming

  2. I don't believe we currently display gas fees in USD anywhere but we do have BTC/USD and ETH/USD pricing from chainlink. You might have to refactor a bit to initialize/access this pricing data since its only used in the context of BPT staking farms at the moment. Check out the way context/FarmContext/index.ts for reference. also you may already be doing this @dweberdev but I think you'll need to estimate gas spend using the ethers contract instance (poolCommitter i think)

https://docs.ethers.io/v5/api/contract/contract/#contract-estimateGas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants