The updateTaxRate function fails to update the lastUpdated timestamp when changing a landlords tax rate. This can lead to incorrect Schnibble calculations in the _farmPlots function. The impact is particularly significant when dealing with plots that are no longer valid, as the function relies on the outdated lastUpdated timestamp for calculations.
Take a look at updateTaxRate function:
https://github.com/code-423n4/2024-07-munchables/blob/94cf468aaabf526b7a8319f7eba34014ccebe7b9/src/managers/LandManager.sol#L92-L101
This function updates the currentTaxRate but doesnt update the lastUpdated timestamp in plotMetadata.
The problem manifests in the _farmPlots function:
https://github.com/code-423n4/2024-07-munchables/blob/94cf468aaabf526b7a8319f7eba34014ccebe7b9/src/managers/LandManager.sol#L258-L260
Here, for plots that are no longer valid, the function uses plotMetadata[landlord].lastUpdated as the timestamp. If tax rates have changed since the last update which is possible to lastUpdated, this could lead to incorrect Schnibble calculations.
Update the updateTaxRate function to include the lastUpdated timestamp:
