bancorprotocol / webapp-v3

Bancor V3 dApp
https://app.bancor.network
MIT License
19 stars 23 forks source link

[BUG] Deposit - update deficit calculation to include externalIlVault #656

Closed Yanivshechter1 closed 2 years ago

Yanivshechter1 commented 2 years ago

on the deposit flow, when we calculated the pool deficit, we need to include externalIlProtection vault balance.

To Reproduce

  1. Go to earn page
  2. click Deposit to any token with external IL protection (crown, dapp, shibgf, bbs, acre).

Expected behavior deficit calculation should be the following: ( {current pool balance.tkn} + { external protection amount.tkn} ) / {total staked balance.tkn}

  1. Go to external protection Vault Contract - 0xFd31662b3d54eddE9B6Bdd32c9c27C8E292cAD57 If - isPaused = False and there is a balance for the specific token
  2. Add the amount of external protection to the available liquidity