ebtc-protocol/ebtc

Simplify Liquidation Logic for Cap and Surplus

Closed this issue · 2 comments

Separate the 4x4 logic into separate functions
https://gist.github.com/GalloDaSballo/6bb7a140bd7c9343b40d1d4fea5c10e2

Should save gas and make the code easier to read

@rayeaster can you take a look at this implemenation to compare?

The suggested change looks good in terms of gas

The difference (used by my gas comparison locally) is here https://www.diffchecker.com/9r3vkmQf/

Related PR is here #687

image