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

chg: remove repayLoanOverdue return. #104

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

twygod
Copy link
Contributor

@twygod twygod commented May 25, 2022

No description provided.

@twygod twygod requested a review from maxweng May 25, 2022 15:59
@linear
Copy link

linear bot commented May 25, 2022

UNI-696 Stakers still accrue rewards from defaulted loans they vouched for

There is an issue in the UserManager's repayLoanOverdue() . It allows stakers to still accrue rewards from the defaulted loans they vouched for.

The reason is that addressesLength variable is not initialized before using it to loop thru all the stakers to update their rewards.

I think the bug is introduced when we optimized the code with the Code4rena. The fix is pretty straightforward. First, we will update the code to initialize addressesLength using stakerAddresses.length. Then, we will just upgrade the UserManager contract to the new one.

@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #104 (a8bb57f) into develop (aebda77) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head a8bb57f differs from pull request most recent head 46f5c24. Consider uploading reports for the commit 46f5c24 to get more accurate results

@@             Coverage Diff             @@
##           develop     #104      +/-   ##
===========================================
- Coverage    90.49%   90.49%   -0.01%     
===========================================
  Files           24       24              
  Lines         1526     1525       -1     
  Branches       250      250              
===========================================
- Hits          1381     1380       -1     
  Misses         145      145              
Impacted Files Coverage Δ
contracts/asset/CompoundAdapter.sol 97.50% <ø> (ø)
contracts/market/MarketRegistry.sol 100.00% <ø> (ø)
contracts/token/ArbUnionWrapper.sol 0.00% <ø> (ø)
contracts/treasury/ArbConnector.sol 0.00% <ø> (ø)
contracts/treasury/Treasury.sol 98.36% <ø> (ø)
contracts/user/UserManagerArb.sol 87.50% <ø> (ø)
contracts/asset/AssetManager.sol 96.58% <100.00%> (ø)
contracts/asset/PureTokenAdapter.sol 87.80% <100.00%> (ø)
contracts/market/UToken.sol 94.86% <100.00%> (ø)
contracts/token/Comptroller.sol 93.70% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aebda77...46f5c24. Read the comment docs.

@maxweng maxweng merged commit 597c523 into develop Jun 10, 2022
@maxweng maxweng deleted the feature/uni-696-stakers-still-accrue-rewards-from branch July 13, 2022 09:59
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

Successfully merging this pull request may close these issues.

3 participants