Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

1206/adjusting exported csv #1218

Merged
merged 11 commits into from
Jul 13, 2020
Merged

1206/adjusting exported csv #1218

merged 11 commits into from
Jul 13, 2020

Conversation

alfetopito
Copy link
Contributor

@alfetopito alfetopito commented Jul 9, 2020

Update July 10

Addressed comments:

  • Removed 2 unit columns, keeping 1 per price group (fill/limit)
  • Inverted units for price and inverted prices
  • Refactored helper functions into utils
  • liquidity orders now have the Fill % and Total Order Amount filled with `unlimited.

These entries have examples of all changes and it's easy to find verify the price/inverse price and units.

screenshot_2020-07-10_10-05-08

Date,Market,Buy Token Symbol,Buy Token Address,Sell Token Symbol,Sell Token Address,Limit Price,Fill Price,Price Unit,Inverse Limit Price,Inverse Fill Price,Inverse Price Unit,Sold,Sold Unit,Bought,Bought Unit,Type,Fill %,Total Order Amount,Total Order Amount Unit,Transaction Hash,Event Log Index,Order Id,Batch Id
2020-07-10T15:56:39.000Z,WETH/USDC,WETH,0xc778417E063141139Fce010982780140Aa0cD5Ab,USDC,0x4DBCdF9B62e891a7cec5A2568C3F4FAF9E8Abe2b,190.47619048,190.11650401,USDC,0.00525000,0.00525993,WETH,0.955905,USDC,0.005028,WETH,partial,0.004779525,200,USDC,0x94fb4919f7a0b1dd853b9f7a61621bbaa0e8c631aaa13d727f588c14e9c1a86f,3,407,5314655
2020-07-10T15:51:39.000Z,USDC/DAI,USDC,0x4DBCdF9B62e891a7cec5A2568C3F4FAF9E8Abe2b,DAI,0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa,1.67470003,1.05474000,DAI,0.59712186,0.94810095,USDC,0.999997943256991779,DAI,0.948099,USDC,partial,0.04545445196622689905,22,DAI,0xf7a038df874739a42fdc7684eb19049a6c3c2377a5c334e870b944f6de966661,3,406,5314654
2020-07-03T18:11:39.000Z,TUSD/DAI,TUSD,0x0000000000085d4780B73119b644AE5ecd22b376,DAI,0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa,0.99800000,0.97518911,DAI,1.00200401,1.02544214,TUSD,0.030704794767151166,DAI,0.031485990368118173,TUSD,liquidity,unlimited,unlimited,DAI,0x2baa25c1c00bbb4d074aa523a91c34c534ed37641bc3efa79893292e9e4c0c0c,3,289,5312666

Part of #1206

Addressing points 4 to 9
screenshot_2020-07-09_13-17-28

Before:

Date,Market,Buy Token symbol,Buy Token address,Sell Token symbol,Sell Token address,Limit Price,Fill Price,Sold,Bought,Type,Transaction Hash,Event Log Index,Order Id,Batch Id
2020-07-04T09:50:48.000Z,sUSD-old/USDC,sUSD-old,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,1.00010001,1.00010005,15.229894,15.231418,liquidity,0x4cc0eec99bd5806559fbcbf54066b343ddb5e833892e13e93bacaa01a5a88374,140,166,5312854
2020-07-04T06:26:01.000Z,PAX/USDC,PAX,0x8E870D67F660D95d5be530380D0eC0bd388289E1,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,1.00010001,1.00010001,167.531779,167.548535,liquidity,0x2dd0fc28616243d6aa9c7127237416d13aa35cff9b065c1db64c3530e6e8f519,138,151,5312813
2020-07-04T06:26:01.000Z,sUSD-old/USDC,sUSD-old,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,1.00010001,1.00010001,1544.825539,1544.980038,liquidity,0x2dd0fc28616243d6aa9c7127237416d13aa35cff9b065c1db64c3530e6e8f519,136,166,5312813
2020-07-03T23:45:48.000Z,sUSD-old/USDC,sUSD-old,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,1.00010001,1.00010001,923.924322,924.016725,liquidity,0xad2507194d43aa23511fb1494d63a319c889f322058ee2c06910fd4408d74bc9,34,166,5312733
2020-06-21T05:42:02.000Z,sUSD/DAI,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,DAI,0x6B175474E89094C44Da98b954EedeAC495271d0F,1.00010001,1.00050025,0.000090543037541552,0.000090588331707406,liquidity,0xf218d1ae33bcdf7040dcf5eb5ac927488a43c9b671a73a3215ca651175c7b579,90,169,5309060
2020-06-19T14:46:24.000Z,sUSD/USDC,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,1.00010001,1.00300903,3786.08145,3797.473879,liquidity,0x78c55ede2edd9c872bb3e7585297700df55d5a5b748cbf82dd394f128ed4f584,36,166,5308593
2020-06-19T14:41:38.000Z,sUSD/USDC,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,1.00010001,1.00010001,331.956048,331.989247,liquidity,0x667bc7c22f422d788bda105f8270a4abc9c5cf8b1401f89bdd0701e38bd6ef75,51,166,5308592
2020-06-19T05:31:18.000Z,sUSD/USDC,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,1.00010001,1.00010001,5181.962502,5182.480753,liquidity,0xe06d41d26c5db14c211222126684497e75fc2bc4b31950b6d097ef021b03ae3b,27,166,5308482
2020-06-17T13:26:37.000Z,sUSD/PAX,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,PAX,0x8E870D67F660D95d5be530380D0eC0bd388289E1,1.00010001,1.00044970,333.377325229014365521,333.527245426763538337,liquidity,0xb27b3a960c6328618273a4e37709fedb916c83249f8b576229d2f29b61efda48,10,167,5308001

After:

Date,Market,Buy Token Symbol,Buy Token Address,Sell Token Symbol,Sell Token Address,Limit Price,Limit Price Unit,Fill Price,Fill Price Unit,Inverse Limit Price,Inverse Limit Price Unit,Inverse Fill Price,Inverse Fill Price Unit,Sold,Sold Unit,Bought,Bought Unit,Type,Fill %,Total Order Amount,Total Order Amount Unit,Transaction Hash,Event Log Index,Order Id,Batch Id
2020-07-04T09:50:48.000Z,sUSD-old/USDC,sUSD-old,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0.99990000,sUSD-old,0.99989996,sUSD-old,1.00010001,USDC,1.00010005,USDC,15.229894,USDC,15.231418,sUSD-old,liquidity,N/A,N/A,USDC,0x4cc0eec99bd5806559fbcbf54066b343ddb5e833892e13e93bacaa01a5a88374,140,166,5312854
2020-07-04T06:26:01.000Z,PAX/USDC,PAX,0x8E870D67F660D95d5be530380D0eC0bd388289E1,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0.99990000,PAX,0.99990000,PAX,1.00010001,USDC,1.00010001,USDC,167.531779,USDC,167.548535,PAX,liquidity,N/A,N/A,USDC,0x2dd0fc28616243d6aa9c7127237416d13aa35cff9b065c1db64c3530e6e8f519,138,151,5312813
2020-07-04T06:26:01.000Z,sUSD-old/USDC,sUSD-old,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0.99990000,sUSD-old,0.99990000,sUSD-old,1.00010001,USDC,1.00010001,USDC,1544.825539,USDC,1544.980038,sUSD-old,liquidity,N/A,N/A,USDC,0x2dd0fc28616243d6aa9c7127237416d13aa35cff9b065c1db64c3530e6e8f519,136,166,5312813
2020-07-03T23:45:48.000Z,sUSD-old/USDC,sUSD-old,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0.99990000,sUSD-old,0.99990000,sUSD-old,1.00010001,USDC,1.00010001,USDC,923.924322,USDC,924.016725,sUSD-old,liquidity,N/A,N/A,USDC,0xad2507194d43aa23511fb1494d63a319c889f322058ee2c06910fd4408d74bc9,34,166,5312733
2020-06-21T05:42:02.000Z,sUSD/DAI,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,DAI,0x6B175474E89094C44Da98b954EedeAC495271d0F,0.99990000,sUSD,0.99950000,sUSD,1.00010001,DAI,1.00050025,DAI,0.000090543037541552,DAI,0.000090588331707406,sUSD,liquidity,N/A,N/A,DAI,0xf218d1ae33bcdf7040dcf5eb5ac927488a43c9b671a73a3215ca651175c7b579,90,169,5309060
2020-06-19T14:46:24.000Z,sUSD/USDC,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0.99990000,sUSD,0.99700000,sUSD,1.00010001,USDC,1.00300903,USDC,3786.08145,USDC,3797.473879,sUSD,liquidity,N/A,N/A,USDC,0x78c55ede2edd9c872bb3e7585297700df55d5a5b748cbf82dd394f128ed4f584,36,166,5308593
2020-06-19T14:41:38.000Z,sUSD/USDC,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0.99990000,sUSD,0.99990000,sUSD,1.00010001,USDC,1.00010001,USDC,331.956048,USDC,331.989247,sUSD,liquidity,N/A,N/A,USDC,0x667bc7c22f422d788bda105f8270a4abc9c5cf8b1401f89bdd0701e38bd6ef75,51,166,5308592
2020-06-19T05:31:18.000Z,sUSD/USDC,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,USDC,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0.99990000,sUSD,0.99990000,sUSD,1.00010001,USDC,1.00010001,USDC,5181.962502,USDC,5182.480753,sUSD,liquidity,N/A,N/A,USDC,0xe06d41d26c5db14c211222126684497e75fc2bc4b31950b6d097ef021b03ae3b,27,166,5308482
2020-06-17T13:26:37.000Z,sUSD/PAX,sUSD,0x57Ab1E02fEE23774580C119740129eAC7081e9D3,PAX,0x8E870D67F660D95d5be530380D0eC0bd388289E1,0.99990000,sUSD,0.99955050,sUSD,1.00010001,PAX,1.00044970,PAX,333.377325229014365521,PAX,333.527245426763538337,sUSD,liquidity,N/A,N/A,PAX,0xb27b3a960c6328618273a4e37709fedb916c83249f8b576229d2f29b61efda48,10,167,5308001

Easier to see if you copy and paste onto a spreadsheet. Screenshot is waaaay to long.

@ghost
Copy link

ghost commented Jul 9, 2020

Travis automatic deployment:
https://pr1218--dexreact.review.gnosisdev.com

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Guess what :)
Prices are the other way around. The normal price should be BUY/SELL, the "inverse" should be the other. As a reference, you can check what you are selling, in this case we sell DAI for USDC. So normal price should be quoted in DAI.
image

I'm good as it is, I'm equally good removing one of the price units. The reason to add it, is to see it more clear if the price is to bad (by a mistake), so u don't need to reason about quote/base tokens in the market. One unit for the two prices is enough imo
image

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

image

I was confused for a bit why N/A for the fill. Maybe `N/A unlimited order'?

Also, for "Total Order Amount" I think "Unlimited" is more clear

src/components/TradesWidget/index.tsx Outdated Show resolved Hide resolved
@alfetopito alfetopito force-pushed the 1206/adjusting-exported-csv branch from 2f05967 to e65f506 Compare July 10, 2020 18:46
@alfetopito alfetopito requested review from anxolin and Velenir July 10, 2020 21:26
@alfetopito alfetopito force-pushed the 1206/adjusting-exported-csv branch from e65f506 to f5c1579 Compare July 13, 2020 17:59
@alfetopito alfetopito merged commit dd25a6b into develop Jul 13, 2020
@alfetopito alfetopito deleted the 1206/adjusting-exported-csv branch July 13, 2020 20:20
@alfetopito alfetopito mentioned this pull request Jul 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants