rahul-kothari / hack-money-ape

For ETHGlobal's HackMoney hackathon
10 stars 1 forks source link

Add advanced options for simulations #18

Closed mattiaslightstone closed 3 years ago

mattiaslightstone commented 3 years ago

Advanced options for simulation let the user choose either,

  1. The number of compounds that they want to simulate, OR
  2. The % of their collateral that they want to spend on

These are optional fields that are hidden by default. The user can now do an arbitrary number of compounds (capped at 30 based on the contract), with the user interface.

Note: The % exposure calculation is frequently off by ~10%, this is due to slippage. We can either manually account for that, or we can improve the simulation process to generate a better answer. I suggest that this is added as an issue and resolved in another PR, as the feature is still useful even without high precision.

Tooltips from #17 are used in this branch, so it should wait until that PR is merged.