Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate whether we can remove ceiling() or currentCeiling() in the nav feed #568

Open
hieronx opened this issue May 27, 2021 · 0 comments

Comments

@hieronx
Copy link
Contributor

hieronx commented May 27, 2021

I am wondering if we actually need both methods:

 function ceiling(uint loan) public view returns (uint) {
        if (borrowed[loan] > currentCeiling(loan)) {
            return 0;
        }
        return safeSub(currentCeiling(loan), borrowed[loan]);
    }

function currentCeiling(uint loan) public view returns(uint) {
        bytes32 nftID_ = nftID(loan);
        return rmul(nftValues[nftID_], ceilingRatio[risk[nftID_]]);
    }

We only use ceiling here it seems. We could just use currentCeiling and remove the ceiling function.

Originally posted by @manuelpolzhofer in #567 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant