ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2
3
Lens Protocol - estimates of transcational cost and capacity.
4
@liamzebedeeCompiled 11 March 2022.
5
6
7
Base case
8
9
Transaction costs:
10
createProfile350,000
https://mumbai.polygonscan.com/tx/0x61b2758e0214b6503e7684ac9ea706094cef57ae68ac83eb8e00a7f22ee915bd
11
createPost106,582
Tested on https://lenster-4w19px7zt-devparty.vercel.app/
12
follow201,582
Tested on https://lenster-4w19px7zt-devparty.vercel.app/
13
14
15
Transaction - LensHub.follow
16
Gas used106,582
17
Gas price (gwei)10
18
Transaction cost (gwei)1,103,113
19
20
MATIC cost (gwei)1,103,113
21
MATIC price (USD)$1.42
22
MATIC cost (USD)$0.0015664
23
24
Market assumptions
25
MATIC price (USD)$1.42
26
Gas price (gwei)10
27
28
Lens user assumptions
29
Number of users50000
30
Avg followers for each user300
31
Avg following for each user300
32
Avg posts per day for each user5
33
34
Total cost for a single user that follows all its friends$0.8887866
35
Total cost for a single user posting each day$0.0078321
36
37
Polygon TPS calculations
38
Observed throughput (gas/s)3,204,74430% capacity
39
Est. maximum throughput (gas/s)9,156,412
Theoretical 100% capacity
40
41
Lens throughput
42
Total gas volume for all users posting each day26,645,500,000
43
Lens tx throughput (gas/s)308,397
44
Polygon chain utilization9.62%30% capacity
45
Polygon chain utilization3.37%
Theoretical 100% capacity
46
47
Throughput value ($/day)$391.6051298
48
49
50
51
Base case
52
53
54
55
56
57
58
59
60
61
62
63
64
65
TODO Section.
66
67
We can examine the theoretical capacity of a Twitter clone depoyed on Lens by using existing data.
68
69
Power Law Distributions for Twitter Data
70
71
Power law distributionp(x) = Cx^(-a)
72
a
73
Followers2.19
74
Friends2.38
75
Rate of posting2.04
76
77
78
79
80
81
82
83
84
85
86
87
Old modelling
88
89
Polygon TPS calculations
90
Est. maximum throughput (tps)25
Polygon claims on their testnet they reached 7200 TPS, but in production this is likely vastly lower.
91
Block gas limit31,778,298
They currently sustain around 22tps, which is likely not their max capacity.
92
Block time1
Source: https://twitter.com/0xpolygon/status/1283467641076584448?lang=en
93
Throughput (gas)794457450
94
95
Immutable TPS calculations
96
Est. maximum throughput (tps)9000
9000 NFT transfers per second
Source: https://www.notion.so/Immutable-X-protocol-basics-afddde4f66044bc78ec9eebb7976da0b
97
Block gas limit65,000
98
Block time1
99
Throughput (gas)585000000
100