JavierSanzSaez/TFM-DeFi

Master Contract

Closed this issue · 0 comments

  • Has a dictionary of addresses of all the contracts
  • Funnels all requests
  • Interacts with all contracts, sending them a key to ensure nobody else can interact with them (probably using its address)
  • Create index -> Calls the Factory, passing the parameters from the request, adds the address of deployment to the dictionary to the storage contract
  • Mint index -> First sends the collateral to the Vault Contract, then calls the Index Contract whose address is given by the request as parameter and mints a new quantity.
  • Redeem index -> Burns the Index, gets the collateral from the Vault and sends it to the user
  • List Index -> Calls the Storage Contract to get all indices' addresses