ekonomia-tech / protocol-alpha

Alpha version of a DeFi stablecoin protocol
GNU General Public License v3.0
4 stars 0 forks source link

add fraxBP init module #76

Closed kwhuo68 closed 1 year ago

kwhuo68 commented 1 year ago

Primary Goals of PR

Core changes:

Adds a FraxBPInitModule, along with corresponding tests

The module does the following:

  1. Allows users a deposit() function to deposit FraxBP LP token, and mint PHO against it via use of oracle to check FraxBP LP USD pricing
  2. Also offers a helper function for taking in deposits in USDC & FRAX that then calls deposit() on their behalf
  3. If a user wants to redeem, they get back their FraxBP LP and PHO is burnt

Notes: To run tests: forge test --match-contract FraxBPInitModuleTest -vvv