code-423n4 / 2021-11-unlock-findings

0 stars 0 forks source link

Wrong comment in recordKeyPurchase #82

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

kenzo

Vulnerability details

recordKeyPurchase has a comment: TODO: actually implement However, it seems to be implemented. I've verified with Julien and indeed it is implemented and should be working. (There are other open TODOs which have a similar message, but are not implemented.)

Proof of Concept

recordKeyPurchase: https://github.com/code-423n4/2021-11-unlock/blob/main/smart-contracts/contracts/Unlock.sol#L287 (Unlike computeAvailableDiscountFor for example which has a similar message but is not implemented: https://github.com/code-423n4/2021-11-unlock/blob/main/smart-contracts/contracts/Unlock.sol#L267 )

Recommended Mitigation Steps

Remove wrong comment. Review all comments in code and make sure they match the implementation.

0xleastwood commented 2 years ago

Marking comments as non-critical from here on.