We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Regarding to the function of distributeBorrowerComp() in https://github.com/compound-finance/compound-protocol/blob/master/contracts/Comptroller.sol, the formula of calculating account borrow amount is: uint borrowerAmount = div_(CToken(cToken).borrowBalanceStored(borrower), marketBorrowIndex);
uint borrowerAmount = div_(CToken(cToken).borrowBalanceStored(borrower), marketBorrowIndex);
I saw the borrowAmount calculation in cToken is: recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex
recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex
Is the borrowerAmount in distributeBorrowerComp() correct or not?
The text was updated successfully, but these errors were encountered:
Hi @Stevewu1234, did you figure this out at the end? I also have the same question and just came across this issue.
Sorry, something went wrong.
No branches or pull requests
Regarding to the function of distributeBorrowerComp() in https://github.com/compound-finance/compound-protocol/blob/master/contracts/Comptroller.sol,
the formula of calculating account borrow amount is:
uint borrowerAmount = div_(CToken(cToken).borrowBalanceStored(borrower), marketBorrowIndex);
I saw the borrowAmount calculation in cToken is:
recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex
Is the borrowerAmount in distributeBorrowerComp() correct or not?
The text was updated successfully, but these errors were encountered: