Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

QA Report #276

Open
code423n4 opened this issue May 14, 2022 · 1 comment
Open

QA Report #276

code423n4 opened this issue May 14, 2022 · 1 comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

1st issue : Wrong revert comment

In L169, the revert comment should be "Reserve strike too large"

2nd issue : Error in calculation of fee

While calculating fee, in the block L282-L286, the calculation doesn't take into account for smaller feeRate and vault.currentStrike.
Because , when the vault.currentStrike < 1e17 and feeRate == 1 , in that case calculated fee becomes 0. So no fee is required for while exercising options bought at that price, and feerate.

3rd issue : No max limit on fee

There is no max limit set on the fee rate, as seen in the setFee function L119-L121
Due to this a malicious owner can set a high feerate and cause griefing to it's users.

4th issue : Use of block.timestamp

block.timestamp can be manipulated by miners.
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L228

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels May 14, 2022
code423n4 added a commit that referenced this issue May 14, 2022
@outdoteth
Copy link
Collaborator

this can be bumped to medium severity:
3rd issue : No max limit on fee: #48

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

2 participants