0xProject / 0x-monorepo

0x protocol monorepo - includes our smart contracts and many developer tools
Other
1.41k stars 467 forks source link

Feat/bancor v2 #2650

Closed xianny closed 4 years ago

xianny commented 4 years ago

Description

Add integration for Bancor V2.

contracts/asset-proxy

asset-swapper

contract-addresses

We're waiting on https://github.com/bancorprotocol/sdk/pull/20 to merge and publish before we enable Bancor as a source. After the SDK is updated, we need to do the following:

Testing instructions

I tested with simbot using https://github.com/dorothy-zbornak/0x-swap-server. Charts are in a comment below.

Unit tests are updated.

Types of changes

Checklist:

xianny commented 4 years ago

Simbotted with Bancor enabled in https://github.com/dorothy-zbornak/0x-swap-server and got some data:

Screen Shot 2020-08-21 at 9 29 11 AM No surprise here.

Screen Shot 2020-08-21 at 9 28 12 AM Bancor revert rate a bit worrying.

Screen Shot 2020-08-21 at 9 28 45 AM Bancor slippage also higher than the rest.

Screen Shot 2020-08-21 at 9 30 03 AM Bancor TOKEN slippage is good though. Maybe we enable Bancor only for BNT for now??

Screen Shot 2020-08-21 at 9 24 57 AM Just for the record.


A-B testing with prod:

Screen Shot 2020-08-21 at 9 37 53 AM Screen Shot 2020-08-21 at 9 38 25 AM Screen Shot 2020-08-21 at 9 36 01 AM Screen Shot 2020-08-21 at 9 37 03 AM Screen Shot 2020-08-21 at 9 36 36 AM

xianny commented 4 years ago

With latest asset-swapper (Bancor disabled)

Screen Shot 2020-08-21 at 1 18 02 PM Screen Shot 2020-08-21 at 1 18 24 PM Screen Shot 2020-08-21 at 1 19 00 PM


Little bit worried about Balancer reverts looking uneven so I ran it for a while with just Balancer and Uniswap as sources: Screen Shot 2020-08-21 at 3 06 26 PM


Screen Shot 2020-08-21 at 1 19 37 PM Screen Shot 2020-08-21 at 1 19 59 PM