morpho-org / morpho-blue-irm

Morpho Blue Interest Rate Models
https://morpho.org
MIT License
26 stars 17 forks source link

Post cantina #106

Closed MerlinEgalite closed 10 months ago

MerlinEgalite commented 10 months ago

Contains:

MerlinEgalite commented 10 months ago

@Rubilmax @Jean-Grimal can you create a PR to resolve conflicts please?

EDIT: nvm just saw @MathisGD's PR

Rubilmax commented 10 months ago

@Rubilmax @Jean-Grimal can you create a PR to resolve conflicts please?

111 is what you're looking for

MerlinEgalite commented 10 months ago

already edited my comment haha

StErMi commented 10 months ago

I think that you can remove using MorphoMathLib for uint256; from AdaptiveCurveIrm

https://github.com/morpho-org/morpho-blue-irm/pull/106/files#diff-a05758836d08a2a735bb478d93a10a8b2dacd40fb639d4c59104a6169552df79R23

The only op from MorphoMathLib (math lib from morpho blue) is

        int256 utilization = int256(
            market.totalSupplyAssets > 0 ? market.totalBorrowAssets.wDivDown(market.totalSupplyAssets) : 0
        );

But both of them are uint128 and not uint256.

At this point, I'm wondering what are the consequences if one of the types (external to the IRM) changes, and you can't apply anymore the MathLib. Does it revert directly?

StErMi commented 10 months ago

Looks good