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

fix(PerpV2BasisTradingModule): bytecode size limit bug #200

Merged
merged 29 commits into from
Mar 18, 2022

Conversation

0xSachinK
Copy link
Contributor

@0xSachinK 0xSachinK commented Mar 9, 2022

Bytecode Sizes

Limit: 24,567 bytes

Master Branch

PerpV2LeverageModule: 23,970 bytes
PerpV2BasisTradingModule: 27,499 bytes

Current Branch

PerpV2LeverageModule: 23,970 bytes
PerpV2LeverageModuleV2: 20,680 bytes
PerpV2BasisTradingModule: 24,339 bytes

ChangeLog

  • Create V2 versions of Position library, PerpV2 library, PerpV2LeverageModule, named PositionV2, PerpV2LibraryV2 and PerpV2LeverageModuleV2 respectively.
  • PositionV2 is a linkable library and contains external/public versions of functions available in Position.
  • PerpV2LibraryV2 contains executeTrade and simulateTrade generic functions, moved over from PerpV2LeverageModule.
  • New PerpV2Positions library contains generic getter functions, getNetQuoteBalance, getPositionUnitInfo and getPositionNotionalInfo, moved over from PerpV2LeverageModule.
  • ModuleBaseV2 uses the new PositionV2 library contract.
  • PerpV2LeverageModuleV2 extends ModuleBaseV2 and uses the new libraries, and thus has a smaller bytecode size than PerpV2LeverageModule.
  • PerpV2BasisTradingModule now extends PerpV2LeverageModuleV2 instead of the V1 version.

Diffs

Todo

  • Fix hardhat config file
  • Fix existing flaky tests
  • Specify security aspects of PositionV2
  • Move formatAdjustments to a new library contract to decrease it further (Don't pass in components as a parameter).

Tests

  • PositionV2 library
  • ModuleBaseV2 library
  • PerpV2LibraryV2 library
  • PerpV2Positions library
  • PerpV2LeverageModuleV2
  • PerpV2BasisTradingModule

Security

0xSachinK added 3 commits March 9, 2022 22:50
Add hardhat-contract-sizer as dev dependency
Add PerpV2Positions library
Add functions to PerpV2 library
Modify PerpV2LeverageModuel to use the new libraries
Fix existing interfaces
@0xSachinK 0xSachinK changed the title Set allowUnlimitedContractSize to false Fix PerpV2BasisTradingModule bytecode size limit bug Mar 11, 2022
contracts/interfaces/external/perp-v2/IMarketRegistry.sol Outdated Show resolved Hide resolved
contracts/protocol/integration/lib/PerpV2.sol Outdated Show resolved Hide resolved
contracts/protocol/modules/PerpV2LeverageModule.sol Outdated Show resolved Hide resolved
contracts/protocol/modules/PerpV2LeverageModule.sol Outdated Show resolved Hide resolved
contracts/protocol/modules/PerpV2LeverageModule.sol Outdated Show resolved Hide resolved
contracts/protocol/modules/PerpV2LeverageModule.sol Outdated Show resolved Hide resolved
hardhat.config.ts Outdated Show resolved Hide resolved
@cgewecke cgewecke changed the title Fix PerpV2BasisTradingModule bytecode size limit bug fix(PerpV2BasisTradingModule): bytecode size limit bug Mar 15, 2022
@@ -30,6 +30,7 @@ import { IClearingHouseConfig } from "../interfaces/external/perp-v2/IClearingHo
import { IIndexPrice } from "../interfaces/external/perp-v2/IIndexPrice.sol";
import { IPerpV2LeverageModule } from "../interfaces/IPerpV2LeverageModule.sol";
import { ISetToken } from "../interfaces/ISetToken.sol";
import { PerpV2Positions } from "../protocol/integration/lib/PerpV2Positions.sol";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should be able to still use the same viewer and not to redeploy. Are there anymore end points we can add here that the front end may need?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use the current viewer as it has the module from which it is fetching data as a state variable set to PerpV2LeverageModule in the constructor. We would need to write a new V2 viewer contract, which accepts the module to fetch data from in every function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: We are not gonna write a new contract. Just redeploy another viewer contract and point it to BasisTradingModule.

contracts/protocol/integration/lib/PerpV2LibraryV2.sol Outdated Show resolved Hide resolved
contracts/protocol/integration/lib/PerpV2Positions.sol Outdated Show resolved Hide resolved
contracts/protocol/modules/DebtIssuanceModuleV2.sol Outdated Show resolved Hide resolved
contracts/protocol/lib/PositionV2.sol Outdated Show resolved Hide resolved
contracts/protocol/lib/ModuleBaseV2.sol Outdated Show resolved Hide resolved
contracts/protocol/integration/lib/PerpV2LibraryV2.sol Outdated Show resolved Hide resolved
@0xSachinK 0xSachinK requested a review from bweick March 17, 2022 17:45
@0xSachinK 0xSachinK merged commit ddfab38 into master Mar 18, 2022
@0xSachinK 0xSachinK deleted the sachin/update-allowUnlimitedContractSize branch March 18, 2022 04:05
@cgewecke
Copy link
Contributor

🎉 This PR is included in version 0.2.0-hhat.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

cgewecke pushed a commit that referenced this pull request Mar 21, 2022
# [0.2.0](v0.1.15...v0.2.0) (2022-03-21)

### Bug Fixes

* **build:** Upgrade eslint-plugin-jsdoc to latest ([#228](#228)) ([f5758d2](f5758d2))
* **PerpV2BasisTradingModule:** bytecode size limit bug ([#200](#200)) ([ddfab38](ddfab38))

### Features

* **publishing:** Auto publish repository to npm in CI [SIM-123] ([#203](#203)) ([8ddbbf1](8ddbbf1))
ckoopmann pushed a commit to IndexCoop/index-protocol that referenced this pull request Oct 4, 2022
# 1.0.0 (2022-10-04)

### Bug Fixes

* **adapter:** Support Curve stableswap pools ([SetProtocol#253](https://github.com/IndexCoop/index-protocol/issues/253)) ([777ed94](777ed94))
* add proper tests, require statements for sellTokenForToken ([5c84995](5c84995))
* address review feedback ([5c6fcfc](5c6fcfc))
* **build:** Upgrade eslint-plugin-jsdoc to latest ([SetProtocol#228](https://github.com/IndexCoop/index-protocol/issues/228)) ([f5758d2](f5758d2))
* **interfaces:** add IAirdropModule, IClaimModule, and IWrapModuleV2 ([SetProtocol#252](https://github.com/IndexCoop/index-protocol/issues/252)) ([6999e84](6999e84))
* **interfaces:** Add protocol interfaces for set-v2-strategies [SIM-124] ([SetProtocol#226](https://github.com/IndexCoop/index-protocol/issues/226)) ([0bd5ca4](0bd5ca4))
* **IPerpV2BasisTradingModule:** Improve javadocs [SetProtocol#246](https://github.com/IndexCoop/index-protocol/issues/246) ([3129b37](3129b37))
* **NotionalTradeModule:** audit adjustments ([de39ee1](de39ee1))
* **PerpV2BasisTradingModule:** bytecode size limit bug ([SetProtocol#200](https://github.com/IndexCoop/index-protocol/issues/200)) ([ddfab38](ddfab38))
* **PerpV2BasisTradingModule:** Expose getter to fetch updated settled funding ([SetProtocol#244](https://github.com/IndexCoop/index-protocol/issues/244)) ([f215147](f215147))
* **PerpV2BasisTradingModule:** External audit fixes for low-risk findings and Internal audit fixes ([SetProtocol#232](https://github.com/IndexCoop/index-protocol/issues/232)) ([d7d37da](d7d37da)), closes [SetProtocol#243](https://github.com/IndexCoop/index-protocol/issues/243)
* **PerpV2LeverageModuleV2:** Round up during withdraw ([SetProtocol#249](https://github.com/IndexCoop/index-protocol/issues/249)) ([7780963](7780963))
* remove incorrect require check for sellEthForTokenToUniswapV3 ([7f8048d](7f8048d))
* sellEthForTokenToUniswapV3 impl and address review comments ([73ea7b3](73ea7b3))
* **SlippageIssuanceModule:** Fix issuance & redemption flows to not update position units ([SetProtocol#254](https://github.com/IndexCoop/index-protocol/issues/254)) ([9be3d1b](9be3d1b))
* **tests:** Add Hardhat deployment subgraph test scripts  ([SetProtocol#242](https://github.com/IndexCoop/index-protocol/issues/242)) ([0aa0d14](0aa0d14))
* **utils:** Port StringArrayUtils from set-v2-strategies [SIM-124] ([SetProtocol#227](https://github.com/IndexCoop/index-protocol/issues/227)) ([dbf6c04](dbf6c04))

### Features

* **adapter:** Add Curve trade adapter [SIM-173] ([SetProtocol#238](https://github.com/IndexCoop/index-protocol/issues/238)) ([f697783](f697783))
* **adapter:** Add RGT to Tribe migration adapter [SIM-52] ([SetProtocol#188](https://github.com/IndexCoop/index-protocol/issues/188)) ([ca5c2ab](ca5c2ab))
* add direct RFQT fill suport to ZeroExApiAdapter [SIM-230] ([SetProtocol#241](https://github.com/IndexCoop/index-protocol/issues/241)) ([f4b976e](f4b976e))
* **BytesArrayUtils:** Add BytesArrayUtils library ([SetProtocol#248](https://github.com/IndexCoop/index-protocol/issues/248)) ([7b35392](7b35392))
* **deprecation:** Consolidate or remove deprecated contracts [SIM-124] ([SetProtocol#225](https://github.com/IndexCoop/index-protocol/issues/225)) ([579852a](579852a))
* implement sellTokenForEthToUniswapV3 and sellEthForTokenToUniswapV3 ([2296f6e](2296f6e))
* initial stab at Uniswap V3 adaptor ([c25665b](c25665b))
* **Intefaces:** Add basis trading module interfaces ([SetProtocol#237](https://github.com/IndexCoop/index-protocol/issues/237)) ([c7af322](c7af322))
* **module:** Notional Trade Module ([SetProtocol#251](https://github.com/IndexCoop/index-protocol/issues/251)) ([49bdf46](49bdf46))
* **publishing:** Auto publish repository to npm in CI [SIM-123] ([SetProtocol#203](https://github.com/IndexCoop/index-protocol/issues/203)) ([8ddbbf1](8ddbbf1))
* **reorg:** Re-org modules into v1 and v2 directories ([SetProtocol#230](https://github.com/IndexCoop/index-protocol/issues/230)) ([d43df0c](d43df0c))
* **UniswapV3ExchangeAdapterV2:** Add UniswapV3ExchangeAdapterV2 exchange adapter ([SetProtocol#240](https://github.com/IndexCoop/index-protocol/issues/240)) ([b4d95ca](b4d95ca))
* verify path for multiple hops ([06ca9b6](06ca9b6))
* verify uniswap path for single hops WIP ([7905d73](7905d73))
ckoopmann pushed a commit to IndexCoop/index-protocol that referenced this pull request Oct 4, 2022
# 1.0.0 (2022-10-04)

### Bug Fixes

* **adapter:** Support Curve stableswap pools ([SetProtocol#253](https://github.com/IndexCoop/index-protocol/issues/253)) ([777ed94](777ed94))
* add proper tests, require statements for sellTokenForToken ([5c84995](5c84995))
* address review feedback ([5c6fcfc](5c6fcfc))
* **build:** Upgrade eslint-plugin-jsdoc to latest ([SetProtocol#228](https://github.com/IndexCoop/index-protocol/issues/228)) ([f5758d2](f5758d2))
* **interfaces:** add IAirdropModule, IClaimModule, and IWrapModuleV2 ([SetProtocol#252](https://github.com/IndexCoop/index-protocol/issues/252)) ([6999e84](6999e84))
* **interfaces:** Add protocol interfaces for set-v2-strategies [SIM-124] ([SetProtocol#226](https://github.com/IndexCoop/index-protocol/issues/226)) ([0bd5ca4](0bd5ca4))
* **IPerpV2BasisTradingModule:** Improve javadocs [SetProtocol#246](https://github.com/IndexCoop/index-protocol/issues/246) ([3129b37](3129b37))
* **NotionalTradeModule:** audit adjustments ([de39ee1](de39ee1))
* **PerpV2BasisTradingModule:** bytecode size limit bug ([SetProtocol#200](https://github.com/IndexCoop/index-protocol/issues/200)) ([ddfab38](ddfab38))
* **PerpV2BasisTradingModule:** Expose getter to fetch updated settled funding ([SetProtocol#244](https://github.com/IndexCoop/index-protocol/issues/244)) ([f215147](f215147))
* **PerpV2BasisTradingModule:** External audit fixes for low-risk findings and Internal audit fixes ([SetProtocol#232](https://github.com/IndexCoop/index-protocol/issues/232)) ([d7d37da](d7d37da)), closes [SetProtocol#243](https://github.com/IndexCoop/index-protocol/issues/243)
* **PerpV2LeverageModuleV2:** Round up during withdraw ([SetProtocol#249](https://github.com/IndexCoop/index-protocol/issues/249)) ([7780963](7780963))
* remove incorrect require check for sellEthForTokenToUniswapV3 ([7f8048d](7f8048d))
* sellEthForTokenToUniswapV3 impl and address review comments ([73ea7b3](73ea7b3))
* **SlippageIssuanceModule:** Fix issuance & redemption flows to not update position units ([SetProtocol#254](https://github.com/IndexCoop/index-protocol/issues/254)) ([9be3d1b](9be3d1b))
* **tests:** Add Hardhat deployment subgraph test scripts  ([SetProtocol#242](https://github.com/IndexCoop/index-protocol/issues/242)) ([0aa0d14](0aa0d14))
* **utils:** Port StringArrayUtils from set-v2-strategies [SIM-124] ([SetProtocol#227](https://github.com/IndexCoop/index-protocol/issues/227)) ([dbf6c04](dbf6c04))

### Features

* **adapter:** Add Curve trade adapter [SIM-173] ([SetProtocol#238](https://github.com/IndexCoop/index-protocol/issues/238)) ([f697783](f697783))
* **adapter:** Add RGT to Tribe migration adapter [SIM-52] ([SetProtocol#188](https://github.com/IndexCoop/index-protocol/issues/188)) ([ca5c2ab](ca5c2ab))
* add direct RFQT fill suport to ZeroExApiAdapter [SIM-230] ([SetProtocol#241](https://github.com/IndexCoop/index-protocol/issues/241)) ([f4b976e](f4b976e))
* **BytesArrayUtils:** Add BytesArrayUtils library ([SetProtocol#248](https://github.com/IndexCoop/index-protocol/issues/248)) ([7b35392](7b35392))
* **deprecation:** Consolidate or remove deprecated contracts [SIM-124] ([SetProtocol#225](https://github.com/IndexCoop/index-protocol/issues/225)) ([579852a](579852a))
* implement sellTokenForEthToUniswapV3 and sellEthForTokenToUniswapV3 ([2296f6e](2296f6e))
* initial stab at Uniswap V3 adaptor ([c25665b](c25665b))
* **Intefaces:** Add basis trading module interfaces ([SetProtocol#237](https://github.com/IndexCoop/index-protocol/issues/237)) ([c7af322](c7af322))
* **module:** Notional Trade Module ([SetProtocol#251](https://github.com/IndexCoop/index-protocol/issues/251)) ([49bdf46](49bdf46))
* **publishing:** Auto publish repository to npm in CI [SIM-123] ([SetProtocol#203](https://github.com/IndexCoop/index-protocol/issues/203)) ([8ddbbf1](8ddbbf1))
* **reorg:** Re-org modules into v1 and v2 directories ([SetProtocol#230](https://github.com/IndexCoop/index-protocol/issues/230)) ([d43df0c](d43df0c))
* **UniswapV3ExchangeAdapterV2:** Add UniswapV3ExchangeAdapterV2 exchange adapter ([SetProtocol#240](https://github.com/IndexCoop/index-protocol/issues/240)) ([b4d95ca](b4d95ca))
* verify path for multiple hops ([06ca9b6](06ca9b6))
* verify uniswap path for single hops WIP ([7905d73](7905d73))
ckoopmann pushed a commit to IndexCoop/index-protocol that referenced this pull request Oct 5, 2022
# 1.0.0 (2022-10-05)

### Bug Fixes

* **adapter:** Support Curve stableswap pools ([SetProtocol#253](https://github.com/IndexCoop/index-protocol/issues/253)) ([777ed94](777ed94))
* add proper tests, require statements for sellTokenForToken ([5c84995](5c84995))
* address review feedback ([5c6fcfc](5c6fcfc))
* **build:** Upgrade eslint-plugin-jsdoc to latest ([SetProtocol#228](https://github.com/IndexCoop/index-protocol/issues/228)) ([f5758d2](f5758d2))
* **interfaces:** add IAirdropModule, IClaimModule, and IWrapModuleV2 ([SetProtocol#252](https://github.com/IndexCoop/index-protocol/issues/252)) ([6999e84](6999e84))
* **interfaces:** Add protocol interfaces for set-v2-strategies [SIM-124] ([SetProtocol#226](https://github.com/IndexCoop/index-protocol/issues/226)) ([0bd5ca4](0bd5ca4))
* **IPerpV2BasisTradingModule:** Improve javadocs [SetProtocol#246](https://github.com/IndexCoop/index-protocol/issues/246) ([3129b37](3129b37))
* **NotionalTradeModule:** audit adjustments ([de39ee1](de39ee1))
* **PerpV2BasisTradingModule:** bytecode size limit bug ([SetProtocol#200](https://github.com/IndexCoop/index-protocol/issues/200)) ([ddfab38](ddfab38))
* **PerpV2BasisTradingModule:** Expose getter to fetch updated settled funding ([SetProtocol#244](https://github.com/IndexCoop/index-protocol/issues/244)) ([f215147](f215147))
* **PerpV2BasisTradingModule:** External audit fixes for low-risk findings and Internal audit fixes ([SetProtocol#232](https://github.com/IndexCoop/index-protocol/issues/232)) ([d7d37da](d7d37da)), closes [SetProtocol#243](https://github.com/IndexCoop/index-protocol/issues/243)
* **PerpV2LeverageModuleV2:** Round up during withdraw ([SetProtocol#249](https://github.com/IndexCoop/index-protocol/issues/249)) ([7780963](7780963))
* remove incorrect require check for sellEthForTokenToUniswapV3 ([7f8048d](7f8048d))
* sellEthForTokenToUniswapV3 impl and address review comments ([73ea7b3](73ea7b3))
* **SlippageIssuanceModule:** Fix issuance & redemption flows to not update position units ([SetProtocol#254](https://github.com/IndexCoop/index-protocol/issues/254)) ([9be3d1b](9be3d1b))
* **tests:** Add Hardhat deployment subgraph test scripts  ([SetProtocol#242](https://github.com/IndexCoop/index-protocol/issues/242)) ([0aa0d14](0aa0d14))
* **utils:** Port StringArrayUtils from set-v2-strategies [SIM-124] ([SetProtocol#227](https://github.com/IndexCoop/index-protocol/issues/227)) ([dbf6c04](dbf6c04))

### Features

* **adapter:** Add Curve trade adapter [SIM-173] ([SetProtocol#238](https://github.com/IndexCoop/index-protocol/issues/238)) ([f697783](f697783))
* **adapter:** Add RGT to Tribe migration adapter [SIM-52] ([SetProtocol#188](https://github.com/IndexCoop/index-protocol/issues/188)) ([ca5c2ab](ca5c2ab))
* add direct RFQT fill suport to ZeroExApiAdapter [SIM-230] ([SetProtocol#241](https://github.com/IndexCoop/index-protocol/issues/241)) ([f4b976e](f4b976e))
* **BytesArrayUtils:** Add BytesArrayUtils library ([SetProtocol#248](https://github.com/IndexCoop/index-protocol/issues/248)) ([7b35392](7b35392))
* **deprecation:** Consolidate or remove deprecated contracts [SIM-124] ([SetProtocol#225](https://github.com/IndexCoop/index-protocol/issues/225)) ([579852a](579852a))
* implement sellTokenForEthToUniswapV3 and sellEthForTokenToUniswapV3 ([2296f6e](2296f6e))
* initial stab at Uniswap V3 adaptor ([c25665b](c25665b))
* **Intefaces:** Add basis trading module interfaces ([SetProtocol#237](https://github.com/IndexCoop/index-protocol/issues/237)) ([c7af322](c7af322))
* **module:** Notional Trade Module ([SetProtocol#251](https://github.com/IndexCoop/index-protocol/issues/251)) ([49bdf46](49bdf46))
* **publishing:** Auto publish repository to npm in CI [SIM-123] ([SetProtocol#203](https://github.com/IndexCoop/index-protocol/issues/203)) ([8ddbbf1](8ddbbf1))
* **reorg:** Re-org modules into v1 and v2 directories ([SetProtocol#230](https://github.com/IndexCoop/index-protocol/issues/230)) ([d43df0c](d43df0c))
* **UniswapV3ExchangeAdapterV2:** Add UniswapV3ExchangeAdapterV2 exchange adapter ([SetProtocol#240](https://github.com/IndexCoop/index-protocol/issues/240)) ([b4d95ca](b4d95ca))
* verify path for multiple hops ([06ca9b6](06ca9b6))
* verify uniswap path for single hops WIP ([7905d73](7905d73))
ckoopmann pushed a commit to IndexCoop/index-protocol that referenced this pull request Oct 5, 2022
# 1.0.0 (2022-10-05)

### Bug Fixes

* **adapter:** Support Curve stableswap pools ([SetProtocol#253](https://github.com/IndexCoop/index-protocol/issues/253)) ([777ed94](777ed94))
* add proper tests, require statements for sellTokenForToken ([5c84995](5c84995))
* address review feedback ([5c6fcfc](5c6fcfc))
* **build:** Upgrade eslint-plugin-jsdoc to latest ([SetProtocol#228](https://github.com/IndexCoop/index-protocol/issues/228)) ([f5758d2](f5758d2))
* **interfaces:** add IAirdropModule, IClaimModule, and IWrapModuleV2 ([SetProtocol#252](https://github.com/IndexCoop/index-protocol/issues/252)) ([6999e84](6999e84))
* **interfaces:** Add protocol interfaces for set-v2-strategies [SIM-124] ([SetProtocol#226](https://github.com/IndexCoop/index-protocol/issues/226)) ([0bd5ca4](0bd5ca4))
* **IPerpV2BasisTradingModule:** Improve javadocs [SetProtocol#246](https://github.com/IndexCoop/index-protocol/issues/246) ([3129b37](3129b37))
* **NotionalTradeModule:** audit adjustments ([de39ee1](de39ee1))
* **PerpV2BasisTradingModule:** bytecode size limit bug ([SetProtocol#200](https://github.com/IndexCoop/index-protocol/issues/200)) ([ddfab38](ddfab38))
* **PerpV2BasisTradingModule:** Expose getter to fetch updated settled funding ([SetProtocol#244](https://github.com/IndexCoop/index-protocol/issues/244)) ([f215147](f215147))
* **PerpV2BasisTradingModule:** External audit fixes for low-risk findings and Internal audit fixes ([SetProtocol#232](https://github.com/IndexCoop/index-protocol/issues/232)) ([d7d37da](d7d37da)), closes [SetProtocol#243](https://github.com/IndexCoop/index-protocol/issues/243)
* **PerpV2LeverageModuleV2:** Round up during withdraw ([SetProtocol#249](https://github.com/IndexCoop/index-protocol/issues/249)) ([7780963](7780963))
* remove incorrect require check for sellEthForTokenToUniswapV3 ([7f8048d](7f8048d))
* sellEthForTokenToUniswapV3 impl and address review comments ([73ea7b3](73ea7b3))
* **SlippageIssuanceModule:** Fix issuance & redemption flows to not update position units ([SetProtocol#254](https://github.com/IndexCoop/index-protocol/issues/254)) ([9be3d1b](9be3d1b))
* **tests:** Add Hardhat deployment subgraph test scripts  ([SetProtocol#242](https://github.com/IndexCoop/index-protocol/issues/242)) ([0aa0d14](0aa0d14))
* **utils:** Port StringArrayUtils from set-v2-strategies [SIM-124] ([SetProtocol#227](https://github.com/IndexCoop/index-protocol/issues/227)) ([dbf6c04](dbf6c04))

### Features

* **adapter:** Add Curve trade adapter [SIM-173] ([SetProtocol#238](https://github.com/IndexCoop/index-protocol/issues/238)) ([f697783](f697783))
* **adapter:** Add RGT to Tribe migration adapter [SIM-52] ([SetProtocol#188](https://github.com/IndexCoop/index-protocol/issues/188)) ([ca5c2ab](ca5c2ab))
* add direct RFQT fill suport to ZeroExApiAdapter [SIM-230] ([SetProtocol#241](https://github.com/IndexCoop/index-protocol/issues/241)) ([f4b976e](f4b976e))
* **BytesArrayUtils:** Add BytesArrayUtils library ([SetProtocol#248](https://github.com/IndexCoop/index-protocol/issues/248)) ([7b35392](7b35392))
* **deprecation:** Consolidate or remove deprecated contracts [SIM-124] ([SetProtocol#225](https://github.com/IndexCoop/index-protocol/issues/225)) ([579852a](579852a))
* implement sellTokenForEthToUniswapV3 and sellEthForTokenToUniswapV3 ([2296f6e](2296f6e))
* initial stab at Uniswap V3 adaptor ([c25665b](c25665b))
* **Intefaces:** Add basis trading module interfaces ([SetProtocol#237](https://github.com/IndexCoop/index-protocol/issues/237)) ([c7af322](c7af322))
* **module:** Notional Trade Module ([SetProtocol#251](https://github.com/IndexCoop/index-protocol/issues/251)) ([49bdf46](49bdf46))
* **publishing:** Auto publish repository to npm in CI [SIM-123] ([SetProtocol#203](https://github.com/IndexCoop/index-protocol/issues/203)) ([8ddbbf1](8ddbbf1))
* **reorg:** Re-org modules into v1 and v2 directories ([SetProtocol#230](https://github.com/IndexCoop/index-protocol/issues/230)) ([d43df0c](d43df0c))
* **UniswapV3ExchangeAdapterV2:** Add UniswapV3ExchangeAdapterV2 exchange adapter ([SetProtocol#240](https://github.com/IndexCoop/index-protocol/issues/240)) ([b4d95ca](b4d95ca))
* verify path for multiple hops ([06ca9b6](06ca9b6))
* verify uniswap path for single hops WIP ([7905d73](7905d73))
ckoopmann pushed a commit to IndexCoop/index-protocol that referenced this pull request Oct 5, 2022
# 1.0.0 (2022-10-05)

### Bug Fixes

* **adapter:** Support Curve stableswap pools ([SetProtocol#253](https://github.com/IndexCoop/index-protocol/issues/253)) ([777ed94](777ed94))
* add proper tests, require statements for sellTokenForToken ([5c84995](5c84995))
* address review feedback ([5c6fcfc](5c6fcfc))
* **build:** Upgrade eslint-plugin-jsdoc to latest ([SetProtocol#228](https://github.com/IndexCoop/index-protocol/issues/228)) ([f5758d2](f5758d2))
* **interfaces:** add IAirdropModule, IClaimModule, and IWrapModuleV2 ([SetProtocol#252](https://github.com/IndexCoop/index-protocol/issues/252)) ([6999e84](6999e84))
* **interfaces:** Add protocol interfaces for set-v2-strategies [SIM-124] ([SetProtocol#226](https://github.com/IndexCoop/index-protocol/issues/226)) ([0bd5ca4](0bd5ca4))
* **IPerpV2BasisTradingModule:** Improve javadocs [SetProtocol#246](https://github.com/IndexCoop/index-protocol/issues/246) ([3129b37](3129b37))
* **NotionalTradeModule:** audit adjustments ([de39ee1](de39ee1))
* **PerpV2BasisTradingModule:** bytecode size limit bug ([SetProtocol#200](https://github.com/IndexCoop/index-protocol/issues/200)) ([ddfab38](ddfab38))
* **PerpV2BasisTradingModule:** Expose getter to fetch updated settled funding ([SetProtocol#244](https://github.com/IndexCoop/index-protocol/issues/244)) ([f215147](f215147))
* **PerpV2BasisTradingModule:** External audit fixes for low-risk findings and Internal audit fixes ([SetProtocol#232](https://github.com/IndexCoop/index-protocol/issues/232)) ([d7d37da](d7d37da)), closes [SetProtocol#243](https://github.com/IndexCoop/index-protocol/issues/243)
* **PerpV2LeverageModuleV2:** Round up during withdraw ([SetProtocol#249](https://github.com/IndexCoop/index-protocol/issues/249)) ([7780963](7780963))
* remove incorrect require check for sellEthForTokenToUniswapV3 ([7f8048d](7f8048d))
* sellEthForTokenToUniswapV3 impl and address review comments ([73ea7b3](73ea7b3))
* **SlippageIssuanceModule:** Fix issuance & redemption flows to not update position units ([SetProtocol#254](https://github.com/IndexCoop/index-protocol/issues/254)) ([9be3d1b](9be3d1b))
* **tests:** Add Hardhat deployment subgraph test scripts  ([SetProtocol#242](https://github.com/IndexCoop/index-protocol/issues/242)) ([0aa0d14](0aa0d14))
* **utils:** Port StringArrayUtils from set-v2-strategies [SIM-124] ([SetProtocol#227](https://github.com/IndexCoop/index-protocol/issues/227)) ([dbf6c04](dbf6c04))

### Features

* **adapter:** Add Curve trade adapter [SIM-173] ([SetProtocol#238](https://github.com/IndexCoop/index-protocol/issues/238)) ([f697783](f697783))
* **adapter:** Add RGT to Tribe migration adapter [SIM-52] ([SetProtocol#188](https://github.com/IndexCoop/index-protocol/issues/188)) ([ca5c2ab](ca5c2ab))
* add direct RFQT fill suport to ZeroExApiAdapter [SIM-230] ([SetProtocol#241](https://github.com/IndexCoop/index-protocol/issues/241)) ([f4b976e](f4b976e))
* **BytesArrayUtils:** Add BytesArrayUtils library ([SetProtocol#248](https://github.com/IndexCoop/index-protocol/issues/248)) ([7b35392](7b35392))
* **deprecation:** Consolidate or remove deprecated contracts [SIM-124] ([SetProtocol#225](https://github.com/IndexCoop/index-protocol/issues/225)) ([579852a](579852a))
* implement sellTokenForEthToUniswapV3 and sellEthForTokenToUniswapV3 ([2296f6e](2296f6e))
* initial stab at Uniswap V3 adaptor ([c25665b](c25665b))
* **Intefaces:** Add basis trading module interfaces ([SetProtocol#237](https://github.com/IndexCoop/index-protocol/issues/237)) ([c7af322](c7af322))
* **module:** Notional Trade Module ([SetProtocol#251](https://github.com/IndexCoop/index-protocol/issues/251)) ([49bdf46](49bdf46))
* **publishing:** Auto publish repository to npm in CI [SIM-123] ([SetProtocol#203](https://github.com/IndexCoop/index-protocol/issues/203)) ([8ddbbf1](8ddbbf1))
* **reorg:** Re-org modules into v1 and v2 directories ([SetProtocol#230](https://github.com/IndexCoop/index-protocol/issues/230)) ([d43df0c](d43df0c))
* **UniswapV3ExchangeAdapterV2:** Add UniswapV3ExchangeAdapterV2 exchange adapter ([SetProtocol#240](https://github.com/IndexCoop/index-protocol/issues/240)) ([b4d95ca](b4d95ca))
* verify path for multiple hops ([06ca9b6](06ca9b6))
* verify uniswap path for single hops WIP ([7905d73](7905d73))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants