Romain Butteaud
c1f8df0eca
chore: Component.finance, Smoothy.finance, Saddle.finance, Curve open pools, Gas schedule [TKR-1] ( #182 )
...
* chore: Component.finance, Smoothy.finance (mainnet + BSC), Saddle.finance, Curve open pools, adjusting gas schedule, fixing Shell buys
* chore: adding a Sampler for Smoothy.finance to only use whats in the contracts reserve
* fix: Smoothy sampler, only use approx. for buys, removing y and BUSD curve pools
* add CHANGELOGs
* fix: prettier
* add: FRAX Curve open pool
* fix: prettier
* chore: adjusting gas schedule for BSC Smoothy
2021-04-08 18:07:12 -07:00
Kim Persson
3adfcdffa8
Maker PSM integration [TKR-2] ( #150 )
...
* ADDS basic boilerplate for PSM bridge WIP
* ADDS integrate the MakerPSM mixin and fix incorrect naming
* fix: take into account PSM fee when buying USDC from PSM
* feat: intial stab at a PSM sampler WIP
* feat: integrate MakerPsm into AS WIP
* refactor: get VAT contract address from PSM instead of passing it in
* fix: hardcode PSM Gemtoken to USDC
* fix: remove passing in authGem, get from PSM contract instead
* fix: use constant modified to avoid using storage variables
* fix: incorrect num decimals after multiplication in sampler
* fix: PSM buy sampling
* fix: use fillData to estimate gas schedule
* Rebased on latest development
* Guard and use latest Curve LiquidityProvider
* `@0x/contract-addresses`: Redeploy FQT on mainnet and ropsten
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2021-04-01 15:45:06 -04:00
Lawrence Forman
164a5d44d9
bsc<->development rebase ( #189 )
...
* FQT: Pack Protocol/source name into source ID (#162 )
* `@0x/contracts-zero-ex`: Encode protocol ID and source name in bridge source ID
`@0x/asset-swapper`: Use new bridge source ID encoding.
* fix linter issues
* contracts cleanup (#164 )
* `@0x/contracts-zero-ex`: Add PancakeSwapFeature
* `@0x/contracts-zero-ex`: Remove tokenspender/allowance target/greedy tokens stuff.'
`@0x/contract-addresses`: Add BSC addresses. Remove exchangeProxyAllowanceTarget.
`@0x/migrations`: Remove exchangeProxyAllowanceTarget.
* Update contracts/zero-ex/contracts/src/features/IPancakeSwapFeature.sol
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
* `@0x/contracts-zero-ex`: Add sushiswap support to PancakeSwap
* `@0x/contract-artifacts`: Regenerate artifacts
`@0x/contract-wrappers`: Regenerate wrappers
* `@0x/contract-addresses`: Add BSC addresses
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
* feat: Better chain support (#163 )
* feat: Better chain support
* feat: better chain support refactor deployment constants (#166 )
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* Rework WETH out, replacing with address(0)
* wat
* hack DeploymentConstants for now
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* remove duped network addresses
* Rework the bridge source encoder
* Use the constants NATIVE_FEE_TOKEN in EP consumer
* `@0x/contract-addresses`: Fix WBNB address (#170 )
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
* multichain enable cakez vip (#171 )
* feat: Better chain support
* feat: better chain support refactor deployment constants (#166 )
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* Rework WETH out, replacing with address(0)
* wat
* hack DeploymentConstants for now
* proliferate the chainId
* Refactor sampler to remove DeploymentConstants dependency and fixed addresses
* remove duped network addresses
* `asset-swapper`: enable pancake VIP route generation
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* `@0x/contracts-zero-ex`: Fix `PancakeSwapFeature` sushi values (#172 )
* `@0x/contracts-zero-ex`: Fix `PancakeSwapFeature` sushi values
* `@0x/contracts-zero-ex`: I am a bad protocologist
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* feat: BSC Nerve + Dodo + Nerve + Ellipsis (#181 )
* feat: BSC Nerve + DODO v1
* CHANGELOGs
* Remove extra balance fetch
* Add Belt
* Added Ellipsis
* Update FQT address
* `@0x/contracts-zero-ex`: Delete TokenSpenderFeature and get stuff compiling
* `@0x/asset-swapper`: fix compilation
* prettier
* `@0x/asset-swapper`: Truncate LiquidityProvider source ID name
* Update packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Co-authored-by: Jacob Evans <jacob@dekz.net>
* Update packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Co-authored-by: Jacob Evans <jacob@dekz.net>
* `@0x/contracts-zero-ex`: Fix BakerySwap on PackageSwapFeature (#190 )
* address review comments
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-03-31 18:49:44 -04:00
Jacob Evans
49cb00a9ab
feat: DODO V2, Linkswap ( #152 )
...
* feat: DODO V2
* Fix typo
* feat: Linkswap (#153 )
* fix: intermediate hops WBTC (#154 )
* feat: Linkswap
* fix: Re-add WBTC in default hop tokens
* Update review changes
* FQT deploy + no gas limit ETH refund (#155 )
* `@0x/contracts-zero-ex`: refund ETH with no gas limit in FQT
`@0x/contract-addresses`: Deploy FQT
* Update packages/contract-addresses/CHANGELOG.json
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
2021-02-24 12:19:26 +10:00
Jacob Evans
fa78d1092a
feat: asset-swapper Fake Taker contract ( #151 )
2021-02-22 08:32:53 +10:00
Lawrence Forman
297342092b
@0x/asset-swapper
: special case BNB in uni v1 sampler (#147 )
...
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-02-19 16:56:16 +10:00
Jacob Evans
076f263a86
feat: Validate v4 limit orders ( #148 )
...
re-renable tests
2021-02-19 16:42:10 +10:00
Lawrence Forman
a74a3450eb
@0x/contracts-zero-ex
: Add CurveLiquidityProvider
and misc refactors (#127 )
...
* `@0x/contracts-zero-ex`: Add `CurveLiquidityProvider` and misc refactors
* `@0x/asset-swapper`: Fix compiler error on `ILiquidityProvider` call
`@0x/protocol-utils`: Add VIP utils.
* `@0x/contracts-zero-ex`: Rebase and fix comiler warnings
* `@0x/asset-swapper`: Clean up curve VIP integration
* `@0x/protocol-utils`: Update changelog
* `@0x/protocol-utils`: tsdoc new functions
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-02-11 19:13:17 -05:00
Jacob Evans
3f4bb933d1
feat: v4 final ( #136 )
...
* v4 FillQuoteTransformer (#104 )
* Update FQT to support v4 orders
* `@0x/contracts-zero-ex`: Tweak FQT
`@0x/contracts-zero-ex`: Drop `ERC20BridgeTransfer` event and add `PartialQuoteFill` event.
* `@0x/contracts-utils`: Add `LibSafeMathV06.downcastToUint128()`
* `@0x/protocol-utils`: Update transformer utils for V4 FQT
* `@0x/contracts-zero-ex`: Fixing FQT tests...
* `@0x/contracts-zero-ex`: rename FQT bridge event
* `@0x/contracts-zero-ex`: Un-`only` tests
* `@0x/migrations`: Update `BridgeAdapter` deployment
* `@0x/contracts-integrations`: Delete `mtx_tests`
* `@0x/protocol-utils`: Address review comments
* `@0x/contracts-zero-ex`: Address review comments
* `@0x/migrations`: Update migrations
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* v4: Asset-swapper (main branch) (#113 )
* refactor quote_requestor
* WIP v4/asset-swapper: Clean up SwapQuoter and remove @0x/orderbook
* Start replacing SignedOrder everywhere
* wip: new order type
* wip
* remove order-utils from most places
* hack: Play around with VerboseX types (#119 )
* hack: Play around with VerboseX types
* More hacks
* Fix up the bridgeData encodings
* Rework Orderbook return type
* feat: Don't charge a protocol fee for RFQ orders WIP (#121 )
* fix simple build errors
* simplify types a little
* remove SwapQuoteCalculator: unnecessary abstraction
* Fix all ./src build errors; make types consistent
* export more types for use in 0x API; modify Orderbook interface
* stop overriding APIOrder
* feat: RFQ v4 + consolidated bridge encoders (#125 )
* feat: check if taker address is contract
* Rework bridge data
* Worst case adjustments
* RFQT v4
* Future/v4 validate orders (#126 )
* RFQT v4
* v4 validate native orders
* use default invalid signature
* refactor rfqt validations in swap quoter
* fix types
* fix RFQT unlisted api key
* remove priceAwareRFQFlag
* adjust maker/taker amounts
* update JSON schemas
* filter zero fillable orders
Co-authored-by: xianny <xianny@gmail.com>
* fix type export
Co-authored-by: xianny <xianny@gmail.com>
* remove order-utils as much as possible
* work on tests compile
* Comment out quote reporter test
* updated tests
* restore order-utils accidental changes
* some lints
* Remove old fill_test
* ts lint disable for now
* update quote report
* Re-enable quote report tests
* make fill data required field
* fix lint
* type guards
* force fillData as required
* fix lint
* fix naming
* exports
* adjust MultiBridge by slippage
* cleanups (checkpoint 1)
* cleanup types (checkpoint #2 )
* remove unused deps
* `@0x/contract-addresses`: Deploy new FQT (#129 )
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* commit bump to republish
* DRY up the rfqt mocker
* fix: Balancer load top pools (#131 )
* fix: Balancer load top 250 pools
* refetch top pools on an interval
Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
* Update post rebase
* prettier
* Remove test helpers exported in asset-swapper
* Clean up from review comments
* prettier
* lint
* recreate rfqt mocker
* change merge and INVALID_SIGNATURE
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
Co-authored-by: Michael Zhu <mchl.zhu.96@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Xianny <8582774+xianny@users.noreply.github.com>
Co-authored-by: Kim Persson <kimpers@users.noreply.github.com>
2021-02-10 19:20:15 +10:00
Jacob Evans
3dab892978
feat: Kyber reserve discovery using getTradingReserves ( #111 )
...
* feat: Kyber reserve discovery using getTradingReserves
* refactor sampler operations with
* Added Mooniswap v2.1
2021-01-13 13:28:15 +10:00
Lawrence Forman
f9078bb1c3
`Add SPDX license IDs to 0.6+ solidity files ( #105 )
...
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-01-05 13:55:24 -05:00
Jacob Evans
825cc4d035
feat: [asset-swapper] Added Mooniswap V2 factory address ( #100 )
2020-12-28 09:23:52 +10:00
Jacob Evans
d7bea98075
fix: [asset-swapper] Rework Bancor to only use paths and sample best path ( #88 )
...
* Rework Bancor to only use paths and sample best path
* Deployed address
* Clean up and pin bancor sdk
* CHANGELOGs
2020-12-16 17:34:47 +10:00
Alex Kroeger
0a37a588e8
Added BalanceChecker contract ( #60 )
...
* Added BalanceChecker contract
* Upgraded to solidity 0.6, simplified contract, added tests
* uint -> uint256
* export BalanceChecker contract wrapper
* prettier
* removed superfluous test code
* prettier
2020-12-03 14:31:45 -08:00
mzhu25
7403c0255a
Feature/liquidity provider sandbox ( #16 )
...
* Update liquidity provider feature to use sandbox
* add support for liquidity provider feature in the exchange proxy swap quote consumer
* Move to off-chain liquidity provider registry
* Update ILiquidityProvider interface
* Remove some unused artifacts and wrappers
* Consolidate ILiquidityProvider
* prettier
* lint
* Address PR feedback
* Add failover to sandbox
* Add test for failover behavior in LiquidityProviderSandbox
* Update changelogs
* Emit events for the new LiquidityProvider scenarios
* Fix swap quote consumer bug
* post-rebase fixes
* `@0x/contracts-zero-ex`: bump feature versions
* Add default field to TokenAdjacencyGraph
* update addresses
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2020-11-13 12:22:21 -08:00
Jacob Evans
717db99b38
fix: Support Multiple Shells ( #17 )
...
* fix: Support Multiple Shells
* CHANGEGLOG
2020-10-29 17:09:23 +10:00
Jacob Evans
99f5be8378
chore: [asset swapper] sampler Solidity 0.6 + Bridge addresses in AS ( #4 )
...
* Refactor excess interfaces
* Compiles on 0.6
* Refactored into try/catch
* Rebase and Refactored to v06
* Handle invalid registry in LP
* Update packages/asset-swapper/contracts/src/LiquidityProviderSampler.sol
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
* chore: [asset-swapper] Move Bridge Addresses and Gas schedule
* curve->pool
* lint
* Refactor to fix module load order
* Move FEE Schedule
* rollup: Swerve/Sushi/SnowSwap/DODO (#7 )
* rollup: Swerve/Sushi
* DODO Rollup + Snowswap Swerve
* hardcode addresses temporarily
* rebase
* rename to SUSHISWAP_ROUTER
* CHANGELOGs
* CHANGELOGs
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-10-27 15:16:09 +10:00
Daniel Pyrathon
0571244e9e
Merge pull request #2720 from 0xProject/refactor_rfq_comparison_price_integration
...
feat: Refactor rfq comparison price integration
2020-10-20 16:17:04 -07:00
Romain Butteaud
b798556774
feat: adjusting CURVE_CALL_GAS for SnowSwap, disabling yVaultUSDUnderlying pool for underlying tokens
2020-10-19 13:24:44 -07:00
Romain Butteaud
b2dfd8740c
feat: fix CURVE_CALL_GAS and SnowSwap pool addresses
2020-10-19 13:24:44 -07:00
Daniel Pyrathon
0ae1c926d3
Merge branch 'development' of github.com:0xProject/0x-monorepo into refactor_rfq_comparison_price_integration
...
# Conflicts:
# packages/asset-swapper/src/utils/market_operation_utils/index.ts
2020-10-16 15:16:59 -07:00
Jacob Evans
c4ead689a9
fix: [asset-swapper] excludedFeeSources. DODO Trade Allowed ( #2731 )
...
* fix: Fee sources and Ganache existence
* Added excludedFeeSources
* Comments and CHANGELOG
* fix: DODO Trade Allowed (#2732 )
2020-10-16 10:01:12 +10:00
F. Eugene Aumson
6e2eb9c5bb
Merge branch 'development' into refactor_rfq_comparison_price_integration
2020-10-14 11:57:58 -04:00
Jacob Evans
4d04b72674
feat: DODO ( #2701 )
...
* feat: DODO
* DODO Bridge
* export DODOFillData
* Use deployed DODOHelper
* Deployed Bridge. Half of buys supported
* other half of buys
* refactor
* CHANGELOGs
* Lint
2020-10-13 18:20:31 +10:00
Daniel Pyrathon
199808dc44
Merge branch 'development' of github.com:0xProject/0x-monorepo into refactor_rfq_comparison_price_integration
...
# Conflicts:
# packages/asset-swapper/src/utils/market_operation_utils/index.ts
2020-10-07 14:28:35 -07:00
Jacob Evans
36546480b1
fix: [asset-swapper] Catch Uint256BinOp which can occur ( #2724 )
...
* fix: [asset-swapper] Catch Uint256BinOp which can occur
* Perform a local bounds check
2020-10-07 17:36:44 +10:00
Jacob Evans
7698f21517
feat: [asset-swapper] Shell 🐚 ( #2722 )
...
* feat: [asset-swapper] Shell
* Deployed and Changelogs
* Glue up the deployed address
* Glue for FQT rollup
2020-10-06 15:55:51 +10:00
Daniel Pyrathon
83c942ad8c
Added fix for decimals
2020-10-05 17:20:43 -07:00
Michael Zhu
a57cf68ee4
Handle max in/out ratio reverts in Balancer sampling functions
2020-09-24 23:22:25 -04:00
Jacob Evans
630108ccb6
feat: Swerve Finance and SushiSwap ( #2698 )
...
* feat: Swerve Finance
* export SwerveFillData
* test and CHANGELOG
* feat: Sushiswap (#2700 )
* feat: SushiSwap
* Changelog
* fix tests
* Deployed SushiSwap bridge
* Fix test
* IGNORED_EXCESSIVE_TYPES
2020-09-09 21:35:24 +10:00
Lawrence Forman
e1a48e80e1
@0x/asset-swapper
: Fix mooniswap sell sampling bug
2020-09-03 14:45:03 -04:00
Lawrence Forman
dc66f1b886
@0x/asset-swapper
: Fix Mooniswap buy sampling bug.
2020-09-03 11:01:41 -04:00
Lawrence Forman
3753b1a7d0
@0x/asset-swapper
: Increase default error tolerance on quote simulation tests.
...
Run prettier.
2020-09-03 09:45:54 -04:00
Lawrence Forman
4049143630
@0x/asset-swapper
: Return Mooniswap pool in sampler and encode it in bridge data
2020-09-02 17:42:03 -04:00
Jacob Evans
a2f0d5eedf
feat: better Kyber quotes ( #2683 )
...
* feat: Kyber rework
* Get additional reserves per token
2020-08-27 15:58:57 +10:00
mzhu25
bab34c2d21
Feature/bunny hop ( #2647 )
...
* `@0x/contracts-erc20-bridge-sampler`: Add TwoHopSampler + refactor
* `@0x/asset-swapper`: Refactor + add two-hop skeleton
* Round out two-hop support in asset-swapper
* Add BalancerSampler, use it for two-hop quotes
* Fix bugs discovered from simbot
* rebases are hard
* Add intermediate token to MultiHop source breakdown
* Fix market buy bugs
* Use hybrid on-chain/off-chain sampling for Balancer
* Another day, another rebase
* Update changelogs
* Address PR feedback, CI fixes
* Address more PR feedback
2020-08-27 08:20:09 +10:00
Jacob Evans
cc31445189
feat: asset-swapper mooniswap ( #2675 )
...
* feat: asset-swapper sampler early exit
* feat: asset-swapper mooniswap
* tests and linter
* deploy to mainnet
* CHANGELOGs
* fix excluded sources difference
* typo
2020-08-24 11:21:01 +10:00
Jacob Evans
7e8b56eef4
feat: mStable + FQT Rollup ( #2662 )
...
* feat: mStable
* deploy and CHANGELOG
* `@0x/contracts-utils`: Add more testnet addresses.
* `@0x/contract-addresses`: Deply Mstable on testnets
* `@0x/contract-addresses`: Remove testnet deployments of mStable :-)
* move `erc20-bridge-sampler` into `asset-swapper`
remove `DevUtils` dependency from sampler contract.
* `@0x/asset-swapper`: Add ERC20BridgeSampler support for validating orders in maker fees denominated in non-maker assets.
`@0x/asset-swapper`: Add tests for `NativeOrderSampler`.
* `@0x/asset-swapper`: Return `0` sample if native order asset data is unsupported.
* `@0x/asset-swapper`: Fix failing test.
* feat: ExchangeProxy FQT fruit rollup (#2645 )
* feat: Optimize Bridges in ExchangeProxy
* compile and most work
* work around to trust the delecall contract
* force allowances
* Update Kyber/Eth2Dai bridges
* Remove memory state where not required
* cleanup
* Combine Bridges into one adapter
* mixins
* refactor out ZeroExBridge
* move out interface
* comment out hacks
* update migrations
* remove simbot hacks
* AdapterAddresses and mStable
* Share constructor arg
* fix migration
* Remove whitespace
* `@0x/contracts-zero-ex`: BridgeAdapter -- revert if bridge address is 0.
* `@0x/contract-addresses`: Deploy FQT.
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
* update ganache contract addresses
* fix: asset-swapper empty batch call (#2669 )
* update ganache contract addresses
* fix: asset-swapper prevent empty sampler batch call
* add sampler to migrations
* change migrations version
* Use contract-wrappers and artifacts
* remove extra data
* remove deps, set sampler to NULL_ADDRESS
* all the exports
* noop sell rate too
* update ganache contract addresses
Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: Lawrence Forman <lawrence@0xproject.com>
2020-08-20 08:18:44 +10:00