-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BRAH-70] Add Lyra Avalon Integration #49
base: master
Are you sure you want to change the base?
Conversation
[BRAH-151] lyra pricing
contracts/LyraL2/LyraController.sol
Outdated
|
||
if (positionData.state == LyraAdapter.PositionState.ACTIVE) { | ||
(uint256 callPremium, uint256 putPremium) = LyraAdapter | ||
._getPurePremiumForStrike(currentPosition.strikeId); |
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.
@Bapi-Reddy this wont work for getting option price. What do we do in this case? For position in want token
sUSD.approve(address(lyraOptionMarket), sUSDBal); | ||
|
||
if (updateExistingPosition) { | ||
optionType = currentPosition.optionType; |
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.
update the previous purchased option amounts
|
||
sUSD.approve(address(lyraOptionMarket), sUSDBal); | ||
|
||
if (updateExistingPosition) { |
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.
test this condition in unit tests
"NOT_ENOUGH_TOKENS" | ||
); | ||
|
||
if (amountOut > 0) { |
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.
add a unit test for amountOut
== 0
INonfungiblePositionManager public constant nonfungiblePositionManager = | ||
INonfungiblePositionManager(0xC36442b4a4522E871399CD717aBDD847Ab11FE88); |
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.
remove this
@@ -0,0 +1,73 @@ | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
pragma solidity ^0.8.0; |
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.
remove this file
No description provided.