Submitted by kenzo, also found by WatchPug and 0x0x0x
Lock manager can change key pricing.
The refund mechanism calculates refund according to current key price, not price actually paid.
A user refunding can get less (or more) funds than deserved.
Refund only takes the current price into account:
https://github.com/code-423n4/2021-11-unlock/blob/main/smart-contracts/contracts/mixins/MixinRefunds.sol#L144:#L152
Lock manager can update key price at any point, and the old price is not saved anywhere:
https://github.com/code-423n4/2021-11-unlock/blob/main/smart-contracts/contracts/mixins/MixinLockCore.sol#L183
So if for example a key price has gone down, a user who tried to refund will get less funds than deserved.
Consider saving the amount the user paid, and refund according to that.
Or having a kind of a price snapshot/version mechanism.
julien51 (Unlock Protocol) acknowledged, but disagreed with severity and commented:
0xleastwood (judge) decreased severity to Medium and commented:
julien51 (Unlock Protocol) commented:
