diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..b3556c68f Binary files /dev/null and b/.DS_Store differ diff --git a/balancer-js/50COIL50USDC_COIL.csv b/balancer-js/50COIL50USDC_COIL.csv new file mode 100644 index 000000000..27a03f57a --- /dev/null +++ b/balancer-js/50COIL50USDC_COIL.csv @@ -0,0 +1,96 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.005180401494361384,0.005154892916551773,-0.00002550857780961053,-0.004924054214210111 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,500,228129.25829022804482744,0.00219173990985363 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +swap,2,0.00735131326953675,0.0072956017158904846,-0.00005571155364626507,-0.007578449129236441 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1000,228129.25829022804482744,0.00438347981970726 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +swap,3,0.013807740067306559,0.013608023132505878,-0.0001997169348006804,-0.014464129091882497 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,2500,228129.25829022804482744,0.010958699549268152 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +swap,4,0.02438436345452488,0.023776803559383917,-0.0006075598951409619,-0.024915962898683756 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,5000,228129.25829022804482744,0.021917399098536305 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +swap,5,0.054799363778260224,0.05188257766712566,-0.0029167861111345644,-0.05322664188104497 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,12500,228129.25829022804482744,0.05479349774634076 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +swap,6,0.10149666302499849,0.09201353427353802,-0.00948312875146047,-0.09343291167242404 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,25000,228129.25829022804482744,0.10958699549268151 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +swap,7,0.18232992665973258,0.1539875217105615,-0.02834240494917109,-0.15544571024845638 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,50000,228129.25829022804482744,0.21917399098536303 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +single token join,1,0.00204569547258822,0.0020437519202469046,-0.0000019435523413153903,-0.0009500692392188766 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,500,228129.25829022804482744,0.00219173990985363 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +single token join,2,0.002590200271126884,0.002587439966144075,-0.0000027603049828090614,-0.0010656724167541578 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1000,228129.25829022804482744,0.00438347981970726 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +single token join,3,0.004216619270245104,0.0042114193394972065,-0.000005199930747897159,-0.0012331990190793056 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,2500,228129.25829022804482744,0.010958699549268152 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +single token join,4,0.006903952605003489,0.006894721675164783,-0.00000923092983870586,-0.0013370500011856898 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,5000,228129.25829022804482744,0.021917399098536305 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +single token join,5,0.014796010721897204,0.014774941705429883,-0.00002106901646732086,-0.0014239660178226273 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,12500,228129.25829022804482744,0.05479349774634076 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +single token join,6,0.027415167135464238,0.02737516938455883,-0.00003999775090540725,-0.0014589643283139497 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,25000,228129.25829022804482744,0.10958699549268151 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +single token join,7,0.05086148518701672,0.05078631795912515,-0.00007516722789156771,-0.0014778811042418293 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,50000,228129.25829022804482744,0.21917399098536303 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,309823.996679,0 + +unbalanced join,1,0.001381564085214109,0.001481891915669705,0.00010032783045559588,0.07261902037649415 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,100,228129.25829022804482744,0.0004383479819707261 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10,309823.996679,0.00003227638952176039 + +unbalanced join,2,0.002544407598200952,0.0025568674917006875,0.000012459893499735392,0.004896972288773733 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1000,228129.25829022804482744,0.00438347981970726 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10,309823.996679,0.00003227638952176039 + +unbalanced join,3,0.01216711270349539,0.012023079736120917,-0.00014403296737447273,-0.011837892101804456 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,10000,228129.25829022804482744,0.04383479819707261 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10,309823.996679,0.00003227638952176039 + +unbalanced join,4,0.050838482362310984,0.048356686935959695,-0.0024817954263512895,-0.04881726029239543 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,50000,228129.25829022804482744,0.21917399098536303 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10,309823.996679,0.00003227638952176039 + +unbalanced join,5,0.1268080243492715,0.11248693006189495,-0.014321094287376546,-0.1129352370314633 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,150000,228129.25829022804482744,0.6575219729560892 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10,309823.996679,0.00003227638952176039 + diff --git a/balancer-js/50COIL50USDC_USDC.csv b/balancer-js/50COIL50USDC_USDC.csv new file mode 100644 index 000000000..5c5e7f346 --- /dev/null +++ b/balancer-js/50COIL50USDC_USDC.csv @@ -0,0 +1,96 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.004606393366046621,0.004587325000000021,-0.00001906836604659984,-0.004139543571582777 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,500,309823.996679,0.0016138194760880193 + +swap,2,0.006207634010097937,0.006168986000000018,-0.00003864801009791953,-0.006225884134768728 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1000,309823.996679,0.0032276389521760387 + +swap,3,0.010980686343833753,0.010853947200000038,-0.00012673914383371475,-0.011542005651120853 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,2500,309823.996679,0.008069097380440097 + +swap,4,0.018834998531135124,0.018467752800000018,-0.000367245731135106,-0.019498049364221177 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,5000,309823.996679,0.016138194760880194 + +swap,5,0.041669010735540635,0.03995046384000001,-0.0017185468955406222,-0.041242805269548356 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,12500,309823.996679,0.04034548690220049 + +swap,6,0.07745877432726511,0.07179017286000001,-0.005668601467265097,-0.07318217356906688 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,25000,309823.996679,0.08069097380440098 + +swap,7,0.14159773144648513,0.12385556351999999,-0.017742167926485142,-0.12529980350137562 +Swap Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,50000,309823.996679,0.16138194760880195 + +single token join,1,0.001901921674153756,0.0019001939999999991,-0.000001727674153756886,-0.0009083834404093428 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,500,309823.996679,0.0016138194760880193 + +single token join,2,0.002303197086591944,0.0023008674999999814,-0.0000023295865919626367,-0.001011457771253845 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1000,309823.996679,0.0032276389521760387 + +single token join,3,0.003503165415001174,0.0034990358000000013,-0.000004129615001172669,-0.0011788238669772565 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,2500,309823.996679,0.008069097380440097 + +single token join,4,0.005490367996722705,0.005483257500000036,-0.0000071104967226684815,-0.0012950856348632478 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,5000,309823.996679,0.016138194760880194 + +single token join,5,0.011358540118500423,0.01134262732000003,-0.00001591279850039415,-0.001400954553523643 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,12500,309823.996679,0.04034548690220049 + +single token join,6,0.02084067786135113,0.02081054186000001,-0.000030136001351120656,-0.0014460182894054337 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,25000,309823.996679,0.08069097380440098 + +single token join,7,0.03877718442910252,0.03872014366000003,-0.000057040769102484346,-0.0014709879002889879 +Single-Sided Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,0,228129.25829022804482744,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,50000,309823.996679,0.16138194760880195 + +unbalanced join,1,0.001537020102404201,0.001556495,0.000019474897595798913,0.012670554903827446 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1,228129.25829022804482744,0.000004383479819707261 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,100,309823.996679,0.0003227638952176039 + +unbalanced join,2,0.002295859970807763,0.0022942195,-0.0000016404708077632363,-0.0007145343481841629 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1,228129.25829022804482744,0.000004383479819707261 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1000,309823.996679,0.0032276389521760387 + +unbalanced join,3,0.009414176353483334,0.0093229879,-0.00009118845348333494,-0.00968629119100731 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1,228129.25829022804482744,0.000004383479819707261 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10000,309823.996679,0.03227638952176039 + +unbalanced join,4,0.038773986715493355,0.03730464448,-0.0014693422354933525,-0.037895051810760305 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1,228129.25829022804482744,0.000004383479819707261 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,50000,309823.996679,0.16138194760880195 + +unbalanced join,5,0.09961903442349677,0.09054620707333333,-0.009072827350163445,-0.09107523881021949 +Unbalanced Join Summary +0x823e1b82ce1dc147bbdb25a203f046afab1ce918,1,228129.25829022804482744,0.000004383479819707261 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,150000,309823.996679,0.4841458428264058 + diff --git a/balancer-js/80BAL20WETH_BAL.csv b/balancer-js/80BAL20WETH_BAL.csv new file mode 100644 index 000000000..e85d36cfe --- /dev/null +++ b/balancer-js/80BAL20WETH_BAL.csv @@ -0,0 +1,96 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.01074482635644113,0.010675712248904255,-0.00006911410753687557,-0.006432314980636628 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,10000,33209420.429177837538000946,0.0003011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +swap,2,0.01148876540472076,0.011399280768069911,-0.00008948463665084914,-0.007788881877079647 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,20000,33209420.429177837538000946,0.0006022387545922956 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +swap,3,0.013715272641710788,0.01355722241299991,-0.00015805022871087822,-0.011523666560606095 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,50000,33209420.429177837538000946,0.001505596886480739 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +swap,4,0.01740850105233393,0.017111825651934122,-0.0002966754003998068,-0.017041984229884743 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,100000,33209420.429177837538000946,0.003011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +swap,5,0.02835762674090258,0.027471602416982526,-0.0008860243239200531,-0.031244657108137546 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,250000,33209420.429177837538000946,0.007527984432403695 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +swap,6,0.046180967002858446,0.043789387204565926,-0.00239157979829252,-0.05178713122539182 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,500000,33209420.429177837538000946,0.01505596886480739 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +swap,7,0.08030484767005251,0.07329181779319048,-0.007013029876862031,-0.08733009376565132 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,1000000,33209420.429177837538000946,0.03011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +single token join,1,0.002029988088886347,0.0020279299891613847,-0.0000020580997249623235,-0.0010138481778439394 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,10000,33209420.429177837538000946,0.0003011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +single token join,2,0.002059968846368026,0.0020578562958809016,-0.0000021125504871244948,-0.0010255254543529513 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,20000,33209420.429177837538000946,0.0006022387545922956 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +single token join,3,0.00214986801324604,0.002147613739076842,-0.00000225427416919834,-0.0010485639840720543 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,50000,33209420.429177837538000946,0.001505596886480739 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +single token join,4,0.002299556187610588,0.002297137834273162,-0.0000024183533374258492,-0.0010516609032887778 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,100000,33209420.429177837538000946,0.003011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +single token join,5,0.002747546281903586,0.0027451755993971603,-0.000002370682506425744,-0.0008628362412091057 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,250000,33209420.429177837538000946,0.007527984432403695 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +single token join,6,0.003490641306584725,0.003490142634904769,-4.98671679956264e-7,-0.0001428596169464828 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,500000,33209420.429177837538000946,0.01505596886480739 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +single token join,7,0.004963693729814437,0.004973609079042508,0.000009915349228071038,0.0019975747432833075 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,1000000,33209420.429177837538000946,0.03011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,16591.168598583701574685,0 + +unbalanced join,1,0.001337128450564294,0.00399376732611911,0.0026566388755548155,1.986823984213082 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,1000,33209420.429177837538000946,0.00003011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,16591.168598583701574685,0.00006027302983861935 + +unbalanced join,2,0.001541709034511661,0.0016167781702511766,0.00007506913573951564,0.048692155302374494 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,10000,33209420.429177837538000946,0.0003011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,16591.168598583701574685,0.00006027302983861935 + +unbalanced join,3,0.002236449744451255,0.0022420464754017862,0.000005596730950531079,0.0025025069149963467 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,100000,33209420.429177837538000946,0.003011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,16591.168598583701574685,0.00006027302983861935 + +unbalanced join,4,0.02887389817541518,0.02728338766874008,-0.001590510506675101,-0.05508471689594545 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,10000000,33209420.429177837538000946,0.3011193772961478 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,16591.168598583701574685,0.00006027302983861935 + +unbalanced join,5,0.040431008786043,0,-0.040431008786043,-1 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,15000000,33209420.429177837538000946,0.4516790659442217 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,16591.168598583701574685,0.00006027302983861935 + diff --git a/balancer-js/80BAL20WETH_WETH.csv b/balancer-js/80BAL20WETH_WETH.csv new file mode 100644 index 000000000..1b778af9a --- /dev/null +++ b/balancer-js/80BAL20WETH_WETH.csv @@ -0,0 +1,96 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.010372772619513295,0.010313420345242541,-0.00005935227427075404,-0.00572192956000022 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,16591.168598583701574685,0.0006027302983861936 + +swap,2,0.010745211822326786,0.010676301452090264,-0.00006891037023652215,-0.006413123480110249 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,20,16591.168598583701574685,0.0012054605967723871 + +swap,3,0.011860534449803386,0.011761721621604977,-0.00009881282819840936,-0.00833122896920108 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,50,16591.168598583701574685,0.0030136514919309678 + +swap,4,0.01371278418356158,0.013560081896159133,-0.00015270228740244668,-0.011135761006543149 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,100,16591.168598583701574685,0.0060273029838619355 + +swap,5,0.019220419976055496,0.01887644329261758,-0.0003439766834379167,-0.01789641869774113 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,250,16591.168598583701574685,0.015068257459654838 + +swap,6,0.028239581913104488,0.02748303329196142,-0.0007565486211430668,-0.0267903619632553 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,500,16591.168598583701574685,0.030136514919309677 + +swap,7,0.045701948186298795,0.043802498731486596,-0.0018994494548121993,-0.04156167363083319 +Swap Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1000,16591.168598583701574685,0.06027302983861935 + +single token join,1,0.008237165164621378,0.008203239645555804,-0.00003392551906557413,-0.004118591577025094 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,16591.168598583701574685,0.0006027302983861936 + +single token join,2,0.008474160069212144,0.008438254337720963,-0.000035905731491181134,-0.004237084406941034 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,20,16591.168598583701574685,0.0012054605967723871 + +single token join,3,0.009184127045242301,0.009141952935596933,-0.00004217410964536816,-0.0045920651399542455 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,50,16591.168598583701574685,0.0030136514919309678 + +single token join,4,0.010364025001894933,0.010310318486956476,-0.000053706514938457045,-0.005182013255336366 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,100,16591.168598583701574685,0.0060273029838619355 + +single token join,5,0.013878607059261146,0.013782299174161097,-0.00009630788510004915,-0.006939304837208661 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,250,16591.168598583701574685,0.015068257459654838 + +single token join,6,0.019654077040931205,0.0194609354329599,-0.00019314160797130608,-0.00982705051827532 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,500,16591.168598583701574685,0.030136514919309677 + +single token join,7,0.030907962182798458,0.030430307621035695,-0.0004776545617627623,-0.015454094286054114 +Single-Sided Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,0,33209420.429177837538000946,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1000,16591.168598583701574685,0.06027302983861935 + +unbalanced join,1,0.008003711011527437,0.007988734182401437,-0.000014976829126000374,-0.0018712356186311354 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,1,33209420.429177837538000946,3.011193772961478e-8 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,16591.168598583701574685,0.00006027302983861935 + +unbalanced join,2,0.008235096115354116,0.008202738022824525,-0.00003235809252959132,-0.003929291422508175 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,1,33209420.429177837538000946,3.011193772961478e-8 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,16591.168598583701574685,0.0006027302983861936 + +unbalanced join,3,0.010363754278797079,0.01029620934865045,-0.0000675449301466291,-0.006517419106010399 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,1,33209420.429177837538000946,3.011193772961478e-8 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,100,16591.168598583701574685,0.0060273029838619355 + +unbalanced join,4,0.019653967065790912,0.019361367645071122,-0.0002925994207197899,-0.0148875501694047 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,1,33209420.429177837538000946,3.011193772961478e-8 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,500,16591.168598583701574685,0.030136514919309677 + +unbalanced join,5,0.04178498209257003,0.04045662512442082,-0.0013283569681492163,-0.03179029645642512 +Unbalanced Join Summary +0xba100000625a3754423978a60c9317c58a424e3d,1,33209420.429177837538000946,3.011193772961478e-8 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1500,16591.168598583701574685,0.09040954475792903 + diff --git a/balancer-js/OATH_GRAIN_USDC_WETH_0.csv b/balancer-js/OATH_GRAIN_USDC_WETH_0.csv new file mode 100644 index 000000000..aae04fc88 --- /dev/null +++ b/balancer-js/OATH_GRAIN_USDC_WETH_0.csv @@ -0,0 +1,134 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.020053755009550405,0.01985111958815551,-0.0002026354213948943,-0.010104612392960378 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,100,3042066.965305608883632939,0.0000328723861573356 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,2,0.020107397435545554,0.019902095151109193,-0.00020530228443636084,-0.010210286293612049 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,200,3042066.965305608883632939,0.0000657447723146712 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,3,0.020268423290730957,0.020055132424014233,-0.0002132908667167241,-0.010523308283889308 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,500,3042066.965305608883632939,0.00016436193078667798 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,4,0.02053666827977361,0.020309959100646608,-0.00022670917912700345,-0.011039238499571393 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1000,3042066.965305608883632939,0.00032872386157335596 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,5,0.02134073292194592,0.02107286720314569,-0.0002678657188002302,-0.012551851887184638 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,2500,3042066.965305608883632939,0.0008218096539333899 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,6,0.022678346655755504,0.02233901186476842,-0.000339334790987085,-0.014962942234634452 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,5000,3042066.965305608883632939,0.0016436193078667798 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,7,0.02534427993642661,0.02485135780150613,-0.0004929221349204808,-0.019449048706726833 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,10000,3042066.965305608883632939,0.0032872386157335597 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,1,0.013010410851050142,0.012925773910714256,-0.00008463694033588633,-0.00650532418267597 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,100,3042066.965305608883632939,0.0000328723861573356 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,2,0.013020816114554983,0.01293604458877681,-0.00008477152577817358,-0.006510461789212577 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,200,3042066.965305608883632939,0.0000657447723146712 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,3,0.01305203384974993,0.012966856263397573,-0.00008517758635235607,-0.0065260010304055436 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,500,3042066.965305608883632939,0.00016436193078667798 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,4,0.013104057373248624,0.013018201138964059,-0.00008585623428456444,-0.006551881744644701 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1000,3042066.965305608883632939,0.00032872386157335596 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,5,0.013260073109966158,0.013172171283058469,-0.0000879018269076895,-0.006629060502058863 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,2500,3042066.965305608883632939,0.0008218096539333899 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,6,0.013519914234311262,0.013428572128495943,-0.00009134210581531951,-0.006756115773538611 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,5000,3042066.965305608883632939,0.0016436193078667798 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,7,0.014038902747275187,0.013940564763186558,-0.00009833798408862872,-0.0070046773497106215 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,10000,3042066.965305608883632939,0.0032872386157335597 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +unbalanced join,1,0.027207605091119583,0.024191867397961392,-0.0030157376931581915,-0.11084171808060064 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,100,3042066.965305608883632939,0.0000328723861573356 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,10,9700119.984474651850337175,0.000001030915083112922 + +unbalanced join,2,0.026322299940913504,0.02403595290577276,-0.002286347035140742,-0.08685969844097884 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1000,3042066.965305608883632939,0.00032872386157335596 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,10,9700119.984474651850337175,0.000001030915083112922 + +unbalanced join,3,0.024529115535142806,0.023724524566055713,-0.0008045909690870927,-0.032801466809284544 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,3000,3042066.965305608883632939,0.0009861715847200678 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,10,9700119.984474651850337175,0.000001030915083112922 + +unbalanced join,4,0.01971207353740396,0.023015624224122733,0.003303550686718771,0.1675902172569635 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,10000,3042066.965305608883632939,0.0032872386157335597 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,10,9700119.984474651850337175,0.000001030915083112922 + +unbalanced join,5,0.01586572326762862,0.02558032056562632,0.009714597297997701,0.6123009417300709 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,20000,3042066.965305608883632939,0.006574477231467119 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,10,9700119.984474651850337175,0.000001030915083112922 + diff --git a/balancer-js/OATH_GRAIN_USDC_WETH_1.csv b/balancer-js/OATH_GRAIN_USDC_WETH_1.csv new file mode 100644 index 000000000..91cbd09ac --- /dev/null +++ b/balancer-js/OATH_GRAIN_USDC_WETH_1.csv @@ -0,0 +1,134 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.021208815700863175,0.020947979999999974,-0.00026083570086320174,-0.01229845666736526 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,100,80973.084641,0.001234978270166651 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,2,0.02241471245939151,0.022090480000000027,-0.0003242324593914839,-0.014465162556909541 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,200,80973.084641,0.002469956540333302 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,3,0.02601499442550446,0.025485519000000012,-0.0005294754255044491,-0.0203527018627905 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,500,80973.084641,0.006174891350833256 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,4,0.031958061179673244,0.031037980000000003,-0.0009200811796732412,-0.028790269049815014 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1000,80973.084641,0.012349782701666511 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,5,0.0493683698048719,0.04694215039999999,-0.002426219404871907,-0.049145220197902434 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,2500,80973.084641,0.03087445675416628 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,6,0.0770609524565805,0.07118016049999996,-0.005880791956580533,-0.07631351247434981 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,5000,80973.084641,0.06174891350833256 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,7,0.12796151787457918,0.11262796800000001,-0.015333549874579175,-0.11982938409349188 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10000,80973.084641,0.12349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,1,0.017506792878366612,0.01735354000000001,-0.00015325287836660123,-0.008753909378569158 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,100,80973.084641,0.001234978270166651 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,2,0.018012828037408182,0.017850547500000005,-0.00016228053740817774,-0.009009164861351103 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,200,80973.084641,0.002469956540333302 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,3,0.019526408959676902,0.01933545700000002,-0.00019095195967688133,-0.009779164211463947 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,500,80973.084641,0.006174891350833256 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,4,0.022034077465822165,0.021790092000000014,-0.00024398546582215033,-0.011073096488863888 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1000,80973.084641,0.012349782701666511 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,5,0.02944701426732974,0.02900596180000002,-0.0004410524673297174,-0.014977833179476098 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,2500,80973.084641,0.03087445675416628 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,6,0.04144862103138693,0.040561123099999985,-0.0008874979313869477,-0.021412001396014856 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,5000,80973.084641,0.06174891350833256 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,7,0.06422084073525065,0.062055097000000024,-0.002165743735250629,-0.033723378742095134 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10000,80973.084641,0.12349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +unbalanced join,1,0.02716421348606031,0.02419471180993948,-0.002969501676120829,-0.10931668158346163 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,10,80973.084641,0.0001234978270166651 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,2,0.022112505650785794,0.02803017051954543,0.005917664868759637,0.267616206060725 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,500,80973.084641,0.006174891350833256 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,3,0.02144631361192695,0,-0.02144631361192695,-1 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1000,80973.084641,0.012349782701666511 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,4,0.0224319211009759,0,-0.0224319211009759,-1 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,2000,80973.084641,0.024699565403333023 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,5,0.024948087256284925,0.39484962,0.36990153274371507,14.82684940708348 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,3000,80973.084641,0.03704934810499953 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + diff --git a/balancer-js/OATH_GRAIN_USDC_WETH_2.csv b/balancer-js/OATH_GRAIN_USDC_WETH_2.csv new file mode 100644 index 000000000..22e6934bc --- /dev/null +++ b/balancer-js/OATH_GRAIN_USDC_WETH_2.csv @@ -0,0 +1,134 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.02178415397360343,0.021493799170580058,-0.0002903548030233731,-0.013328716064677356 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0.1,39.154958239677801248,0.0025539549649848605 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,2,0.023561109788893014,0.02317567418303565,-0.0003854356058573642,-0.016358974993574502 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0.2,39.154958239677801248,0.005107909929969721 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,3,0.02884924647525176,0.028150989174731023,-0.0006982573005207375,-0.02420365818288306 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0.5,39.154958239677801248,0.012769774824924302 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,4,0.03752306073224475,0.03621597392789144,-0.0013070868043533052,-0.03483422670875258 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,5,0.06254534804326682,0.058833560563534705,-0.0037117874797321163,-0.05934554040956688 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,2.5,39.154958239677801248,0.06384887412462151 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,6,0.10120739472685412,0.09198011942098487,-0.009227275305869254,-0.09117194776895991 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,5,39.154958239677801248,0.12769774824924301 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +swap,7,0.16891976137906692,0.14521929579499235,-0.02370046558407457,-0.1403060565003356 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,39.154958239677801248,0.25539549649848603 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,1,0.018047219126648622,0.01788431432277457,-0.00016290480387405257,-0.009026587571794175 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0.1,39.154958239677801248,0.0025539549649848605 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,2,0.019091207891303995,0.018908756887669673,-0.00018245100363432215,-0.009556807755334759 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0.2,39.154958239677801248,0.005107909929969721 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,3,0.022203964688067294,0.021956136851912,-0.0002478278361552934,-0.011161422729539799 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0.5,39.154958239677801248,0.012769774824924302 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,4,0.027328870811383472,0.026950267762154423,-0.0003786030492290496,-0.013853592848459278 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,5,0.04224943274852523,0.04132655140052499,-0.0009228813480002401,-0.021843638789030947 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,2.5,39.154958239677801248,0.06384887412462151 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,6,0.06571375102118364,0.06344455439421762,-0.002269196626966022,-0.034531533989507285 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,5,39.154958239677801248,0.12769774824924301 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +single token join,7,0.10808353720465008,0.10187657018064104,-0.0062069670240090385,-0.05742749714284884 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,39.154958239677801248,0.25539549649848603 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,0,9700119.984474651850337175,0 + +unbalanced join,1,0.01793581405967206,0.017587682068353986,-0.0003481319913180743,-0.019409879593970298 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0.1,39.154958239677801248,0.0025539549649848605 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,2,0.027311104254834375,0.024210123232769398,-0.0031009810220649775,-0.11354286495084023 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,3,0.0657047229884663,0.024210123232769398,-0.0414945997556969,-0.6315314617943187 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,5,39.154958239677801248,0.12769774824924301 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,4,0.10807596826811319,0.024210123232769398,-0.08386584503534379,-0.7759897633051105 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,39.154958239677801248,0.25539549649848603 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + +unbalanced join,5,0.14540358652938534,0.10482877333775917,-0.040574813191626175,-0.2790496036590281 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,15,39.154958239677801248,0.3830932447477291 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1,9700119.984474651850337175,1.0309150831129219e-7 + diff --git a/balancer-js/OATH_GRAIN_USDC_WETH_3.csv b/balancer-js/OATH_GRAIN_USDC_WETH_3.csv new file mode 100644 index 000000000..16de415e5 --- /dev/null +++ b/balancer-js/OATH_GRAIN_USDC_WETH_3.csv @@ -0,0 +1,134 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.020084253476206775,0.019880090958205584,-0.00020416251800119134,-0.010165302795200065 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,500,9700119.984474651850337175,0.000051545754155646097 + +swap,2,0.020168388941786502,0.01996005919605119,-0.00020832974573531046,-0.010329518452694851 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1000,9700119.984474651850337175,0.00010309150831129219 + +swap,3,0.0204208162938093,0.020199921838625325,-0.00022089445518397657,-0.010817121705900764 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,2500,9700119.984474651850337175,0.00025772877077823045 + +swap,4,0.020841305024150474,0.020599162941324266,-0.00024214208282620844,-0.011618374307444721 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,5000,9700119.984474651850337175,0.0005154575415564609 + +swap,5,0.022100952296515746,0.021792929447295318,-0.00030802284922042816,-0.013937084931357846 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,12500,9700119.984474651850337175,0.0012886438538911524 + +swap,6,0.024194265730948166,0.023769409650960006,-0.0004248560799881597,-0.017560197309261748 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,25000,9700119.984474651850337175,0.0025772877077823047 + +swap,7,0.02835812049260365,0.02767385431697876,-0.000684266175624889,-0.024129461464251798 +Swap Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,50000,9700119.984474651850337175,0.005154575415564609 + +single token join,1,0.013016321400542435,0.012931608141783159,-0.00008471325875927631,-0.006508233482598702 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,500,9700119.984474651850337175,0.000051545754155646097 + +single token join,2,0.013032638561581322,0.01294771343317808,-0.00008492512840324248,-0.0065163418752048965 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1000,9700119.984474651850337175,0.00010309150831129219 + +single token join,3,0.013081587227350791,0.012996024345440218,-0.00008556288191057318,-0.006540711033266633 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,2500,9700119.984474651850337175,0.00025772877077823045 + +single token join,4,0.013163150968480482,0.013076521715246873,-0.00008662925323360895,-0.006581194232372251 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,5000,9700119.984474651850337175,0.0005154575415564609 + +single token join,5,0.013407705913575756,0.013317854542709538,-0.00008985137086621811,-0.006701472380539057 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,12500,9700119.984474651850337175,0.0012886438538911524 + +single token join,6,0.013814842321593312,0.01371954498864543,-0.0000952973329478822,-0.006898184628493917 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,25000,9700119.984474651850337175,0.0025772877077823047 + +single token join,7,0.014627412821221621,0.014520941012501717,-0.00010647180871990389,-0.007278922802085229 +Single-Sided Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,0,3042066.965305608883632939,0 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0,80973.084641,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,39.154958239677801248,0 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,50000,9700119.984474651850337175,0.005154575415564609 + +unbalanced join,1,0.027308225913156965,0.024209615360102757,-0.0030986105530542082,-0.11346802838485796 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,10,9700119.984474651850337175,0.000001030915083112922 + +unbalanced join,2,0.027279472105495285,0.024204544601682736,-0.003074927503812549,-0.11271946509526198 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,100,9700119.984474651850337175,0.000010309150831129219 + +unbalanced join,3,0.02699486733869889,0.024154365751315965,-0.0028405015873829258,-0.10522376538264676 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,1000,9700119.984474651850337175,0.00010309150831129219 + +unbalanced join,4,0.024416923646421666,0.023705527225589024,-0.0007113964208326426,-0.029135382947265705 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,10000,9700119.984474651850337175,0.0010309150831129218 + +unbalanced join,5,0.015455756905113935,0,-0.015455756905113935,-1 +Unbalanced Join Summary +0x6f9c26fa731c7ea4139fa669962cf8f1ce6c8b0b,1,3042066.965305608883632939,3.28723861573356e-7 +0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,1,80973.084641,0.000012349782701666512 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,1,39.154958239677801248,0.025539549649848604 +0xf88baf18fab7e330fa0c4f83949e23f52fececce,200000,9700119.984474651850337175,0.020618301662258438 + diff --git a/balancer-js/package.json b/balancer-js/package.json index 38dfb2565..7c9a0ae59 100644 --- a/balancer-js/package.json +++ b/balancer-js/package.json @@ -29,7 +29,7 @@ "lint:fix": "eslint ./src --ext .ts --max-warnings 0 --fix", "subgraph:generate": "graphql-codegen --config src/modules/subgraph/codegen.yml -r dotenv/config", "example": "npx ts-node -P tsconfig.examples.json -r tsconfig-paths/register", - "node": "npx hardhat node --tsconfig tsconfig.testing.json --fork $(. ./.env && echo $ALCHEMY_URL)", + "mainnet": "npx hardhat node --tsconfig tsconfig.testing.json --fork $(. ./.env && echo $ALCHEMY_URL)", "node:goerli": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.goerli.ts node --fork $(. ./.env && echo $ALCHEMY_URL_GOERLI) --port 8000", "node:polygon": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.polygon.ts node --fork $(. ./.env && echo $ALCHEMY_URL_POLYGON) --port 8137", "node:arbitrum": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.arbitrum.ts node --fork $(. ./.env && echo $ALCHEMY_URL_ARBITRUM) --port 8161", @@ -83,7 +83,7 @@ "tiny-invariant": "^1.1.0", "ts-mocha": "^9.0.2", "ts-node": "^10.9.1", - "tsconfig-paths": "^3.14.1", + "tsconfig-paths": "^4.2.0", "typechain": "^8.1.1", "typescript": "^4.0.2" }, diff --git a/balancer-js/results2.csv b/balancer-js/results2.csv new file mode 100644 index 000000000..aaa650e27 --- /dev/null +++ b/balancer-js/results2.csv @@ -0,0 +1,103 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.00010203132704046372,0.0001020165954047414,-1.4731635722319762e-8,-0.00014438345701881804 +Swap Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,6362.008495713109070421,0.0015718306579971192 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +swap,2,0.00010408136281737637,0.00010403844483262148,-4.291798475488599e-8,-0.0004123503343263376 +Swap Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,20,6362.008495713109070421,0.0031436613159942384 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +swap,3,0.00011034651005504817,0.00011010820494391283,-2.3830511113533842e-7,-0.0021596071413264996 +Swap Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,50,6362.008495713109070421,0.007859153289985597 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +swap,4,0.00012118944764728515,0.00012025470167984054,-9.347459674446094e-7,-0.007713097019512238 +Swap Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,6362.008495713109070421,0.015718306579971194 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +swap,5,0.00015710608274611672,0.0001512385280007038,-0.0000058675547454129125,-0.03734772481658063 +Swap Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,250,6362.008495713109070421,0.03929576644992799 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +swap,6,0.0002314821066110694,0.00020698231852213668,-0.00002449978808893272,-0.10583879872018215 +Swap Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,500,6362.008495713109070421,0.07859153289985597 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +swap,7,0.000479722116118808,0.00035992193995207345,-0.00011980017616673456,-0.24972827422670846 +Swap Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,6362.008495713109070421,0.15718306579971195 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +single token join,1,0.0000248560962244,0.00002485579400062221,-3.0222377778963165e-10,-0.000012158939805396856 +Single-Sided Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,6362.008495713109070421,0.0015718306579971192 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +single token join,2,0.000024979837617604,0.000024979552376258597,-2.852413454022015e-10,-0.000011418863075442245 +Single-Sided Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,20,6362.008495713109070421,0.0031436613159942384 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +single token join,3,0.000025350982252748,0.00002535082814219436,-1.5411055364041915e-10,-0.000006079076230812076 +Single-Sided Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,50,6362.008495713109070421,0.007859153289985597 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +single token join,4,0.000025969295166748,0.00002596962698859784,3.3182184983995334e-10,0.00001277746845685784 +Single-Sided Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,6362.008495713109070421,0.015718306579971194 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +single token join,5,0.000027822340587477,0.000027826140328045314,3.799740568314404e-9,0.00013657156400510352 +Single-Sided Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,250,6362.008495713109070421,0.03929576644992799 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +single token join,6,0.000030904849593443,0.00003092119674937521,1.634715593220996e-8,0.0005289511564449836 +Single-Sided Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,500,6362.008495713109070421,0.07859153289985597 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +single token join,7,0.000037050427523012,0.00003711831248284625,6.788495983425205e-8,0.00183223148483479 +Single-Sided Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,6362.008495713109070421,0.15718306579971195 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0,2396.382388769465741917,0 + +unbalanced join,1,0.000022327376681204,0.00002231709619529593,-1.0280485908070958e-8,-0.0004604430719675834 +Unbalanced Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,200,6362.008495713109070421,0.03143661315994239 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,2396.382388769465741917,0.004172956722960632 + +unbalanced join,2,0.000047998171932481,0.00004598857211443448,-0.0000020095998180465167,-0.041868257417666234 +Unbalanced Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,2000,6362.008495713109070421,0.3143661315994239 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,2396.382388769465741917,0.004172956722960632 + +unbalanced join,3,0.000072410665828736,0.00006546308697802712,-0.000006947578850708875,-0.09594689913694654 +Unbalanced Join Summary +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,4000,6362.008495713109070421,0.6287322631988478 +0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,0,2596148429267497.565961631357824627,0 +0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,10,2396.382388769465741917,0.004172956722960632 + diff --git a/balancer-js/src/lib/utils/math.ts b/balancer-js/src/lib/utils/math.ts index e4ea33b33..00b80ec21 100644 --- a/balancer-js/src/lib/utils/math.ts +++ b/balancer-js/src/lib/utils/math.ts @@ -50,3 +50,9 @@ export function formatFromBigInt18(value: bigint): string { * Like parseEther but for numbers. Converts floating point to BigNumber using 18 decimals */ export const bn = (value: number): BigNumber => _parseFixed(`${value}`, 18); + +export const min = (values: BigNumber[]): BigNumber => + values.reduce((a, b) => (a.lt(b) ? a : b)); + +export const max = (values: BigNumber[]): BigNumber => + values.reduce((a, b) => (a.gt(b) ? a : b)); diff --git a/balancer-js/src/modules/exits/exits.module.ts b/balancer-js/src/modules/exits/exits.module.ts index 7a4ce1f11..ff09479ad 100644 --- a/balancer-js/src/modules/exits/exits.module.ts +++ b/balancer-js/src/modules/exits/exits.module.ts @@ -1132,7 +1132,7 @@ export class Exit { userData = WeightedPoolEncoder.exitExactBPTInForTokensOut(amountIn); } else if (node.type === PoolType.ComposableStable) { userData = - ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(amountIn); + ComposableStablePoolEncoder.exitExactBPTInForTokensOut(amountIn); } else { // TODO: double check if it's ok to set the Stable Pool Encoder as the default/else case userData = StablePoolEncoder.exitExactBPTInForTokensOut(amountIn); diff --git a/balancer-js/src/modules/pools/pool-types/concerns/composableStable/exit.concern.ts b/balancer-js/src/modules/pools/pool-types/concerns/composableStable/exit.concern.ts index 2d3e9e936..cd316583a 100644 --- a/balancer-js/src/modules/pools/pool-types/concerns/composableStable/exit.concern.ts +++ b/balancer-js/src/modules/pools/pool-types/concerns/composableStable/exit.concern.ts @@ -123,7 +123,7 @@ export class ComposableStablePoolExit implements ExitConcern { bptIn, sortedValues.singleTokenOutIndexWithoutBpt ) - : ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(bptIn); + : ComposableStablePoolEncoder.exitExactBPTInForTokensOut(bptIn); // MinAmounts needs a value for BPT for encoding const minAmountsOutWithBpt = insert( diff --git a/balancer-js/src/modules/pricing/priceImpact.compare.nested.spec.ts b/balancer-js/src/modules/pricing/priceImpact.compare.nested.spec.ts new file mode 100644 index 000000000..c4f232925 --- /dev/null +++ b/balancer-js/src/modules/pricing/priceImpact.compare.nested.spec.ts @@ -0,0 +1,120 @@ +// yarn test:only ./src/modules/pricing/priceImpact.compare.nested.spec.ts +import dotenv from 'dotenv'; + +import { BalancerSDK, GraphQLQuery, Network, SimulationType } from '@/.'; +import { parseFixed } from '@ethersproject/bignumber'; +import { JsonRpcProvider } from '@ethersproject/providers'; +import { FORK_NODES, createSubgraphQuery, forkSetup } from '@/test/lib/utils'; +import { ADDRESSES, TestAddress, TestAddresses } from '@/test/lib/constants'; +import { JsonRpcSigner } from '@ethersproject/providers'; +import { RPC_URLS } from '@/test/lib/utils'; +import { testGeneralisedJoin } from '../joins/testHelper'; + +/** + * -- Integration tests for generalisedJoin -- + * + * It compares results from local fork transactions with simulated results from + * the Simulation module, which can be of 3 different types: + * 1. Tenderly: uses Tenderly Simulation API (third party service) + * 2. VaultModel: uses TS math, which may be less accurate (min. 99% accuracy) + * 3. Static: uses staticCall, which is 100% accurate but requires vault approval + */ + +dotenv.config(); + +// mainnet +const TEST_JOIN_WITH_ETH_JOIN_FIRST = true; + +describe('generalised join execution', async function () { + this.timeout(30000); + const simulationType = SimulationType.Static; + let network: Network; + let blockNumber: number; + let jsonRpcUrl: string; + let rpcUrl: string; + let addresses: TestAddresses; + let subgraphQuery: GraphQLQuery; + let sdk: BalancerSDK; + let signer: JsonRpcSigner; + let userAddress: string; + let tokens: TestAddress[]; + let balances: string[]; + let testPool: TestAddress; + + beforeEach(async () => { + await forkSetup( + signer, + tokens.map((t) => t.address), + tokens.map((t) => t.slot as number), + balances, + jsonRpcUrl, + blockNumber + ); + }); + + context('mainnet', async () => { + before(async () => { + network = Network.MAINNET; + blockNumber = 18559730; + jsonRpcUrl = FORK_NODES[network]; + rpcUrl = RPC_URLS[network]; + const provider = new JsonRpcProvider(rpcUrl, network); + signer = provider.getSigner(1); + userAddress = await signer.getAddress(); + addresses = ADDRESSES[network]; + subgraphQuery = createSubgraphQuery( + [ + '0x08775ccb6674d6bdceb0797c364c2653ed84f384', + '0x79c58f70905f734641735bc61e45c19dd9ad60bc', + ], + blockNumber + ); + // // Uncomment and set tenderlyConfig on sdk instantiation in order to test using tenderly simulations + // const tenderlyConfig = { + // accessKey: process.env.TENDERLY_ACCESS_KEY as string, + // user: process.env.TENDERLY_USER as string, + // project: process.env.TENDERLY_PROJECT as string, + // blockNumber, + // }; + sdk = new BalancerSDK({ + network, + rpcUrl, + subgraphQuery, + }); + }); + + context('join with all tokens - unbalanced', async () => { + if (!TEST_JOIN_WITH_ETH_JOIN_FIRST) return true; + + before(async () => { + testPool = addresses.WETH_3POOL; + tokens = [ + addresses.DAI, + addresses.USDC, + addresses.USDT, + addresses.WETH, + ]; + balances = [ + parseFixed('100000', addresses.DAI.decimals).toString(), + parseFixed('1000', addresses.USDC.decimals).toString(), + parseFixed('10', addresses.USDT.decimals).toString(), + parseFixed('0.1', addresses.WETH.decimals).toString(), + ]; + }); + + it('should join with all tokens', async () => { + const tokensIn = tokens.map((t) => t.address); + const amountsIn = balances; + await testGeneralisedJoin( + sdk, + signer, + userAddress, + testPool, + tokensIn, + amountsIn, + simulationType + ); + }); + }); + }); +}); diff --git a/balancer-js/src/modules/pricing/priceImpact.compare.spec.ts b/balancer-js/src/modules/pricing/priceImpact.compare.spec.ts new file mode 100644 index 000000000..41afa826f --- /dev/null +++ b/balancer-js/src/modules/pricing/priceImpact.compare.spec.ts @@ -0,0 +1,636 @@ +// yarn test:only ./src/modules/pricing/priceImpact.compare.spec.ts +import { BigNumber, formatFixed, parseFixed } from '@ethersproject/bignumber'; +import { JsonRpcProvider } from '@ethersproject/providers'; +import dotenv from 'dotenv'; +import * as fs from 'fs'; + +import { + Address, + BalancerSDK, + Network, + PoolToken, + PoolWithMethods, + SubgraphPoolBase, + SwapType, + max, + min, +} from '@/.'; +import { forkSetup, TestPoolHelper } from '@/test/lib/utils'; +import { queryBatchSwap } from '../swaps/queryBatchSwap'; +import { Zero } from '@ethersproject/constants'; + +dotenv.config(); + +const { ALCHEMY_URL: jsonRpcUrl } = process.env; + +const rpcUrl = 'http://127.0.0.1:8545'; +const network = Network.MAINNET; +const sdk = new BalancerSDK({ network, rpcUrl }); +const { contracts, pricing } = sdk; +const provider = new JsonRpcProvider(rpcUrl, 1); +const signer = provider.getSigner(); +const { balancerHelpers, vault } = contracts; +const csvFilePath = 'OATH_GRAIN_USDC_WETH_3.csv'; +// Write the header to the CSV file +const csvLine = 'action,test,spot price,ABA,error abs,error rel,\n'; +fs.writeFileSync(csvFilePath, csvLine, { flag: 'w' }); +const writeNewTable = (header: string) => { + fs.writeFileSync(csvFilePath, `${header}\n`, { flag: 'a' }); +}; + +const blockNumber = 18559730; +const testPoolId = + '0x67f117350eab45983374f4f83d275d8a5d62b1bf0001000000000000000004f2'; // 80BAL/20WETH + +/** + * When testing pools with phantom BPT (e.g. ComposableStable), indexes should consider pool tokens with BPT + */ + +// swap config +const swapAmountFloat = '500'; +const swapAmountFloats = [ + swapAmountFloat, + String(Number(swapAmountFloat) * 2), + String(Number(swapAmountFloat) * 5), + String(Number(swapAmountFloat) * 10), + String(Number(swapAmountFloat) * 25), + String(Number(swapAmountFloat) * 50), + String(Number(swapAmountFloat) * 100), +]; +const assetInIndex = 3; +const assetOutIndex = 1; + +// single token join config +const joinAmountFloat = '500'; +const tokenIndex = 3; +const singleTokenJoinTests = [ + { amountFloat: joinAmountFloat, tokenIndex }, + { amountFloat: String(Number(joinAmountFloat) * 2), tokenIndex }, + { amountFloat: String(Number(joinAmountFloat) * 5), tokenIndex }, + { amountFloat: String(Number(joinAmountFloat) * 10), tokenIndex }, + { amountFloat: String(Number(joinAmountFloat) * 25), tokenIndex }, + { amountFloat: String(Number(joinAmountFloat) * 50), tokenIndex }, + { amountFloat: String(Number(joinAmountFloat) * 100), tokenIndex }, +]; + +// unbalanced join config +// const amountsInFloat = ['0', '200', '100', '10']; // should add value for BPT if present +const unbalancedJoinTests = [ + { amountsInFloat: ['1', '1', '1', '10'] }, + { amountsInFloat: ['1', '1', '1', '100'] }, + { amountsInFloat: ['1', '1', '1', '1000'] }, + { amountsInFloat: ['1', '1', '1', '10000'] }, + { amountsInFloat: ['1', '1', '1', '200000'] }, + // Add more test scenarios as needed +]; + +const exitAmountFloat = '10'; +const tokenOutIndex = 1; +const singleTokenExitTests = [ + { amountFloat: exitAmountFloat, tokenOutIndex }, + { amountFloat: String(Number(exitAmountFloat) * 2), tokenOutIndex }, + { amountFloat: String(Number(exitAmountFloat) * 5), tokenOutIndex }, + { amountFloat: String(Number(exitAmountFloat) * 10), tokenOutIndex }, + { amountFloat: String(Number(exitAmountFloat) * 25), tokenOutIndex }, + { amountFloat: String(Number(exitAmountFloat) * 50), tokenOutIndex }, + { amountFloat: String(Number(exitAmountFloat) * 100), tokenOutIndex }, + // Add more test scenarios as needed +]; + +describe('Price impact comparison tests', async () => { + let pool: PoolWithMethods; + let signerAddress: Address; + let testPoolHelper: TestPoolHelper; + let priceImpactSpot: number; + let priceImpactABA: number; + + before(async () => { + signerAddress = await signer.getAddress(); + testPoolHelper = new TestPoolHelper( + testPoolId, + network, + rpcUrl, + blockNumber + ); + pool = await testPoolHelper.getPool(); + }); + + // Setup chain + beforeEach(async function () { + await forkSetup(signer, [], [], [], jsonRpcUrl as string, blockNumber); + pool = await testPoolHelper.getPool(); // update the pool after the forkSetup; + }); + + swapAmountFloats.forEach((swapAmountFloat, index) => { + context('swap', async () => { + let swapAmount: BigNumber; + + before(() => { + swapAmount = parseFixed( + swapAmountFloat, + pool.tokens[assetInIndex].decimals + ); + }); + + after(async () => { + const csvLine = `swap,${ + index + 1 + },${priceImpactSpot},${priceImpactABA},${ + priceImpactABA - priceImpactSpot + },${(priceImpactABA - priceImpactSpot) / priceImpactSpot}\n`; + fs.writeFileSync(csvFilePath, csvLine, { flag: 'a' }); + + writeNewTable('Swap Summary'); + + // Query and write the token balances + for (let i = 0; i < pool.tokensList.length; i++) { + const token = pool.tokensList[i]; + const amount = + i === assetInIndex ? swapAmountFloats[index].toString() : '0'; + const balance = await pool.tokens[i].balance; + const relativeValue = (Number(amount) / Number(balance)).toString(); + fs.writeFileSync( + csvFilePath, + `${token},${amount},${balance.toString()},${relativeValue}\n`, + { flag: 'a' } + ); + } + fs.writeFileSync(csvFilePath, '\n', { flag: 'a' }); + }); + + it(`should calculate price impact - spot price method - Test ${ + index + 1 + }`, async () => { + const swapAmounts = await queryBatchSwap( + vault, + SwapType.SwapExactIn, + [ + { + poolId: pool.id, + assetInIndex, + assetOutIndex, + amount: swapAmount.toString(), + userData: '0x', + }, + ], + pool.tokensList + ); + + const amountIn = parseFloat( + formatFixed( + swapAmounts[assetInIndex], + pool.tokens[assetInIndex].decimals + ) + ); + + const amountOut = + -1 * + parseFloat( + formatFixed( + swapAmounts[assetOutIndex], + pool.tokens[assetOutIndex].decimals + ) + ); + + const effectivePrice = amountIn / amountOut; + + const subgraphPool: SubgraphPoolBase = pool as SubgraphPoolBase; + + const spotPrice = await pricing.getSpotPrice( + pool.tokensList[assetInIndex], + pool.tokensList[assetOutIndex], + [subgraphPool] + ); + + const priceRatio = parseFloat(spotPrice) / effectivePrice; + priceImpactSpot = 1 - priceRatio + parseFloat(pool.swapFee); // remove swapFee to have results similar to the UI + console.log(`priceImpactSpotPrice: ${priceImpactSpot}`); + }); + + it(`should calculate price impact - ABA method - Test ${ + index + 1 + }`, async () => { + const swapAtoB = await queryBatchSwap( + vault, + SwapType.SwapExactIn, + [ + { + poolId: pool.id, + assetInIndex, + assetOutIndex, + amount: swapAmount.toString(), + userData: '0x', + }, + ], + pool.tokensList + ); + const B = BigNumber.from(-1).mul(swapAtoB[assetOutIndex]); + + const swapBtoA = await queryBatchSwap( + vault, + SwapType.SwapExactIn, + [ + { + poolId: pool.id, + assetInIndex: assetOutIndex, + assetOutIndex: assetInIndex, + amount: B.toString(), + userData: '0x', + }, + ], + pool.tokensList + ); + const finalA = parseFloat( + formatFixed( + BigNumber.from(-1).mul(swapBtoA[assetInIndex]), + pool.tokens[assetInIndex].decimals + ) + ); + + const initialA = parseFloat( + formatFixed(swapAmount, pool.tokens[assetInIndex].decimals) + ); + + priceImpactABA = (initialA - finalA) / initialA / 2; + console.log(`priceImpactABA : ${priceImpactABA}`); + }); + }); + }); + + singleTokenJoinTests.forEach((test, index) => { + context('single token join', async () => { + let tokenIn: PoolToken; + let amountIn: BigNumber; + + before(() => { + tokenIn = pool.tokens[test.tokenIndex]; + amountIn = parseFixed(test.amountFloat, tokenIn.decimals); + }); + + after(async () => { + const csvLine = `single token join,${ + index + 1 + },${priceImpactSpot},${priceImpactABA},${ + priceImpactABA - priceImpactSpot + },${(priceImpactABA - priceImpactSpot) / priceImpactSpot}\n`; + fs.writeFileSync(csvFilePath, csvLine, { flag: 'a' }); + + writeNewTable('Single-Sided Join Summary'); + + // Query and write the token balances for single-sided join summary + for (let i = 0; i < pool.tokensList.length; i++) { + const token = pool.tokensList[i]; + const amount = + i === singleTokenJoinTests[i].tokenIndex + ? singleTokenJoinTests[index].amountFloat + : '0'; + const balance = await pool.tokens[i].balance; + const relativeValue = (Number(amount) / Number(balance)).toString(); + fs.writeFileSync( + csvFilePath, + `${token},${amount},${balance.toString()},${relativeValue}\n`, + { flag: 'a' } + ); + } + + // Write an empty line after single-sided join summary + fs.writeFileSync(csvFilePath, '\n', { flag: 'a' }); + }); + + it('should calculate price impact - spot price method', async () => { + const tokensIn = [...pool.tokensList]; + const amountsIn = Array(pool.tokensList.length).fill('0'); + + amountsIn[test.tokenIndex] = amountIn.toString(); // Use the index specified in the test scenario + + const bptIndex = tokensIn.findIndex((t) => t === pool.address); + if (bptIndex > -1) { + tokensIn.splice(bptIndex, 1); + amountsIn.splice(bptIndex, 1); + } + + const { priceImpact } = pool.buildJoin( + signerAddress, + tokensIn, + amountsIn, + '0' // slippage + ); + + priceImpactSpot = parseFloat( + formatFixed(BigNumber.from(priceImpact), 18) + ); + console.log(`priceImpactSpotPrice: ${priceImpactSpot}`); + }); + + it('should calculate price impact - ABA method', async () => { + const maxAmountsInByToken = new Map([ + [tokenIn.address, amountIn], + ]); + + const joinParams = pool.buildQueryJoinExactIn({ + maxAmountsInByToken, + }); + + const { bptOut } = await balancerHelpers.callStatic.queryJoin( + ...joinParams + ); + + const exitParams = pool.buildQueryExitToSingleToken({ + bptIn: bptOut, + tokenOut: tokenIn.address, + }); + + const { amountsOut } = await balancerHelpers.callStatic.queryExit( + ...exitParams + ); + + const initialA = parseFloat(formatFixed(amountIn, tokenIn.decimals)); + const finalA = parseFloat( + formatFixed(amountsOut[test.tokenIndex], tokenIn.decimals) // Use the index specified in the test scenario + ); + priceImpactABA = (initialA - finalA) / initialA / 2; + console.log(`priceImpactABA : ${priceImpactABA}`); + }); + }); + }); + + unbalancedJoinTests.forEach((test, index) => { + context('unbalanced join - generalized (multi-token)', async () => { + let tokensIn: string[]; + let amountsIn: BigNumber[]; + + beforeEach(() => { + tokensIn = [...pool.tokensList]; + amountsIn = pool.tokens.map((token, i) => + parseFixed(test.amountsInFloat[i], token.decimals) + ); + }); + + after(async () => { + const csvLine = `unbalanced join,${ + index + 1 + },${priceImpactSpot},${priceImpactABA},${ + priceImpactABA - priceImpactSpot + },${(priceImpactABA - priceImpactSpot) / priceImpactSpot}\n`; + fs.writeFileSync(csvFilePath, csvLine, { flag: 'a' }); + + // Write unbalanced join summary table + writeNewTable('Unbalanced Join Summary'); + + // Query and write the token balances for unbalanced join summary + for (let i = 0; i < pool.tokensList.length; i++) { + const token = pool.tokensList[i]; + const amount = unbalancedJoinTests[index].amountsInFloat[i]; + const balance = await pool.tokens[i].balance; + const relativeValue = (Number(amount) / Number(balance)).toString(); + fs.writeFileSync( + csvFilePath, + `${token},${amount},${balance.toString()},${relativeValue}\n`, + { flag: 'a' } + ); + } + + // Write an empty line after unbalanced join summary + fs.writeFileSync(csvFilePath, '\n', { flag: 'a' }); + }); + + it('should calculate price impact - spot price method', async () => { + const bptIndex = tokensIn.findIndex((t) => t === pool.address); + if (bptIndex > -1) { + tokensIn.splice(bptIndex, 1); + amountsIn.splice(bptIndex, 1); + } + + const { priceImpact } = pool.buildJoin( + signerAddress, + tokensIn, + amountsIn.map((amount) => amount.toString()), + '0' // slippage + ); + + priceImpactSpot = parseFloat( + formatFixed(BigNumber.from(priceImpact), 18) + ); + console.log(`priceImpactSpotPrice: ${priceImpactSpot}`); + }); + + it('should calculate price impact - ABA method - generalized (multi-token)', async () => { + const maxAmountsInByToken = new Map( + amountsIn.map((a, i) => [tokensIn[i], a]) + ); + + // query unbalanced join + const { bptOut } = await balancerHelpers.callStatic.queryJoin( + ...pool.buildQueryJoinExactIn({ + maxAmountsInByToken, + }) + ); + + // calculate proportional amounts out + const { amountsOut } = await balancerHelpers.callStatic.queryExit( + ...pool.buildQueryExitProportionally({ + bptIn: bptOut, + }) + ); + + // diff between unbalanced and proportional amounts for token 1 + const diffs = amountsOut.map((a, i) => a.sub(amountsIn[i])); + + const diffBPTs: BigNumber[] = []; + for (let i = 0; i < diffs.length; i++) { + if (diffs[i].eq(Zero)) { + diffBPTs.push(Zero); + } else { + const diffQuery = await balancerHelpers.callStatic.queryJoin( + ...pool.buildQueryJoinExactIn({ + maxAmountsInByToken: new Map([ + [tokensIn[i], diffs[i].abs()], + ]), + }) + ); + const diffBPT = diffQuery.bptOut.mul(diffs[i].gte(0) ? 1 : -1); + diffBPTs.push(diffBPT); + } + } + let minPositiveDiffIndex = 0; + let minNegativeDiffIndex = 1; + + const nonZeroDiffs = diffs.filter((a) => !a.eq(Zero)); + for (let i = 0; i < nonZeroDiffs.length - 1; i++) { + minPositiveDiffIndex = diffBPTs.findIndex((diffBPT) => + diffBPT.eq(min(diffBPTs.filter((a) => a.gt(0)))) + ); + minNegativeDiffIndex = diffBPTs.findIndex((diffBPT) => + diffBPT.eq(max(diffBPTs.filter((a) => a.lt(0)))) + ); + + let returnAmounts: string[]; + if ( + diffBPTs[minPositiveDiffIndex] < + diffBPTs[minNegativeDiffIndex].abs() + ) { + // swap that diff to token other (non-excess) + returnAmounts = await queryBatchSwap( + vault, + SwapType.SwapExactIn, + [ + { + poolId: pool.id, + assetInIndex: minPositiveDiffIndex, + assetOutIndex: minNegativeDiffIndex, + amount: diffs[minPositiveDiffIndex].toString(), + userData: '0x', + }, + ], + pool.tokensList + ); + diffs[minPositiveDiffIndex] = Zero; + diffBPTs[minPositiveDiffIndex] = Zero; + diffs[minNegativeDiffIndex] = diffs[minNegativeDiffIndex].sub( + BigNumber.from(returnAmounts[minNegativeDiffIndex]) + ); + const diffQuery = await balancerHelpers.callStatic.queryJoin( + ...pool.buildQueryJoinExactIn({ + maxAmountsInByToken: new Map([ + [ + tokensIn[minNegativeDiffIndex], + diffs[minNegativeDiffIndex].abs(), + ], + ]), + }) + ); + diffBPTs[minNegativeDiffIndex] = diffQuery.bptOut.mul(-1); + } else { + returnAmounts = await queryBatchSwap( + vault, + SwapType.SwapExactOut, + [ + { + poolId: pool.id, + assetInIndex: minPositiveDiffIndex, + assetOutIndex: minNegativeDiffIndex, + amount: diffs[minNegativeDiffIndex].abs().toString(), + userData: '0x', + }, + ], + pool.tokensList + ); + diffs[minNegativeDiffIndex] = Zero; + diffBPTs[minNegativeDiffIndex] = Zero; + diffs[minPositiveDiffIndex] = diffs[minPositiveDiffIndex].add( + BigNumber.from(returnAmounts[minPositiveDiffIndex]) + ); + const diffQuery = await balancerHelpers.callStatic.queryJoin( + ...pool.buildQueryJoinExactIn({ + maxAmountsInByToken: new Map([ + [ + tokensIn[minPositiveDiffIndex], + diffs[minPositiveDiffIndex].abs(), + ], + ]), + }) + ); + diffBPTs[minPositiveDiffIndex] = diffQuery.bptOut; + } + } + + const amountInitial = parseFloat( + amountsIn[minNegativeDiffIndex].toString() + ); + const amountDiff = parseFloat( + diffs[minNegativeDiffIndex].abs().toString() + ); + + priceImpactABA = amountDiff / amountInitial / 2; + console.log(`priceImpactABA : ${priceImpactABA}`); + }); + }); + }); + + singleTokenExitTests.forEach((test, index) => { + context('single token exit', async () => { + let tokenOut: PoolToken; + let amountIn: BigNumber; + + before(() => { + tokenOut = pool.tokens[test.tokenOutIndex]; + amountIn = parseFixed(test.amountFloat, 18); + }); + + after(async () => { + const csvLine = `single token exit,${ + index + 1 + },${priceImpactSpot},${priceImpactABA},${ + priceImpactABA - priceImpactSpot + },${(priceImpactABA - priceImpactSpot) / priceImpactSpot}\n`; + fs.writeFileSync(csvFilePath, csvLine, { flag: 'a' }); + + writeNewTable('Single-Sided Exit Summary'); + + // Query and write the token balances for single-sided exit summary + for (let i = 0; i < pool.tokensList.length; i++) { + const token = pool.tokensList[i]; + const amount = + i === singleTokenExitTests[i].tokenOutIndex + ? singleTokenExitTests[index].amountFloat + : '0'; + const balance = await pool.tokens[i].balance; + const relativeValue = (Number(amount) / Number(balance)).toString(); + fs.writeFileSync( + csvFilePath, + `${token},${amount},${balance.toString()},${relativeValue}\n`, + { flag: 'a' } + ); + } + + // Write an empty line after single-sided join summary + fs.writeFileSync(csvFilePath, '\n', { flag: 'a' }); + }); + + it('should calculate price impact - spot price method', async () => { + const { priceImpact } = pool.buildExitExactBPTIn( + signerAddress, + amountIn.toString(), + '0', + false, + tokenOut.address + ); + + priceImpactSpot = parseFloat( + formatFixed(BigNumber.from(priceImpact), 18) + ); + console.log(`priceImpactSpotPrice: ${priceImpactSpot}`); + }); + + it('should calculate price impact - ABA method', async () => { + const exitParams = pool.buildQueryExitToSingleToken({ + bptIn: amountIn, + tokenOut: tokenOut.address, + }); + + const { amountsOut } = await balancerHelpers.callStatic.queryExit( + ...exitParams + ); + + const tokensOut = [...pool.tokensList]; + + const maxAmountsInByToken = new Map( + amountsOut.map((a, i) => [tokensOut[i], a]) + ); + + const joinParams = pool.buildQueryJoinExactIn({ + maxAmountsInByToken, + }); + + const { bptOut } = await balancerHelpers.callStatic.queryJoin( + ...joinParams + ); + + const initialA = parseFloat(formatFixed(amountIn, 18)); + const finalA = parseFloat(formatFixed(bptOut, 18)); + priceImpactABA = (initialA - finalA) / initialA / 2; + console.log(`priceImpactABA : ${priceImpactABA}`); + }); + }); + }); +}); diff --git a/balancer-js/src/modules/relayer/actions.ts b/balancer-js/src/modules/relayer/actions.ts index 16bc73fd5..b53ed51d7 100644 --- a/balancer-js/src/modules/relayer/actions.ts +++ b/balancer-js/src/modules/relayer/actions.ts @@ -76,7 +76,7 @@ export const exit = ( ); } else { const encoder = isComposable - ? ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut + ? ComposableStablePoolEncoder.exitExactBPTInForTokensOut : StablePoolEncoder.exitExactBPTInForTokensOut; userData = encoder(amount); } diff --git a/balancer-js/src/pool-composable-stable/encoder.ts b/balancer-js/src/pool-composable-stable/encoder.ts index 8b8a182a0..2b2f2d67d 100644 --- a/balancer-js/src/pool-composable-stable/encoder.ts +++ b/balancer-js/src/pool-composable-stable/encoder.ts @@ -99,7 +99,7 @@ export class ComposableStablePoolEncoder { * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT * @param bptAmountIn - the amount of BPT to be burned */ - static exitExactBPTInForAllTokensOut = (bptAmountIn: BigNumberish): string => + static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string => defaultAbiCoder.encode( ['uint256', 'uint256'], [ diff --git a/balancer-js/src/test/lib/constants.ts b/balancer-js/src/test/lib/constants.ts index 48f89bf1a..2f320e637 100644 --- a/balancer-js/src/test/lib/constants.ts +++ b/balancer-js/src/test/lib/constants.ts @@ -408,6 +408,13 @@ export const ADDRESSES = { symbol: 'bveth', slot: 0, }, + WETH_3POOL: { + id: '0x08775ccb6674d6bdceb0797c364c2653ed84f3840002000000000000000004f0', + address: '0x08775ccb6674d6bdceb0797c364c2653ed84f384', + decimals: 18, + symbol: 'weth_3pool', + slot: 0, + }, }, [Network.POLYGON]: { MATIC: { diff --git a/balancer-js/wstETH-rETH-sfrxETH.csv b/balancer-js/wstETH-rETH-sfrxETH.csv new file mode 100644 index 000000000..566777e14 --- /dev/null +++ b/balancer-js/wstETH-rETH-sfrxETH.csv @@ -0,0 +1,134 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.00040377556888164767,0.00040370224878127914,-7.332010036853161e-8,-0.0001815862722244663 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,3049.113080910972561465,0.0032796422220629272 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,2,0.00040752761462463616,0.00040748466224682645,-4.2952377809709914e-8,-0.00010539746576258964 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,20,3049.113080910972561465,0.0065592844441258544 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,3,0.00041865039101878187,0.00041883520209616163,1.848110773797619e-7,0.00044144489374541327 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,50,3049.113080910972561465,0.016398211110314635 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,4,0.0004367569669131873,0.0004377776577118198,0.0000010206907986324491,0.002336976570393961 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,3049.113080910972561465,0.03279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,5,0.0004880753174956617,0.0004950607027807906,0.000006985385285128876,0.014312105191000499 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,250,3049.113080910972561465,0.08199105555157317 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,6,0.0005649246215843502,0.0005938876298481546,0.000028963008263804368,0.0512688014598773 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,500,3049.113080910972561465,0.16398211110314634 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,7,0.0006937172565830037,0.0008207671867847921,0.00012704993020178838,0.18314367848882648 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,3049.113080910972561465,0.3279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,1,0.000299821876819659,0.0002997818706826472,-4.000613701183068e-8,-0.00013343301508279907 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,3049.113080910972561465,0.0032796422220629272 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,2,0.000301646893391609,0.00030162116023273454,-2.573315887444529e-8,-0.00008530888080799017 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,20,3049.113080910972561465,0.0065592844441258544 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,3,0.000307064127222337,0.00030714052265715,7.639543481299067e-8,0.00024879309577466454 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,50,3049.113080910972561465,0.016398211110314635 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,4,0.000315905711879544,0.0003163503571391857,4.446452596417231e-7,0.001407525229588973 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,3049.113080910972561465,0.03279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,5,0.000341126126129627,0.00034417624561956475,0.0000030501194899377397,0.008941324795447366 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,250,3049.113080910972561465,0.08199105555157317 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,6,0.000379371869200906,0.0003919909344199368,0.000012619065219030814,0.033263049381102285 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,500,3049.113080910972561465,0.16398211110314634 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,7,0.00044486981991085,0.00050014069422582,0.00005527087431496998,0.12424055721749348 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,3049.113080910972561465,0.3279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +unbalanced join,1,0.001395038034686279,0.002192811273091142,0.000797773238404863,0.5718648657377066 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,3049.113080910972561465,0.0032796422220629272 +0xac3e018457b222d93114458476f3e3416abbe38f,100,8353.098667955846370862,0.011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,1000,1210.62732888482209938,0.8260180289512851 + +unbalanced join,2,0.000143047857261436,0.00015267199507975335,0.000009624137818317347,0.0672791470111164 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,3049.113080910972561465,0.03279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,1000,8353.098667955846370862,0.11971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,10,1210.62732888482209938,0.00826018028951285 + +unbalanced join,3,0.00038505679898757,0.00045787494478876696,0.00007281814580119696,0.18911014165353718 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,3049.113080910972561465,0.3279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,100,8353.098667955846370862,0.011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,10,1210.62732888482209938,0.00826018028951285 + +unbalanced join,4,0.001013680814663362,0.17080316632882703,0.16978948551416367,167.497976737924 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10000,3049.113080910972561465,3.279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,100,8353.098667955846370862,0.011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,10,1210.62732888482209938,0.00826018028951285 + +unbalanced join,5,0.000392060534909374,0.00048104049267803326,0.00008897995776865924,0.22695464053587344 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,3049.113080910972561465,0.3279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,10,8353.098667955846370862,0.0011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,100,1210.62732888482209938,0.08260180289512851 + diff --git a/balancer-js/wstETH-rETH-sfrxETH2.csv b/balancer-js/wstETH-rETH-sfrxETH2.csv new file mode 100644 index 000000000..1b7313a58 --- /dev/null +++ b/balancer-js/wstETH-rETH-sfrxETH2.csv @@ -0,0 +1,134 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.0004283912778082929,0.00042806104367647534,-3.302341318175495e-7,-0.0007708703442961572 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,10,8353.098667955846370862,0.0011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,2,0.0004572448473324938,0.0004562098909301149,-0.0000010349564023789145,-0.002263462143787325 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,20,8353.098667955846370862,0.0023943210531828137 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,3,0.0005466729048109627,0.000540811384178923,-0.000005861520632039667,-0.01072217148582946 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,50,8353.098667955846370862,0.005985802632957034 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,4,0.0007060207535101611,0.0006829855658425288,-0.000023035187667632328,-0.03262678547777392 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,100,8353.098667955846370862,0.011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,5,0.0012789410837668487,0.0011316562951678862,-0.00014728478859896252,-0.1151615117133985 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,250,8353.098667955846370862,0.02992901316478517 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,6,0.0027369118309386485,0.0020680185874056745,-0.000668893243532974,-0.24439707409338468 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,500,8353.098667955846370862,0.05985802632957034 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +swap,7,0.01362716608677421,0.007774804253618072,-0.005852361833156139,-0.42946286820677443 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,1000,8353.098667955846370862,0.11971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,1,0.000141160724287733,0.000141150623579378,-1.0100708354980224e-8,-0.00007155466512336382 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,10,8353.098667955846370862,0.0011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,2,0.000141824665531002,0.00014181405828148642,-1.0607249515586295e-8,-0.00007479128877809774 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,20,8353.098667955846370862,0.0023943210531828137 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,3,0.000143818133399513,0.00014380435328391174,-1.378011560125591e-8,-0.0000958162595740001 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,50,8353.098667955846370862,0.005985802632957034 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,4,0.000147146065555781,0.00014712148674476567,-2.457881101533728e-8,-0.00016703682101523672 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,100,8353.098667955846370862,0.011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,5,0.000157171102666413,0.00015707280568142323,-9.829698498976694e-8,-0.0006254138535783952 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,250,8353.098667955846370862,0.02992901316478517 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,6,0.000174017568235215,0.0001736587557152802,-3.588125199347966e-7,-0.0020619327322733247 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,500,8353.098667955846370862,0.05985802632957034 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +single token join,7,0.000208232290938202,0.00020683753645317891,-0.0000013947544850230898,-0.006698070115537543 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,1000,8353.098667955846370862,0.11971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,0,1210.62732888482209938,0 + +unbalanced join,1,0.001528041636788634,0.002348638488951725,0.0008205968521630912,0.5370251912033469 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,3049.113080910972561465,0.0032796422220629272 +0xac3e018457b222d93114458476f3e3416abbe38f,20,8353.098667955846370862,0.0023943210531828137 +0xae78736cd615f374d3085123a210448e74fc6393,1000,1210.62732888482209938,0.8260180289512851 + +unbalanced join,2,0.000090273444101954,0.00019133342671715545,0.00010105998261520144,1.119487393225689 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,3049.113080910972561465,0.03279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,100,8353.098667955846370862,0.011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,20,1210.62732888482209938,0.0165203605790257 + +unbalanced join,3,0.00022740264423605,0,-0.00022740264423605,-1 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,70,3049.113080910972561465,0.022957495554440488 +0xac3e018457b222d93114458476f3e3416abbe38f,10,8353.098667955846370862,0.0011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,10,1210.62732888482209938,0.00826018028951285 + +unbalanced join,4,0.000426465472236124,0.00047581041108316595,0.00004934493884704193,0.1157067618822862 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,3049.113080910972561465,0.3279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,20,8353.098667955846370862,0.0023943210531828137 +0xae78736cd615f374d3085123a210448e74fc6393,10,1210.62732888482209938,0.00826018028951285 + +unbalanced join,5,0.000407509868197791,0,-0.000407509868197791,-1 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,1000,3049.113080910972561465,0.3279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,10,8353.098667955846370862,0.0011971605265914068 +0xae78736cd615f374d3085123a210448e74fc6393,200,1210.62732888482209938,0.16520360579025703 + diff --git a/balancer-js/wstETH-rETH-sfrxETH3.csv b/balancer-js/wstETH-rETH-sfrxETH3.csv new file mode 100644 index 000000000..1f228bebf --- /dev/null +++ b/balancer-js/wstETH-rETH-sfrxETH3.csv @@ -0,0 +1,134 @@ +action,test,spot price,ABA,error abs,error rel, +swap,1,0.00042513897108358256,0.00042522406651457345,8.509543099089216e-8,0.000200159093328949 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,10,1210.62732888482209938,0.00826018028951285 + +swap,2,0.000449896614815137,0.00045053520436804105,6.385895529040708e-7,0.0014194139984059849 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,20,1210.62732888482209938,0.0165203605790257 + +swap,3,0.0005219892862547311,0.0005266091246364368,0.0000046198383817057246,0.008850446749305962 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,50,1210.62732888482209938,0.04130090144756426 + +swap,4,0.0006353908140078076,0.0006544619688385467,0.000019071154830739112,0.030014841905638204 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,100,1210.62732888482209938,0.08260180289512851 + +swap,5,0.0009332151386645556,0.001058156804968405,0.0001249416663038495,0.13388302560398113 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,250,1210.62732888482209938,0.20650450723782127 + +swap,6,0.0013274142607690327,0.0019040648029946966,0.0005766505422256638,0.43441641337466375 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,500,1210.62732888482209938,0.41300901447564253 + +swap,7,0.0019048211142684175,0.007441533203378242,0.005536712089109825,2.9066834925526868 +Swap Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,1000,1210.62732888482209938,0.8260180289512851 + +single token join,1,0.000383513812105359,0.00038362141092074253,1.0759881538351373e-7,0.00028056047002018836 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,10,1210.62732888482209938,0.00826018028951285 + +single token join,2,0.000405156684750136,0.00040579925211066127,6.425673605252855e-7,0.0015859725007908063 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,20,1210.62732888482209938,0.0165203605790257 + +single token join,3,0.000468039324886439,0.000472464032825286,0.000004424707938847027,0.00945370977090568 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,50,1210.62732888482209938,0.04130090144756426 + +single token join,4,0.000566491533663987,0.0005845522225693856,0.00001806068890539852,0.031881657239578746 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,100,1210.62732888482209938,0.08260180289512851 + +single token join,5,0.000821700419180966,0.0009392830235303791,0.00011758260434941315,0.14309668293295288 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,250,1210.62732888482209938,0.20650450723782127 + +single token join,6,0.001148395863294284,0.0016892046510799332,0.0005408087877856493,0.47092540566480906 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,500,1210.62732888482209938,0.41300901447564253 + +single token join,7,0.001582365470886681,0.006761664642277254,0.005179299171390573,3.2731371270938716 +Single-Sided Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,0,3049.113080910972561465,0 +0xac3e018457b222d93114458476f3e3416abbe38f,0,8353.098667955846370862,0 +0xae78736cd615f374d3085123a210448e74fc6393,1000,1210.62732888482209938,0.8260180289512851 + +unbalanced join,1,0.000130729624292453,0.0004013075526808268,0.0002705779283883738,2.0697522069142384 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,3049.113080910972561465,0.0032796422220629272 +0xac3e018457b222d93114458476f3e3416abbe38f,200,8353.098667955846370862,0.023943210531828137 +0xae78736cd615f374d3085123a210448e74fc6393,100,1210.62732888482209938,0.08260180289512851 + +unbalanced join,2,0.000227153595183896,0,-0.000227153595183896,-1 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,10,3049.113080910972561465,0.0032796422220629272 +0xac3e018457b222d93114458476f3e3416abbe38f,5,8353.098667955846370862,0.0005985802632957034 +0xae78736cd615f374d3085123a210448e74fc6393,20,1210.62732888482209938,0.0165203605790257 + +unbalanced join,3,0.000133310891266468,0,-0.000133310891266468,-1 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,5,3049.113080910972561465,0.0016398211110314636 +0xac3e018457b222d93114458476f3e3416abbe38f,5,8353.098667955846370862,0.0005985802632957034 +0xae78736cd615f374d3085123a210448e74fc6393,5,1210.62732888482209938,0.004130090144756425 + +unbalanced join,4,0.001389759125006863,0.0027240022993653213,0.0013342431743584584,0.9600535447837909 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,3049.113080910972561465,0.03279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,20,8353.098667955846370862,0.0023943210531828137 +0xae78736cd615f374d3085123a210448e74fc6393,1000,1210.62732888482209938,0.8260180289512851 + +unbalanced join,5,0.000219440059850442,0,-0.000219440059850442,-1 +Unbalanced Join Summary +0x42ed016f826165c2e5976fe5bc3df540c5ad0af7,0,2596148429267391.797360501734824291,0 +0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,100,3049.113080910972561465,0.03279642222062927 +0xac3e018457b222d93114458476f3e3416abbe38f,20,8353.098667955846370862,0.0023943210531828137 +0xae78736cd615f374d3085123a210448e74fc6393,20,1210.62732888482209938,0.0165203605790257 + diff --git a/balancer-js/yarn.lock b/balancer-js/yarn.lock index afb0ee1af..8109cde3b 100644 --- a/balancer-js/yarn.lock +++ b/balancer-js/yarn.lock @@ -6006,7 +6006,7 @@ ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tsconfig-paths@^3.14.1, tsconfig-paths@^3.5.0: +tsconfig-paths@^3.5.0: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== @@ -6016,6 +6016,15 @@ tsconfig-paths@^3.14.1, tsconfig-paths@^3.5.0: minimist "^1.2.6" strip-bom "^3.0.0" +tsconfig-paths@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" + integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== + dependencies: + json5 "^2.2.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@^1.8.1, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"