Closed chasebrownn closed 9 months ago
@omniscia-core rent does not need to be claimed. When we rebase we take the difference between the last rental income total calculation and the current. No matter if we claim, it's still accounted for.
the previous rental income amount is stored in totalRentValue
and is compared with the new balance returned by _getRentBal
to calculate rebase
Nullified
BTE-13M: Incorrect Calculation of Rental Income
Description:
The
Basket::rebase
function will incorrectly calculate rental income as it will not claim it when a rebase operation occurs.Should the
rentFee
be sufficiently small that no claims need to be performed, multipleBasket::rebase
operations can be performed to artificially inflate the evaluation of theBasket
leading to significant attacks against depositors.Impact:
The current rebasing system is incorrect as it will track the same pending-claim rent multiple times.
Example:
Recommendation:
We advise the code to either properly claim pending rent, or to track the "calculated" pending rent by the
Basket::_getRentBal
function invocation withinBasket::rebase
operations, ensuring that only newly accumulated rent is tracked in rebase operations.