buidl-labs / livepeer-pricing-tool

A tool for enhancing the price visibility in livepeer ecosystem.
http://livepeer-pricingtool.surge.sh/
4 stars 2 forks source link

Wei/Pixel value looks inconsistent relative to what is set at the node #12

Open dob opened 4 years ago

dob commented 4 years ago

Hi, I'm looking at the pricing tool hosted at http://35.223.32.189:3000/.

I see a node reported as having a wei/pixel price of 6,720.000, when I know that the node is set to have a 1000 wei/pixel price. SImilarly, there are many nodes reporting a 6.720 wei/pixel price, which makes me guess they are just using the default of 1 wei/pixel, but somewhere in there there is a multiplier effect of 6.72.

Is there an explanation for this multiplier? Are you querying nodes requesting a specific set of input + output renditions which yield 6.72 pixels output for every one input, but not dividing when reporting the price perhaps? Or is this related to the overhead of gas costs to cash the ticket?

Saumay-Agrawal commented 4 years ago

Hi @dob,

Is there an explanation for this multiplier? Are you querying nodes requesting a specific set of input + output renditions which yield 6.72 pixels output for every one input, but not dividing when reporting the price perhaps? Or is this related to the overhead of gas costs to cash the ticket?

There is no multiplier added from our side. We are merely storing the data exposed by the the livepeer broadcaster node, and then processing this saved data for the tool. I have checked into this, and I found the price per pixels values displayed on the tool to be consistent with what is being exposed by the broadcaster node. For your reference, I've added below screenshots for both the data on the UI and the data exposed by the broadcaster node via Livepeer CLI at the same time instance.

Screenshot 2020-05-18 at 3 30 47 PM Screenshot 2020-05-18 at 3 30 21 PM

SImilarly, there are many nodes reporting a 6.720 wei/pixel price, which makes me guess they are just using the default of 1 wei/pixel, but somewhere in there there is a multiplier effect of 6.72.

I have been observing the price values and trends for the past week. I found that there is group of nodes, whose price per pixels values remain congruent with each other. This could be viewed by sorting the price per pixel values in either order. These nodes exhibit the same trend in their price value history. By going through their pricing history, I'm guessing these are the same nodes that exhibited the 6.27 wei/pixel value earlier.

Screenshot 2020-05-18 at 3 31 47 PM

Maybe Nico could give a better insight on why this multiplier effect is happening?

kyriediculous commented 4 years ago

I'm not sure how the tool calculates the prices but none of them is correct. This either is not the data pulled from a broadcaster node with a sufficient reserve or the calculations done are just wrong.

I'll re-iterate that the return values are stringified fractions and you have to make the fraction either on a UI level or a HTTP handler level.

The PricePerPixel overhead (usually 1%) is determined by a broadcaster's reserve, which makes pricing broadcaster specific (2 different broadcasters might get a different price from an O depending on their maxfloat to that O). Therefore it is important that the broadcaster node against which this service runs has sufficient reserve

Here's the data queried by a B with 1 ETH reserve:

+----+--------------------------------------------+--------+--------------------------------+----------------+---------------+---------------------------------------------------------------------+-----------------+
| ID |                  ADDRESS                   | ACTIVE |        DELEGATED STAKE         | REWARD CUT (%) | FEE SHARE (%) |                             SERVICE URI                             | PRICE PER PIXEL |
+----+--------------------------------------------+--------+--------------------------------+----------------+---------------+---------------------------------------------------------------------+-----------------+
|  0 | 0xE9E284277648fcdb09B8EfC1832c73c09b5Ecf59 | true   | 2040845.109506240263069865 LPT |              5 |             0 | https://livepeer.production-ue1.staked.cloud:8935                   |       26845.857 |
|  1 | 0xda43d85B8d419a9C51BBF0089C9bd5169c23F2f9 | true   | 1436338.469971760069435211 LPT |            0.5 |            50 | https://70ea2ff5-004f-4ed6-98b4-60f6c1b48444.livepeer.herd.run:8935 |       80866.296 |
|  2 | 0xE0a4A877cd0a07Da7C08dFFeBC2546a4713147F2 | true   | 1401243.64641475226521257 LPT  |             10 |             5 | https://18.233.219.131:8935                                         |           0.000 |
|  3 | 0x9C10672CEE058Fd658103d90872fE431bb6C0AFa | true   | 1256044.559392329476451438 LPT |              9 |             6 | https://18.211.131.51:8935                                          |        -356.158 |
|  4 | 0xa5E37e0BA14655e92DEff29F32adbc7D09b8a2cF | true   | 918437.562780315978644689 LPT  |              5 |            45 | https://7933316d-8d09-4b34-aebe-fe0654a3b7ca.livepeer.herd.run:8935 |       80866.296 |
|  5 | 0x4FF088AC5422f994486663FF903b040692797168 | true   | 629310.351999907249534145 LPT  |           1.25 |             5 | https://52.207.252.130:8935                                         |           1.095 |
|  6 | 0x525419FF5707190389bfb5C87c375D710F5fCb0E | true   | 628742.031844309006620871 LPT  |            1.2 |            75 | https://95.217.145.227:8935                                         |       21914.985 |
|  7 | 0x9D2B4E5c4b1fd81D06b883B0Aca661B771c39EA3 | true   | 605374.576451991801414663 LPT  |             10 |            51 | https://138.197.155.219:8935                                        |       21914.985 |
|  8 | 0xa20416801aC2eACf2372e825B4a90ef52490c2Bb | true   | 552129.549119988767806004 LPT  |             15 |            40 | https://45.76.176.217:8935                                          |          10.957 |
|  9 | 0x481Efb669B423CfAffA49890205427dEa9B3d693 | true   | 488131.09862344560291089 LPT   |              5 |            50 | https://45.77.64.235:8935                                           |       -4917.179 |
| 10 | 0xFb9849b0B53F66B747Bfa47396964a3FA22400A0 | true   | 472868.714869400677034954 LPT  |            6.5 |          2.99 | https://18.216.204.22:8935                                          |       23010.734 |
| 11 | 0x4f4758F7167B18e1F5B3c1a7575E3eb584894dbc | true   | 433568.682696244570104546 LPT  |             50 |             5 | https://138.197.141.89:8935                                         |       10957.492 |
| 12 | 0xd18a02647d99dC9F79AfbE0f58f8353178e6141F | true   | 418367.829771081969664844 LPT  |           0.49 |             1 | https://95.217.57.145:8935                                          |           1.095 |
| 13 | 0xd84781e1a9b74D71EA76cDa8bb9F30893BFd00D1 | true   | 341783.562673439118456227 LPT  |              1 |            55 | https://34.207.122.35:8935                                          |           0.000 |
| 14 | 0xd0AA1b9d0cd06caFA6AF5C1aF272be88c38AA831 | true   | 338875.438310783876728139 LPT  |              5 |            35 | https://139.162.151.186:8935                                        |           1.095 |
| 15 | 0xA6A9eB29e786B5233bD99C0bA28bE882fe954a0e | true   | 295653.524904541996688217 LPT  |              1 |            50 | https://3.124.46.32:8935                                            |         402.351 |
| 16 | 0x21d1130DC36958dB75fbB0e5a9E3e5F5680238FF | true   | 290941.238677962011398458 LPT  |              5 |            50 | https://34.73.243.152:8935                                          |       10957.492 |
| 17 | 0x4712e01e944802613de3A0A6d23274E7e0243015 | true   | 273150.949500564838609608 LPT  |              4 |            50 | https://livepeer-prod.bdi.sh:8935                                   |           1.095 |
| 18 | 0xDAC817294c0c87ca4fA1895eF4b972EAde99f2fd | true   | 243280.403361206087380725 LPT  |          33.33 |          1.24 | https://54.93.169.248:8935                                          |       27393.731 |
| 19 | 0x43793ab4A56E5d4c263e6320D59072e01819b6C9 | true   | 228788.219670613012010011 LPT  |             11 |             6 | https://34.69.95.204:8935                                           |           0.000 |
| 20 | 0xbD91C9DF3C30F0e43B19b1dd05888CF9b647b781 | true   | 171350.970976174647307857 LPT  |             70 |            10 | https://35.202.103.81:8935                                          |           1.024 |
| 21 | 0x88E103B26e1A4Ce226739D37D356B22AfBfEed85 | true   | 170198.030516313446377838 LPT  |              5 |            99 | https://80.211.32.121:8935                                          |           1.024 |
| 22 | 0xbe9a8b21353ea73794553c154c6c9A06823fCd11 | true   | 158922.764710437434964689 LPT  |             40 |            10 | https://3.86.165.167:8935                                           |           1.095 |
| 23 | 0xf4e8Ef0763BCB2B1aF693F5970a00050a6aC7E1B | true   | 82597.558237503301767559 LPT   |             20 |            10 | https://104.45.20.161:8935                                          |       25202.233 |
| 24 | 0x3E2B450c0c499D8301146367680E067CD009DB93 | true   | 78898.512654490975268899 LPT   |             20 |             5 | https://chi-mainnet-orchtran-0-mew.livepeer-ac.live:8935            |         119.149 |
| 25 | 0x7bcc1d6D06D92117FfEeB55Bb1cB8F9d262d2270 | true   | 77871.894708941163724602 LPT   |            100 |             0 | https://54.93.169.248:8935                                          |       27393.731 |
| 26 | 0xCdFC898128DBC380A60895c6E8C0975Dc07D07E0 | true   | 75951.384127989155129538 LPT   |             25 |            50 | https://3.130.191.167:8935                                          |       26297.982 |
| 27 | 0x31990bebC4FD07aC4898E7C67210F38651F1D2e8 | true   | 66846.263754832089387804 LPT   |              4 |            50 | https://87cc5a7e-24d9-4c6d-8b36-e5363844313e.livepeer.herd.run:8935 |       80866.296 |
| 28 | 0xcfA2a70fDF74eBDa788EEB1498425ceB0630e1cb | true   | 32525.64780061633051577 LPT    |            100 |           100 | https://127.0.0.1:8935                                              |           0.000 |
| 29 | 0x0119A06B51c83d0eEc79708B921A57247DC37e66 | true   | 16413.95457014318119288 LPT    |              2 |             5 | https://129.204.210.145:8935                                        |          99.990 |
| 30 | 0x9D5611bf0DAdddb4441A709141d9229d7F6b3e47 | true   | 9875.929371059315000988 LPT    |           0.75 |            25 | https://149.248.53.18:8935                                          |       21914.985 |
| 31 | 0x9e14de5CC84e437518C2c303C88570fE13f0ad15 | true   | 6284.329721642179559005 LPT    |              0 |           100 | https://23.20.23.34:8935                                            |           0.000 |
| 32 | 0x8d3803EcfE86Afbb25899A806B46714914b0a4b5 | true   | 5802.460538282388453528 LPT    |             10 |            50 | https://3.18.54.126:8935                                            |           1.095 |
| 33 | 0x827131A519583cC5f005CFF45Ae0fA2fcc7eF27c | true   | 4151.552266669361113915 LPT    |            0.7 |          99.3 | https://nosce.mooo.com:8935                                         |           1.095 |
| 34 | 0xd1366b85Ea804cBB4493f2CC9D3D805F86bD61b2 | true   | 847.97026768662956924 LPT      |             15 |             5 | https://167.172.123.235:8935                                        |           1.019 |
| 35 | 0xFF8c740244183195bb6eC172c9686801266b0f99 | true   | 7.622464988231722785 LPT       |             10 |             5 | https://orch.noworries.tech:8935                                    |           0.000 |
| 36 | 0xf3E4AeAcE36Bce0C0fCC08A124C1f0D90c34Fe54 | true   | 6.053018564148279524 LPT       |           0.49 |            95 | https://78.47.147.47:8935                                           |           0.000 |
| 37 | 0x7D2014096f95C580cBEFCeA7fd6b356925c43D5d | true   | 5.956160187138602085 LPT       |           0.35 |           100 | https://45.76.221.114:8935                                          |           0.000 |
| 38 | 0x62e5402e77712eb4A8F11a79eB49e3b77ec912d4 | true   | 5.73630527437169523 LPT        |             10 |             5 | https://200.124.76.227:8935                                         |           0.000 |
| 39 | 0xE3a5793d7c1D2a04A903FA1695b3E3555d6084CA | true   | 4.203344134044905737 LPT       |             15 |            65 | https://108.35.85.136:8935                                          |           0.000 |
| 40 | 0x3b71a219E173CE338bB4571e4902E0c70Cd16eab | true   | 4.1839948357685375 LPT         |              0 |             0 | https://54.37.7.138:8935                                            |           0.000 |
| 41 | 0xB359c484Cd2cB5AddaBFc26Af6b0c00234b1775B | true   | 1 LPT                          |              0 |             0 | http://d0e49333-2563-451c-99a9-b2e4ed01a431.livepeer.herd.run:8935  |           0.000 |
| 42 | 0x9dAb82463aF85b200C55F119C68A50CC432f34AD | true   | 0.02 LPT                       |              0 |             0 |                                                                     |           0.000 |
| 43 | 0x7eBf523075979E6Ab20c9c4B4f91C9F86e78d3fB | true   | 1 LPTU                         |              0 |             0 | https://46.4.94.145:8935                                            |           0.000 |
| 44 | 0x51f60256Ea6490bD1fbDaE348538f0D9e2392d5D | true   | 1 LPTU                         |              0 |             0 |                                                                     |           0.000 |
+----+--------------------------------------------+--------+--------------------------------+----------------+---------------+---------------------------------------------------------------------+-----------------+
dob commented 4 years ago

@kyriediculous Thank you. Yes those #'s look much more accurate. So I'm thinking the tool needs to be updated to reflect the data as queried from a node with a large enough reserve and/or the fractionally represented return values need to be interpreted correctly.

kyriediculous commented 4 years ago

I submitted a PR with a fix for the pricing values and some additional feedback that might be useful for a future iteration (apart from adding unit testing).