-
Notifications
You must be signed in to change notification settings - Fork 15
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
Spread call/eth #43
base: spread-call/stakedao
Are you sure you want to change the base?
Spread call/eth #43
Conversation
@@ -195,17 +181,17 @@ contract ShortOTokenActionWithSwap is IAction, AirswapBase, RollOverBase { | |||
function flashMintAndSellOToken(uint256 optionsToSell, uint256 premium, address counterparty) external onlyOwner { | |||
//0. Initial Logic Checks | |||
//require(counterparty.add != address(0), "Invalid counterparty address"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probs need to uncomment this and implement a signature scheme to make sure the counterparty is ok with this transaction
IWETH(asset).withdraw(assetToWithdraw); | ||
|
||
// send fee to recipient | ||
(bool success1, ) = feeRecipient.call{ value: fee }(''); | ||
require(success1, 'O9'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could just send fee in ETH, though not a big issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally good direction!
Left some comments to make changes :)
TLDR:
- We should implement a signature scheme to make sure the counterparty approves this particular amount of options, this spread and this premium
- In the tests, since its all in weth and there is no hidden fees, its better to check the exact amount than to estimate / approximate values
Co-authored-by: aparnakr <[email protected]>
Co-authored-by: aparnakr <[email protected]>
Co-authored-by: aparnakr <[email protected]>
Co-authored-by: aparnakr <[email protected]>
* added signature schema * added signature schema * clean eslint * view instead of pure * fixed vault test * fixing coverage test * added MM vault count * removed unused libraries * Update contracts/actions/ShortOTokenActionWithSwap.sol Co-authored-by: aparnakr <[email protected]> * Update contracts/actions/ShortOTokenActionWithSwap.sol Co-authored-by: aparnakr <[email protected]> * added required order > otoken expiry * use only order as param for flashMintAndSellOToken * removed isSenderAuthorized * removed delegated logic * removed kind and id * reanme higherToken insteadof token * removed signerMinimumNonce * removed affiliate * Update contracts/utils/RollOverBase.sol Co-authored-by: aparnakr <[email protected]> Co-authored-by: aparnakr <[email protected]>
No description provided.