aavegotchi / aavegotchi-realm-diamond

23 stars 9 forks source link

Capacity inconsistency in settleUnclaimedAlchemica function #7

Closed mudgen closed 2 years ago

mudgen commented 2 years ago

In the function below, specifically line 22, what if s.parcels[_tokenId].unclaimedAlchemica[_alchemicaType] += alchemicaSinceUpdate; is greater than capacity? That case isn't being handled here but it seems like it should because capacity handling is is being handled on line 19.

https://github.com/aavegotchi/aavegotchi-realm-diamond/blob/cee38d37307c49dc41cdb737a962d5d313c1cd4f/contracts/libraries/LibAlchemica.sol#L9-L27

mudgen commented 2 years ago

Good