hifi-finance / hifi

Monorepo implementing the Hifi fixed-rate, fixed-term lending protocol
https://app.hifi.finance
Other
105 stars 15 forks source link

feat(flash-swap): enable collateral subsidization #65

Closed scorpion9979 closed 2 years ago

scorpion9979 commented 2 years ago

Deals with an edge case where the entire liquidated collateral is not enough to repay the Uniswap V2 0.3% swap fee. The subsidizer address should only be set when the client intends to prioritize liquidating all vaults regardless of profitability. When the collateral liquidation is to be subsidized, the minimum profit will not be taken into account.

PaulRBerg commented 2 years ago

I will have to reject this in favor of the approach I implemented in https://github.com/hifi-finance/hifi/commit/7f042ab59d6d51a92f1a583120a2778c831fe749.

See Slack for further discussion.