Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Upgraded Q -> M from 307 [1655245513660] #345

Closed
code423n4 opened this issue Jun 14, 2022 · 1 comment
Closed

Upgraded Q -> M from 307 [1655245513660] #345

code423n4 opened this issue Jun 14, 2022 · 1 comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists upgraded by judge

Comments

@code423n4
Copy link
Contributor

code423n4 commented Jun 14, 2022

Judge has assessed an item in Issue #307 as Medium risk. The relevant finding follows:

(Low) feeRate can be modified for existing vaults

feeRate is a parameter that controls the fee applied on exercise. It can be set by the function:

function setFee(uint256 feeRate_) external onlyOwner {
    feeRate = feeRate_; 
} 

So it can be changed by the owner at any time, changing also the fee payed by existing vaults.

Proof of concept

Alice is a trader looking for a delta neutral position on her NFTs. She opens a vault with strike 10 ETH and fee 0.5%. She's happy getting 9.95 ETH if the option is exercised. During the call lifetime the fee gets increased up to 1%. Now Alice will get 9.90 ETH, an amount which may bring her EV negative.

Recommendations

It's suggested to save feeRate into a vault struct during createVault or buyOption. This value can then be used during exercise instead of the global variable.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working upgraded by judge labels Jun 14, 2022
code423n4 added a commit that referenced this issue Jun 14, 2022
@HardlyDifficult HardlyDifficult added the duplicate This issue or pull request already exists label Jun 14, 2022
@HardlyDifficult
Copy link
Collaborator

Dupe of #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists upgraded by judge
Projects
None yet
Development

No branches or pull requests

2 participants