129 Commits

Author SHA1 Message Date
eobbad
b35dccd43d
Offboard Cream (#546)
* offboard cream

* changelog

* remove BalancerFillData (unused)
2022-08-10 08:42:43 -04:00
Kyu
8aa313a437
chore: Remove unused addresses in addresses.json [TKR-519] (#548)
* Delete unused addresses in addresses.json and update index.ts

* Update contract wrappers

* Remove outdated references to `exchange` contract in `asset-swapper`

* Update CHANGELOG.json
2022-08-10 16:59:21 +09:00
Kyu
ab7dc33ca4
Refactor PoolsCache (part 2) [TKR-500] (#526)
* Introduce NoOpPoolsCache and use it in unsupported chains for BeethovenX

* Use `NoOpPoolsCache` for `CreamPoolsCache` and `BalancerPoolsCache` on unsupported chains
2022-07-28 09:12:02 -07:00
Kyu
14dcee5bb6
Refactor PoolsCache (part 1) [TKR-500] (#525)
* Make _refreshPoolCacheIfRequiredAsync type-safe and remove Promise.all

* Factor out PoolsCache key logic into a function

* Use Map instead of object in PoolsCache and increase the default timeout

* Clean up PoolsCache and simplify its public interface
2022-07-28 09:04:42 -07:00
Kyu
b72b8b5ffd
Refactor TokenAdjacency and TokenAdjacencyBuilder [TKR-324] (#517)
* Add a new TokenAdjacencyGraph implementation

* Replace old TokenAdjacencyGraph with new implementation

* Simplify token adjacency graph in constants.ts

* Fix lint error

* Update CHANGELOG.json
2022-07-18 13:02:56 -07:00
Jacob Evans
ee985240fb
chore: FillAdjustor and clean up JS router and unused functions [TKR-403] (#480)
* Remove old JS router and add a FillAdjustor

Clean up JS router and unused functions

Remove more unused functions, add adjustment of fills

Comment on why we use fill over sample

update CODEOWNERS

lint

Clean up Fill removing unused properties

Remove CollapsedFills, omit flags bigint

Create GasSchedule vs FeeSchedule, return Fill and gas on OptimizedOrder

Use Fill Adjustment in Phase2 of routing

Fix Limit orders being treated as VIP

* Fix case where dex liquidity is empty

* Use best gas adjusted pricing for fee sources

* CHANGELOG
2022-06-29 18:10:56 +10:00
eobbad
2aadbda527
Offboard Smoothy and ComethSwap (#509)
* Offboard ComethSwap

* offboard smoothy

* Changelog + yarn prettier
2022-06-22 18:36:52 +02:00
Kyu
2d16f83e37
Offboard/clean up Oasis, CoFix, and legacy Kyber [TKR-405] (#482)
* Remove Oasis

* Remove CoFix code

* Remove MixinKyber

* Remove Kyber from asset-swapper

* Delete unused imports, interface, and etc.

* Fix the test failure issue when it's run with neon-router

* Update CHANGELOG.json
2022-05-19 17:39:02 -07:00
Jacob Evans
68f87b2432
fix: BalancerV2 sor alias (#481)
* Install both Balancer sor and rename early version to v1

* yarn.lock

* CHANGELOG
2022-05-19 13:19:25 +10:00
Kyu
9eadc5fc28
chore: Offboard Eth2Dai [TKR-356] (#470)
* Offboard Eth2Dai

* Update CHANGELOG.json
2022-05-10 13:54:28 -07:00
Kyu
92ad1a612e
chore: Offboard Swerve Finance and LinkSwap [TKR-356] (#469)
* Offboard swerve

* Update CHANGELOG.json

* Offboard LinkSwap

* Remove unused import

* Fix CHANGELOG.json
2022-05-10 13:13:18 -07:00
Kyu
09413c0e12
chore: Decomission SnowSwap [TKR-356] (#468)
* Decomission SnowSwap

* SnowSwap doesn't have much liquidity anymore (the largest pool has ~$50k)

* Update CHANGELOG.json

* Update CHANGELOG.json
2022-05-10 09:55:43 -07:00
Kim Persson
c9c7ac8559
feat: add block number to quote report data [TKR-314] (#448)
* feat: add blockNumber to MarketSideLiquidity response

* fix: return block number back in swap quote response

* chore: add asset-swapper changelog entry
2022-03-31 15:42:34 +02:00
Kim Persson
c881723578
feat: use neon-router in CI tests (#453)
* fix: initially skip all tests that don't work with the Rust router

* fix: enable rust router for CircleCI tests

* fix: handle invalid output sampels & enable numSamples tests

* chore: add comments about disabled tests

* chore: add asset-swapper changelog entry
2022-03-31 14:32:59 +02:00
Jacob Evans
281e6acca5
chore: Add ability to capture sampler metrics (#374)
* chore: Add ability to capture sampler metrics

* Added block number metrics
2021-11-30 09:06:05 +10:00
Jorge Pérez
b7adc5a889
feat: Extended Quote Report
* Extended Quote report for indicative quote

* feat: Only save 'full' quotes on quote report

* Unify extended quote report
2021-11-09 13:05:01 -06:00
Kim Persson
d06daf2957
feat: initial integration of new router (#295)
* feat: integrate Rust router with asset-swapper WIP

* fix: produce outputFees in the format the Rust router expects

* fix: correct output fee calc and only use the rust router for sells

* fix: make sure numbers sent to the rust router are integers

* hack: try to debug why rust router output is being overestimated WIP

* refactor: clean up router debugging code

* fix: don't use negative output fees for sells

* feat: try VIP sources in isolation and compare with routing all sources

* fix: adjust for FQT overhead when choosing between VIP, all sources WIP

* fix: pass gasPrice to path_optimizer for EP overhead calculations

* feat: buy support with the Rust Router WIP

* chore: WIP commit trying to get buys working

* refactor: use samples instead of fills for the Rust router

* feat: add vip handling hack to sample based routing

* fix: revert to 200 samplings for rust router when using pure samples

* refactor: remove old hacky Path based Rust code, add back feature toggle

* fix: scale both fill output and adjustedOutput my same factor as input

* feat: initial plumbing for supporting RFQ/Limit orders

* fix: incorrect bump of input amount by one base unit before routing

* fix: add fake samples for rfq/limit orders to fulfill the 3 sample req

* fix pass rfq orders in the correct format to the rust router

* chore: remove debugging logs and clean up code & comments

* fix: use published version of @0x/neon-router

* hack: scale routed amounts to account for precision loss of number/f64

* refactor: clean up code and address initial review comments

* fix: only remove trailing 0 output samples before passing to the router

* refactor: consolidate eth to output token calc into ethToOutputAmount fn

* fix: interpolate input between samples on output amount instead of price

* fix: return no path when we have no samples, add sanity asserts

* refactor: fix interpolation comment wording

* fix: remove double adjusted source route input amount

* chore: update changelog for asset-swapper
2021-10-04 12:09:54 +02:00
Daniel Pyrathon
840c85373e
fix: Refactor integrator ID and add Prometheus metrics (#322)
* Refactor integrator ID and add Prometheus metrics

* Update packages/asset-swapper/src/swap_quoter.ts

Co-authored-by: David Walsh <5778036+rhinodavid@users.noreply.github.com>

* Update packages/asset-swapper/src/swap_quoter.ts

Co-authored-by: David Walsh <5778036+rhinodavid@users.noreply.github.com>

* Update packages/asset-swapper/src/swap_quoter.ts

Co-authored-by: David Walsh <5778036+rhinodavid@users.noreply.github.com>

* Added documentation and fixed some minor requests

* Added more metrics

* more docs

* lint fix

* added new Integrator ID addition

* refactor tests

Co-authored-by: David Walsh <5778036+rhinodavid@users.noreply.github.com>
2021-09-14 12:45:41 -04:00
Jacob Evans
4f32f3174f
fix: fallbacks duplicate check on source-index (#307) 2021-08-16 11:25:22 +10:00
Romain Butteaud
f789aebddc
fix: duplicate SOURCE_FLAGS index (#266) 2021-06-24 11:58:05 -07:00
Lawrence Forman
901d400d62
Address spot check feedback (#251)
* UniswapV3 VIP (#237)

* `@0x/contracts-zero-ex`: Add UniswapV3Feature

* `@0x/contracts-zero-ex`: Add UniswapV3 VIP
`@0x/contract-artifacts`: Regenerate.
`@0x/contract-wrappers`: Regenerate.
`@0x/asset-swapper`: Add UniswapV3 VIP support.

* address review comments and appease linter

* `@0x/contracts-zero-ex`: Add UniswapV3Feature tests

* Multiplex UniswapV3 (#241)

* Add UniswapV3 support to Multiplex batchFill

* Add AssetSwapper support for Multiplex UniswapV3

* fix repo scripts that use PKG= env var (#242)

Co-authored-by: Lawrence Forman <me@merklejerk.com>

* `@0x/asset-swapper`: Adjust uniswap gas overhead

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>

* OTC orders feature (#244)

* Add OTC orders feature contracts

* Address PR feedback

* Remove partial fills for takerSigned variant

* Add function to query the min valid nonce

* Add ETH support

* Tightly pack expiry, nonceBucket, and nonce

* Address PR feedback

* OTC orders unit tests

* Bump prettier version

* Skip unnecessary math if takerTokenFillAmount == order.takerAmount

* appease CI

* Update contract-artifacts and contract-wrappers and CHANGELOGs

* `@0x/contracts-zero-ex`: Address spot check feedback

* `regen wrappers

* prettier

* `@0x/asset-swapper`: prettier and tweak gas schedule slightly for uni3

Co-authored-by: Lawrence Forman <me@merklejerk.com>
Co-authored-by: mzhu25 <mchl.zhu.96@gmail.com>
2021-06-02 14:21:14 +10:00
Jacob Evans
966d54c935
fix: KyberDmm (#236)
* fix: KyberDmm

* fix: pass buyToken to kyberDmm and require that path ends with buyToken

* Pass BigNumber down to FastABI

* Address Feedback

Co-authored-by: Kim Persson <kimpersson88@gmail.com>
2021-05-18 08:12:28 +10:00
Xianny
f9a794af93
feat: Balancer V2 integration (#206)
* add balancer v2

* fetch balancer v2 pools from subgraph

* feat: initial stab at a Balancer V2 Sampler WIP

* feat: add sampling for buys and fix build issues WIP [untested]

* fix: BalancerV2Sampler implementation issues, works on Kovan

* chore: BalancerV2 sampling boilerplate

* fix: update Balancer V2 mainnet address

* fix: consolidate differences between the 2 working branches

* fix: use mainnet Balancer V2 subgraph

* fix: stack too deep by minimizing and inline Balancer V2 vault interface

* fix: address review comments and clean up

* fix: sampler vault interface and pools cache assuming a pool has swaps

* address more review comments

* fix: TS type issues and add a comment about deadline argument

* fix: pools_cache_tests incorrect token addresses, prettier incompat

* fix: make ERC20BridgeSampler support BalancerV2 non view sampler fns

* fix: use a struct for passing encoded bridge data for Balancer V2

* chore: add changelog entries

* fix: improve gas accuracy of gas schedule for Balancer V2 & Maker Psm

* fix: don't exclude sources with stale caches & wait for cache refresh

* rebase

* `@0x/asset-swapper`: Fix stack too deep errors in sampler

Co-authored-by: Kim Persson <kimpersson88@gmail.com>
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-05-05 11:01:28 +02:00
Jacob Evans
a6b92fc658
fix: Fix test forever with new sources being added 2021-05-04 16:49:16 +10:00
Jacob Evans
cd296b8767
feat: Prune Paths + Fast ABI (#183)
* Cull paths which cannot improve price

* fixes and rename

* optimizations

* disable ABI optimization for sampler

* fix lint

* use fastabi

* Update to fastabi 0.0.2

* update packages

* Fix NaN case

* update to published packages

* rebased

* Update generated wrappers
2021-04-28 17:16:24 +10:00
Kim Persson
411548a33e
feat: PancakeSwap 2 integration [TKR-83] (#211)
* feat: PancakeSwap 2 integration

* chore: add PancakeSwap V2 changelog entry

Co-authored-by: Romain Butteaud <romain@0xproject.com>
2021-04-26 15:51:04 -07:00
Jacob Evans
629c7d8e92
Fix asset-swapper test (#199) 2021-04-13 21:01:26 +10:00
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
mzhu25
6045f777ab
Add Kyber DMM as a liquidity source (#194)
* Add Kyber DMM as a liquidity source

* update changelog
2021-04-07 10:08:19 -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
Daniel Pyrathon
525bc8197b
Revive quote report (#184)
* Revives Quote Report

* prettier

* Remove unused parameters

* updated a few issues with tests

* Remove old code

* Fixed other unit tests
2021-03-30 09:57:03 -07:00
phil-ociraptor
06b3464756
Rename {Rfqt=>Rfq} for types in Asset Swapper (#179)
* Rename {Rfqt=>Rfq} for types in Asset Swapper

* PR edit 1 - fix build errors

* PR edit 2 - rename mocked types used in tests

* PR edit 3 - fix broken test build

* PR edit 4 - rename SwapQuoterRfqOpts and add changelog entry
2021-03-23 17:21:50 -05:00
Romain Butteaud
f98609686d
feat: opt-in positive slippage fee for integrators (#101)
* feat: Positive Slippage Fee

* fix: rename ethToTakerAssetRate to takerAssetPriceForOneEth

* fix: rename takerAssetPriceForOneEth to takerAssetsPerEth

* fix: export AffiliateFeeType

* rebased off development

* Add a gasOverhead for non-deterministic operations

* CHANGELOGs

* rename outputTokens to outputAmount

* Confirm transformer addresses on Mainnet and Ropsten

* fix import

Co-authored-by: Jacob Evans <jacob@dekz.net>
2021-02-24 12:51:58 +10: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
c6919eb25a
feat: Mirror Protocol tokens (#142)
* feat: Mirror Protocol tokens

* added .tap to builder
2021-02-17 10:14:38 +10: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
mzhu25
cc9f43ba3b
Reenable PLP VIP and add gasCost field to LiquidityProviderRegistry (#65) 2020-12-02 17:26:48 -08:00
Jacob Evans
f698721484
feat: [asset-swapper] Add Crypto.com as a source (#43)
* feat: [asset-swapper] Add Crypto.com as a source

* Exclude in tests

* Disable hop sources to avoid excess inaccuracy

* Added CryptoCom Bridge and FQT rollup

* update test

* Deploy CryptoCom bridge

* Update package.json

* CHANGELOGs
2020-12-01 12:52:48 +10:00
Alex Kroeger
927fe2b58b
Improved ComparisonPrice function (#32)
* separated comparison price function into a new file, accounted for backup orders

* removed scratch code

* Adjusted documentation, object naming

* Refactored comparisonPrice function to use adjusted rate from optimizer, used native order fee schedule to adjust for order fees

* Small fixes to function, added unit tests

* Adjusted fee calculation for comparisonPrice function

* use available OptimalPathRate object

* fix lint error in test, separate out fee calculation

* Fixed market operation utils test, added additional checks for fee schedule

* removed unused dep, prettier
2020-11-18 17:12:35 -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
Daniel Pyrathon
36bd8f68c9
adds amendments to the rollout feature flag. Rollout indicative quote… (#30)
* adds amendments to the rollout feature flag. Rollout indicative quotes indipendently from firm quotes.

* Updates based on Brandon's feedback
2020-11-05 12:46:06 -08:00
Jacob Evans
e10a81023a
feat: [asset-swapper] more hops via token adjacency (#24)
* feat: [asset-swapper] more hops via token adjacency

* fix lint

* CHANGELOG
2020-11-03 07:48:37 +10:00
Jacob Evans
717db99b38
fix: Support Multiple Shells (#17)
* fix: Support Multiple Shells

* CHANGEGLOG
2020-10-29 17:09:23 +10:00
Daniel Pyrathon
689a8881c2
fix: Changed price-aware RFQ flag to be a argument parameter (#13)
* Changed price-aware RFQ flag to be a argument parameter

* prettified tests

* lint
2020-10-27 12:56:26 -07: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
F. Eugene Aumson
a9d0cec6d1
Ran prettier 2020-10-20 14:17:48 -04:00
F. Eugene Aumson
b5e3f0b90c
Disable tests per IS_PRICE_AWARE_RFQ_ENABLED flag 2020-10-20 13:48:46 -04:00
Romain Butteaud
3182c12b4d feat: use pool attribute instead of curve for all Curve like pools 2020-10-19 13:24:44 -07:00