Commit a98789a
Sachin
Add delta-neutral basis trading strategy extension contract (#27)
* Add IUniswapV3Quoter interface
* Add WIP basis trading strategy contract
* Add WIP strategy contract unit tests
* Fix bugs in existing contracts and tests
* Refactor setter functions; Add unit tests for setter functions
* Fix getCurrentEtherIncentive; Add tests for withdrawEtherBalance and getCurrentEtherIncentive
* Refactor shouldRebalance; Add tests for shouldRebalance and shouldRebalanceWithBounds
* Refactor getChunkRebalanceNotional; Add tests for getChunkRebalanceNotional
* Fix disengage; Add unit tests for disengage
* Add unit tests for ripcord
* Fix reinvest; Add unit tests for reinvest
* Remove console logs from contract; Fix comments
* Rebase to master
* Add javadocs and missing test cases
* Fix reinvest; Add appropriate revert logic
* Fix coverage; Remove unncessary if block
* Fix compilation
* Fix imports and failing tests
* Fix bug: Update reinvest to onlyAllowedCaller from onlyOperator
* Updated version to 0.0.7-basis.0
* Add suggested changes
* Remove pending todos
* Fix to support all leverages <1, =1, >1; Refactor tests
* Add logic to return reinvest only when reinvestable amount > 0; Add unit tests
* Fix failing tests; Fix unit calculation
* Updated version to 0.0.7-basis.1
* Refactor reinvest
* Verify bytes parameters set in exchange settings
* Update package to 0.0.7-basis.2
* Update version to 0.0.8; Pull latest set-protocol-v2
* Add check for booleans in exchange params
* Add suggested changes
* Deposit unused USDC to Perp after rebalance; Add unit tests for all flows
* Add check for exchange name
* Fix failing tests1 parent f4e1292 commit a98789a
File tree
13 files changed
+5986
-135
lines changed- contracts
- extensions
- interfaces
- test/extensions
- utils
- contracts
- deploys
- flexibleLeverageUtils
13 files changed
+5986
-135
lines changedLines changed: 1554 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
| 676 | + | |
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
758 | 757 | | |
759 | 758 | | |
760 | 759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
0 commit comments