hifi-finance / hifi-protocol

The Hifi fixed-rate, fixed-term lending protocol

Home Page:https://hifi.finance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor "setVaultDebt" into "increaseVaultDebt" and "reduceVaultDebt"

PaulRBerg opened this issue · comments

The current setVaultDebt function expects the caller fyToken to handle the debt amounts in advance. We could make the protocol more ergonomic if we refactored the function into the following subfunctions:

  • increaseVaultDebt
  • reduceVaultDebt

This way, the fyToken could simply pass the debt amount as a delta.

Implemented in 6c98356.