-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add vault migration logic #530
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
sanandnarayan
force-pushed
the
transfer-vault-with-hedge
branch
from
June 21, 2022 03:50
5d4e4bf
to
1b1613f
Compare
KMKoushik
force-pushed
the
transfer-vault-with-hedge
branch
from
June 21, 2022 04:03
2b5b76a
to
b30eb90
Compare
5 tasks
aparnakr
approved these changes
Jun 21, 2022
sanandnarayan
added a commit
that referenced
this pull request
Jun 21, 2022
tests duplicated for otc hedge; needs cleanup tests cleaned up cleaned up the otc hedge test and got the expected variables ready renamed managerBuyPrice variable name temp commit temp commit reduce trader sell quantity when buy price is greater added time and price threshold checks Fix: ordered the var updates added increasing price check & removed auction uniswap code Removed auctions made the tests pending for the code removed removed auctionTriggerTime from isTimeHege price check for OTC price vs uniswap ran prettier on crab test hege otc ran prettier on crab contract hege otc lint Check all trade pairs are the same added multiple orders as test added test for single order, multiple orders from different people added buyside test for otchedge added checks for traders balance as well nit: trader is now a variable organized the multiple orders test made one testcase more readable with functions added test for manager being able to trade in lesser quantity added test for manager to pass a large sellAmount added test to allow the manager to buy at a greater price added test for lesser quantity and greater price Added test for timeThreshold and priceThresholds ran formatter on test tests for check otc price refactored type and domain data added test for invalid signature i.e a fake order test for manager buy price atleast seller price tests for manager buyer price should be greater than 0 added test for correct formatting of orders removed failing tests added tests for setters and re arranged the crab contract Add vault migration with timelock logic (#530) * Add vault migration logic * rebased on top of otchedgev2 and fixed timelock location and public variable * Fix tests * removed unused code in timelock tests * ran prettier on timelock code * fixed order of tests and small errors Co-authored-by: KMKoushik <koushikmohan1996@gmail.com> removed console.logs and todos and typos format the otc hedge test file
sanandnarayan
added a commit
that referenced
this pull request
Jun 22, 2022
* Init crab v2 * Port v1 tests to v2 * Change CrabStrategyV2 typechain Change CrabStrategyV2 typechain Added otchedge code without test; and removed uniswap/price hedge tests duplicated for otc hedge; needs cleanup tests cleaned up cleaned up the otc hedge test and got the expected variables ready renamed managerBuyPrice variable name temp commit temp commit reduce trader sell quantity when buy price is greater added time and price threshold checks Fix: ordered the var updates added increasing price check & removed auction uniswap code Removed auctions made the tests pending for the code removed removed auctionTriggerTime from isTimeHege price check for OTC price vs uniswap ran prettier on crab test hege otc ran prettier on crab contract hege otc lint Check all trade pairs are the same added multiple orders as test added test for single order, multiple orders from different people added buyside test for otchedge added checks for traders balance as well nit: trader is now a variable organized the multiple orders test made one testcase more readable with functions added test for manager being able to trade in lesser quantity added test for manager to pass a large sellAmount added test to allow the manager to buy at a greater price added test for lesser quantity and greater price Added test for timeThreshold and priceThresholds ran formatter on test tests for check otc price refactored type and domain data added test for invalid signature i.e a fake order test for manager buy price atleast seller price tests for manager buyer price should be greater than 0 added test for correct formatting of orders removed failing tests added tests for setters and re arranged the crab contract Add vault migration with timelock logic (#530) * Add vault migration logic * rebased on top of otchedgev2 and fixed timelock location and public variable * Fix tests * removed unused code in timelock tests * ran prettier on timelock code * fixed order of tests and small errors Co-authored-by: KMKoushik <koushikmohan1996@gmail.com> removed console.logs and todos and typos format the otc hedge test file removed console logs on the crabv2 contract removed delta hedge threshold removed unused params and renamed function params resolved name changes per joe removed unused variable; better token checking logic;view functions added removed stale tests and fixed the constructor Change MockTimelock to Timelock in integration tests prettierrc restored to reflect main branch Fix lint issues Price/quantity orders (#536) * added expiries * updated test orders with t+ 10 min expiries * fixed typehash * added expiry to type data in test file * orders with prices * fixed direction of remaining quantity che k * fix natspec * reduced remainingAmounts in hedgeOTC * checks that orders are all in same direction and trading opposite to hedge * passing in flags for _mintWPowerPerp and _burnPowerPerp + naming + revert messages * isHedgeBuying vs isOrderBuying * fixes and lint * added withdrawing weth, initialize current price; fixed 3 tests; * fixed test for allowing to trade lower quantity * formatted the document * fixed test for allowing vault manager to trade more quantity * fixed test for allowing vault manager to buy at greater price * fixed test for allowing vault manager to buy at greater price and specify lesser quanitity * fixed test for high price by manager * fixed test for invalid signature * fixed test for manager price < order price * fixed test for ordering of orders * removed import console Co-authored-by: Anand Narayan <i@codeanand.com>
Merged
sanandnarayan
added a commit
that referenced
this pull request
Jun 22, 2022
* Init crab v2 * Port v1 tests to v2 * Change CrabStrategyV2 typechain Change CrabStrategyV2 typechain Added otchedge code without test; and removed uniswap/price hedge tests duplicated for otc hedge; needs cleanup tests cleaned up cleaned up the otc hedge test and got the expected variables ready renamed managerBuyPrice variable name temp commit temp commit reduce trader sell quantity when buy price is greater added time and price threshold checks Fix: ordered the var updates added increasing price check & removed auction uniswap code Removed auctions made the tests pending for the code removed removed auctionTriggerTime from isTimeHege price check for OTC price vs uniswap ran prettier on crab test hege otc ran prettier on crab contract hege otc lint Check all trade pairs are the same added multiple orders as test added test for single order, multiple orders from different people added buyside test for otchedge added checks for traders balance as well nit: trader is now a variable organized the multiple orders test made one testcase more readable with functions added test for manager being able to trade in lesser quantity added test for manager to pass a large sellAmount added test to allow the manager to buy at a greater price added test for lesser quantity and greater price Added test for timeThreshold and priceThresholds ran formatter on test tests for check otc price refactored type and domain data added test for invalid signature i.e a fake order test for manager buy price atleast seller price tests for manager buyer price should be greater than 0 added test for correct formatting of orders removed failing tests added tests for setters and re arranged the crab contract Add vault migration with timelock logic (#530) * Add vault migration logic * rebased on top of otchedgev2 and fixed timelock location and public variable * Fix tests * removed unused code in timelock tests * ran prettier on timelock code * fixed order of tests and small errors Co-authored-by: KMKoushik <koushikmohan1996@gmail.com> removed console.logs and todos and typos format the otc hedge test file removed console logs on the crabv2 contract removed delta hedge threshold removed unused params and renamed function params resolved name changes per joe removed unused variable; better token checking logic;view functions added removed stale tests and fixed the constructor Change MockTimelock to Timelock in integration tests prettierrc restored to reflect main branch Fix lint issues Price/quantity orders (#536) * added expiries * updated test orders with t+ 10 min expiries * fixed typehash * added expiry to type data in test file * orders with prices * fixed direction of remaining quantity che k * fix natspec * reduced remainingAmounts in hedgeOTC * checks that orders are all in same direction and trading opposite to hedge * passing in flags for _mintWPowerPerp and _burnPowerPerp + naming + revert messages * isHedgeBuying vs isOrderBuying * fixes and lint * added withdrawing weth, initialize current price; fixed 3 tests; * fixed test for allowing to trade lower quantity * formatted the document * fixed test for allowing vault manager to trade more quantity * fixed test for allowing vault manager to buy at greater price * fixed test for allowing vault manager to buy at greater price and specify lesser quanitity * fixed test for high price by manager * fixed test for invalid signature * fixed test for manager price < order price * fixed test for ordering of orders * removed import console Co-authored-by: Anand Narayan <i@codeanand.com>
sanandnarayan
added a commit
that referenced
this pull request
Jun 22, 2022
* Init crab v2 (#517) * Init crab v2 * Port v1 tests to v2 * Change CrabStrategyV2 typechain Change CrabStrategyV2 typechain Added otchedge code without test; and removed uniswap/price hedge tests duplicated for otc hedge; needs cleanup tests cleaned up cleaned up the otc hedge test and got the expected variables ready renamed managerBuyPrice variable name temp commit temp commit reduce trader sell quantity when buy price is greater added time and price threshold checks Fix: ordered the var updates added increasing price check & removed auction uniswap code Removed auctions made the tests pending for the code removed removed auctionTriggerTime from isTimeHege price check for OTC price vs uniswap ran prettier on crab test hege otc ran prettier on crab contract hege otc lint Check all trade pairs are the same added multiple orders as test added test for single order, multiple orders from different people added buyside test for otchedge added checks for traders balance as well nit: trader is now a variable organized the multiple orders test made one testcase more readable with functions added test for manager being able to trade in lesser quantity added test for manager to pass a large sellAmount added test to allow the manager to buy at a greater price added test for lesser quantity and greater price Added test for timeThreshold and priceThresholds ran formatter on test tests for check otc price refactored type and domain data added test for invalid signature i.e a fake order test for manager buy price atleast seller price tests for manager buyer price should be greater than 0 added test for correct formatting of orders removed failing tests added tests for setters and re arranged the crab contract Add vault migration with timelock logic (#530) * Add vault migration logic * rebased on top of otchedgev2 and fixed timelock location and public variable * Fix tests * removed unused code in timelock tests * ran prettier on timelock code * fixed order of tests and small errors Co-authored-by: KMKoushik <koushikmohan1996@gmail.com> removed console.logs and todos and typos format the otc hedge test file removed console logs on the crabv2 contract removed delta hedge threshold removed unused params and renamed function params resolved name changes per joe removed unused variable; better token checking logic;view functions added removed stale tests and fixed the constructor Change MockTimelock to Timelock in integration tests prettierrc restored to reflect main branch Fix lint issues Price/quantity orders (#536) * added expiries * updated test orders with t+ 10 min expiries * fixed typehash * added expiry to type data in test file * orders with prices * fixed direction of remaining quantity che k * fix natspec * reduced remainingAmounts in hedgeOTC * checks that orders are all in same direction and trading opposite to hedge * passing in flags for _mintWPowerPerp and _burnPowerPerp + naming + revert messages * isHedgeBuying vs isOrderBuying * fixes and lint * added withdrawing weth, initialize current price; fixed 3 tests; * fixed test for allowing to trade lower quantity * formatted the document * fixed test for allowing vault manager to trade more quantity * fixed test for allowing vault manager to buy at greater price * fixed test for allowing vault manager to buy at greater price and specify lesser quanitity * fixed test for high price by manager * fixed test for invalid signature * fixed test for manager price < order price * fixed test for ordering of orders * removed import console Co-authored-by: Anand Narayan <i@codeanand.com> * removed comments and unused tests Co-authored-by: KM Koushik <koushikmohan1996@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge @KMKoushik transfer vault with anand's otc hedge code