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

Spread call/eth #43

Open
wants to merge 8 commits into
base: spread-call/stakedao
Choose a base branch
from
Open

Spread call/eth #43

wants to merge 8 commits into from

Conversation

ugolino
Copy link

@ugolino ugolino commented Nov 29, 2021

No description provided.

@ugolino ugolino requested a review from aparnakr November 29, 2021 20:00
@@ -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");
Copy link
Contributor

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

Comment on lines +226 to 230
IWETH(asset).withdraw(assetToWithdraw);

// send fee to recipient
(bool success1, ) = feeRecipient.call{ value: fee }('');
require(success1, 'O9');
Copy link
Contributor

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

Copy link
Contributor

@aparnakr aparnakr left a 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:

  1. We should implement a signature scheme to make sure the counterparty approves this particular amount of options, this spread and this premium
  2. 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

ugolino and others added 6 commits November 30, 2021 22:32
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants