INCIDENT
5 TON Labs stakes were sent to the elector contract without payload from 8th to 11th October.
These messages have the following id = [“ec304765accdc765603b576b535f2e4ca7799be303e6eb1cbb79cca79a333a9f”, “ab7061780caf41dae3d3ce4efa2d7dabdf5018ae22afd88b6fa584643a6d38a0”, “263617c873983fbb17e74ac79ec5bb2da24949fda9dd7f866aeb994c9d199bdc”, “919a5d80ad90ccf1248622934a5fc954e2027a5910ef4574b486ba85642b3ec5”, “2bde15f5256a09a22dde2709240bb1003bbf75656bd62d62486f6d2c1283a6fa”]
MODEL FOR RECOVERY
File “model_bonus_weight.xlsx” has calculation of the accumulated_bonus_weight in the accumulated_rewards for 18 cycles (tab “model”). The model adds actual amounts sent from Minter contract to the Elector contract and 1/8 of the special balance in the Elector contract distributed to the validators at the start of each cycle as “bonuses” and provides the weight of these “bonuses” in total rewards for 18 cycles = 0.64673.
As a proof of totals, the model total rewards have been compared with actual total rewards calculated as sum(returns + cutoffs - stakes) and showed a good accuracy (see tab “journal” in the excel file).
# | Cycle id | Cycle start time UTC | Minter -> Elector | Message w/o payload | Accum’d grams | Bonuses | Total reward | Bonus weight | Accum’d bonuses | Accumulated reward | Accum’d bonus weight | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1602208988 | Fri, 09 Oct 2020 02:03:08 | 60,392 | 258,927 | 258,927 | 32,366 | 92,758 | 34.89% | 32,366 | 92,758 | 34.893% | |
2 | 1602274524 | Fri, 09 Oct 2020 20:15:24 | 61,484 | 226,561 | 28,320 | 89,804 | 31.54% | 60,686 | 182,562 | 33.241% | ||
3 | 1602340060 | Sat, 10 Oct 2020 14:27:40 | 60,317 | 267,996 | 466,237 | 58,280 | 118,597 | 49.14% | 118,966 | 301,159 | 39.503% | |
4 | 1602405596 | Sun, 11 Oct 2020 08:39:56 | 59,779 | 584,900 | 992,857 | 124,107 | 183,886 | 67.49% | 243,073 | 485,045 | 50.113% | |
5 | 1602471132 | Mon, 12 Oct 2020 02:52:12 | 61,823 | 1,182,601 | 2,051,351 | 256,419 | 318,242 | 80.57% | 499,492 | 803,288 | 62.181% | |
6 | 1602536668 | Mon, 12 Oct 2020 21:04:28 | 54,122 | 1,794,932 | 224,367 | 278,488 | 80.57% | 723,858 | 1,081,776 | 66.914% | ||
7 | 1602602204 | Tue, 13 Oct 2020 15:16:44 | 59,845 | 1,570,566 | 196,321 | 256,165 | 76.64% | 920,179 | 1,337,941 | 68.776% | ||
8 | 1602667740 | Wed, 14 Oct 2020 09:29:00 | 60,396 | 1,374,245 | 171,781 | 232,177 | 73.99% | 1,091,960 | 1,570,119 | 69.546% | ||
9 | 1602733276 | Thu, 15 Oct 2020 03:41:16 | 59,522 | 1,202,464 | 150,308 | 209,830 | 71.63% | 1,242,268 | 1,779,948 | 69.792% | ||
10 | 1602798812 | Thu, 15 Oct 2020 21:53:32 | 59,194 | 1,052,156 | 131,520 | 190,714 | 68.96% | 1,373,787 | 1,970,662 | 69.712% | ||
11 | 1602864348 | Fri, 16 Oct 2020 16:05:48 | 61,408 | 920,637 | 115,080 | 176,488 | 65.21% | 1,488,867 | 2,147,150 | 69.342% | ||
12 | 1602929884 | Sat, 17 Oct 2020 10:18:04 | 59,889 | 805,557 | 100,695 | 160,583 | 62.71% | 1,589,561 | 2,307,733 | 68.880% | ||
13 | 1602995420 | Sun, 18 Oct 2020 04:30:20 | 59,949 | 704,863 | 88,108 | 148,057 | 59.51% | 1,677,669 | 2,455,790 | 68.315% | ||
14 | 1603060956 | Sun, 18 Oct 2020 22:42:36 | 61,738 | 616,755 | 77,094 | 138,832 | 55.53% | 1,754,764 | 2,594,622 | 67.631% | ||
15 | 1603126492 | Mon, 19 Oct 2020 16:54:52 | 58,326 | 539,660 | 67,458 | 125,783 | 53.63% | 1,822,221 | 2,720,406 | 66.983% | ||
16 | 1603192028 | Tue, 20 Oct 2020 11:07:08 | 60,226 | 472,203 | 59,025 | 119,251 | 49.50% | 1,881,247 | 2,839,657 | 66.249% | ||
17 | 1603257564 | Wed, 21 Oct 2020 05:19:24 | 61,734 | 413,177 | 51,647 | 113,381 | 45.55% | 1,932,894 | 2,953,039 | 65.454% | ||
18 | 1603323100 | Wed, 21 Oct 2020 23:31:40 | 60,355 | 361,530 | 45,191 | 105,546 | 42.82% | 1,978,085 | 3,058,585 | 64.673% |
CALCULATION OF INDIVIDUAL BONUSES
File “rewards_with_bonuses.xlsx” shows the final result with stakes, cutoffs, returns, total_rewards and bonuses for each validator.
We downloaded all stakes and related returns/cutoffs for all cycles from 8th to 22th October as shown in the below queries. Some messages were excluded as described in the comments to the queries. Accumulated rewards for each validator were calculated as total_reward = sum(value_returns + value_cutoffs - value_stakes) for each account. The “bonus” part for each validator was calculated as bonuses = total_reward * accumulated_bonus_weight from the model.
account | value_stakes | value_cutoffs | value_returns | total_reward | bonuses |
---|---|---|---|---|---|
-1:06c40ea85d6e7485fa6c3f5d84a0a03d9ca5cc4dba79e882716c1a8a1386f147 | 6,652,697.00 | 6,699,896.27 | 47,199.27 | 30,525.19 | |
-1:09d87ef77c09677e1cfe44c54ea6faeba9ff432bbd8bc33ae15051868a163699 | 5,244,177.00 | 5,287,601.63 | 43,424.63 | 28,084.01 | |
-1:12aca62b6b55e9a64aed96d4dccf340980f8c646d0d930f8a6f735709f3cff9e | 6,000,000.00 | 77,228.00 | 5,971,091.88 | 48,319.88 | 31,249.91 |
-1:1635ec22093266163b7de9bdc4b95a431f3956f330e607e5eb7d224b63baa07e | 1,220,000.00 | 1,229,971.19 | 9,971.19 | 6,448.67 | |
-1:315cf279d9503e0da1007aa3b08ed3dac3dc1b32ba9a1c0163dd4a0a8c82fff0 | 8,657,338.00 | 8,729,860.85 | 72,522.85 | 46,902.70 | |
-1:333e429d2c226549579489dc9b79a23adda1099586d5714aecc3a2f78a811be0 | 4,330,887.00 | 4,361,613.56 | 30,726.56 | 19,871.79 | |
-1:36cd2a80e0ea6b6f199eae822d85e85cac31b77298d92b31565e1ab5186d8585 | 6,000,000.00 | 77,228.00 | 5,971,091.88 | 48,319.88 | 31,249.91 |
-1:4212ebc61a81dd5382458dec030a6add3904047bc1a3bbf70bff95830b86abad | 6,625,017.00 | 6,678,641.53 | 53,624.53 | 34,680.59 | |
-1:4b4b990cf361428034dc3575cfb10b44ed3526e21b5bb47d9049d72bf34eb60a | 8,365,500.00 | 8,434,758.68 | 69,258.68 | 44,791.67 | |
-1:4fdf7f6a70fb442ebc132638d2353d7fb69b7e9beaddf883fab010c4d10c0969 | 6,179,016.00 | 6,231,029.49 | 52,013.49 | 33,638.68 | |
-1:5147d02e7c1981cff5f194687355458cf0b4232f840a0aa6be8092e67bb5869d | 11,637,000.00 | 11,733,343.77 | 96,343.77 | 62,308.41 | |
-1:52f8d502cea5c071759dde92c75afa52b86bba7bb35dc05b5d346fa54aef80d9 | 6,605,062.00 | 6,651,923.30 | 46,861.30 | 30,306.61 | |
-1:59fe100ddec24e8726cd65e1f64603bbfef2d5ea55014030d7f196552b1be911 | 8,605,021.00 | 8,666,429.72 | 61,408.72 | 39,714.86 | |
-1:5e22f93ec5c142d34d5b43970accaa72c01ca10dd3bb8fef97c1b910d8aa0e83 | 2,473,690.00 | 116,179.00 | 2,371,588.87 | 14,077.87 | 9,104.58 |
-1:618272d6b15fd8f1eaa3cdb61ab9d77ae47ebbfcf7f28d495c727d0e98d523eb | 10,172,808.00 | 10,256,662.50 | 83,854.50 | 54,231.22 | |
-1:6209870f39d8194cee707d756059d767682630a672a9f597b6a2d979c063e1dd | 6,518,006.00 | 6,573,162.75 | 55,156.75 | 35,671.52 | |
-1:6536020c4d813475e4ff478b294d368ed65b3e68b411c074708b3a85f71fb3f2 | 4,201,433.00 | 4,233,316.30 | 31,883.30 | 20,619.89 | |
-1:69e1603af69e2ead9e745ed8d68ee5765012836d6db11a37714f92a1a98a5fda | 8,365,500.00 | 8,434,758.68 | 69,258.68 | 44,791.67 | |
-1:6d26e5a148d6665eec2ac5e2f7ecd80bbc41d6e059882726651f5817c16b6431 | 1,500,000.00 | 58,018.00 | 1,453,720.78 | 11,738.78 | 7,591.82 |
-1:73ea8be89f2bddd78bc7b289591997a5ea36addeb9dc606c69eb6c3e8aa23f3c | 8,703,000.00 | 8,775,052.88 | 72,052.88 | 46,598.76 | |
-1:7475993d7548b9c1e376cb362a82eafdd489a78e469cd7efbe915a8eaf981d11 | 3,566,700.00 | 3,593,773.22 | 27,073.22 | 17,509.07 | |
-1:75c554ecb3f592d48966942ac9c1ba8342eee05266c2220506098f845086fd5b | 10,079,503.00 | 10,162,682.73 | 83,179.73 | 53,794.83 | |
-1:89ca25134210f7c2b7e6568692f9a0b90b92a186dade09968c188291ca7bfd58 | 6,625,017.00 | 6,678,641.53 | 53,624.53 | 34,680.59 | |
-1:8ba9fdf4aff71461b7c9df3f0957dd04384dac3dce90a71abe043e97668fa60a | 11,871,900.00 | 11,970,188.53 | 98,288.53 | 63,566.14 | |
-1:8cd84136d241238fecd11ab5284132506a018d4887031301b3562a221b886f79 | 10,329,644.00 | 10,413,702.78 | 84,058.78 | 54,363.33 | |
-1:8e1d11bb6032b8417e849c68013a6b226080ed5ce9e6def2564c8ba434e127db | 3,900,000.00 | 3,930,695.75 | 30,695.75 | 19,851.86 | |
-1:911dd67a26f008a36c26fba1291af64ca6f02d181c0f0a81f23ff86b1e7229d8 | 8,739,535.66 | 8,811,576.95 | 72,041.29 | 46,591.27 | |
-1:9e8683dff4a338f0b5e84a520523a029478062875dc1f997157ae555ca52d653 | 3,566,700.00 | 3,593,773.22 | 27,073.22 | 17,509.07 | |
-1:9f105aa9473a8f826f73b4cf74ffee35ffe5e57321d00a1a8955447185ead4ff | 9,662,366.00 | 9,731,555.97 | 69,189.97 | 44,747.23 | |
-1:a39ff4a483ca5c1cfef590300abb608f345084d5070c4f9b0a75a3c8f75677a1 | 5,278,189.00 | 5,322,156.97 | 43,967.97 | 28,435.41 | |
-1:a493e526e4a5f837d712b6551b10aaef2e4c5d8d633b69bc05d65c5516470bf9 | 11,871,900.00 | 11,970,188.53 | 98,288.53 | 63,566.14 | |
-1:ad47ea0c469262fe9cbdb07423dfd0e7173dd1dfd940eb2a962335ef85d2b859 | 3,780,225.00 | 3,814,141.95 | 33,916.95 | 21,935.11 | |
-1:b004093526f7f5ed625d87b2921dc012c30572b10df632c294a9a5298a306678 | 7,045,018.00 | 7,102,816.53 | 57,798.53 | 37,380.04 | |
-1:b1a4d7f150ba9a6fea0cfb8c51a68a93b75904a03644a44d43e2dacdcba05210 | 5,128,382.00 | 5,165,555.67 | 37,173.67 | 24,041.33 | |
-1:b69c70beb9b4df61f6474b78ce4b49faa0af8e4023e60cc4e5434761ff449ab3 | 11,637,000.00 | 11,733,343.77 | 96,343.77 | 62,308.41 | |
-1:be675f87b61860a855c183b4c8d3f00ca9cdba9c0818201de98e1e1540f8ba46 | 3,530,175.00 | 3,553,343.21 | 23,168.21 | 14,983.57 | |
-1:c827386fe0e9f457e4426a38c854e35dec93a42137231be842ccbdbb86f776ca | 5,739,817.00 | 5,788,136.41 | 48,319.41 | 31,249.61 | |
-1:cf045b3b1a1c399e73b3ef166d173e1a0b2a82d6857beed4589468455511044f | 10,507,942.00 | 10,592,469.13 | 84,527.13 | 54,666.23 | |
-1:cf279365bc40d712913b19bf8fd79d1ee0e906d8331837085f8c659a0e98400b | 8,703,000.00 | 8,775,052.88 | 72,052.88 | 46,598.76 | |
-1:d68e65e3392c28b7911114cd357af8c5bcb224d3870a4fcf849b312df46893bb | 7,271,299.00 | 7,331,303.11 | 60,004.11 | 38,806.46 | |
-1:d9938a2938d5d64766af7e4389aaf6ab1746edd2c8852fc479ee2f7f53a4b7b4 | 6,250,503.00 | 6,294,851.42 | 44,348.42 | 28,681.45 | |
-1:dad32473ab9c75b2e22b883c5c0208d2425126f685ab0d9818ea37939c8bec9d | 7,339,937.00 | 7,392,896.56 | 52,959.56 | 34,250.53 | |
-1:dd33e8c7b78ce6ac97b66b236dbf7fb6b38826d075522813046457963c3ffe14 | 6,675,331.00 | 6,722,690.84 | 47,359.84 | 30,629.03 | |
-1:dd378a8fd5dc8b7678d6b4dfce8bd08f45f40dacb6b9c4ad0370e25b603a557f | 6,584,822.00 | 6,631,539.69 | 46,717.69 | 30,213.73 | |
-1:ddcef83eb53cf01ac691e0101f597f68681181d335ebfc192a9165338071b0b7 | 9,000,036.00 | 9,074,548.07 | 74,512.07 | 48,189.19 | |
-1:de85689e29f6f7f6bdd279154600434fa778a378f3dee88fa6d8d1c613e33e86 | 8,703,000.00 | 8,775,052.88 | 72,052.88 | 46,598.76 | |
-1:e2d9d5914e44667a76c3483c7ed3299c48fea3a98f395d2793100af5b49d98a1 | 7,459,752.60 | 7,522,153.64 | 62,401.05 | 40,356.63 | |
-1:ec7b7ce7839a17bf0ac67e4e4de095b903c481ee64c2032fe4fae72faab38570 | 3,000,016.00 | 3,024,981.09 | 24,965.09 | 16,145.67 | |
-1:ee2d9668a14f31de86959e85d84e9503035466714503c7274353ce56da5acf0b | 4,490,147.00 | 4,524,919.34 | 34,772.34 | 22,488.32 | |
-1:f18a64fa0ba3c6eeaf40934aae5319890253e5a41ebcd28268831c8ef1601efd | 8,365,500.00 | 8,434,758.68 | 69,258.68 | 44,791.67 | |
-1:f588a3a628b09210222dcf5afc3e2a93c6000954f87df6297dc42588b636c4b1 | 9,000,036.00 | 9,074,548.07 | 74,512.07 | 48,189.19 | |
-1:fb1f1e8daf784ba59d9ae6266bbadda7a0b63a1d5d38eed5c9a11161861eb1cd | 5,100,000.00 | 5,143,350.84 | 43,350.84 | 28,036.29 | |
-1:fb9f9315d8fd1cbc8d96898f782af54dfd6884597ddec1fb878a846fcea64b6b | 6,471,016.00 | 133,291.00 | 6,376,827.13 | 39,102.13 | 25,288.52 |
-1:fbe62fe091d7180df5a2d52030cee79214fd032bbdac6140c6257897feef60f0 | 5,942,711.00 | 5,988,267.97 | 45,556.97 | 29,463.06 | |
-1:fe29c1d52a35eb70bf92d1e936a1454e3df6633d265bb141a92dc0a73016f3ab | 8,652,726.00 | 8,714,752.81 | 62,026.81 | 40,114.60 | |
-1:fed2fda910580b2f6b8ffe8cde92bfa7e6c005cb8d22d983c5ccbd4b24d50fe1 | 5,045,052.00 | 5,087,098.24 | 42,046.24 | 27,192.57 |
DATA FOR CALCULATIONS OF INDIVIDUAL BONUSES
STAKES - file “stakes.csv” shows all validator stakes for the period apart from the exluded stakes as per the following query:
First 5 excluded messages - w/o payload, 6th - stake that was returned together with stakes from past rounds (see excluded returns), 7th temporary excluded stake not returned by last cycle.
query {
messages(
filter: {
dst: {eq: "-1:3333333333333333333333333333333333333333333333333333333333333333"}
value: {gt:"100000000000"}
created_at: {gt: 1602176220 le: 1603355850}
id: {notIn:[
"ec304765accdc765603b576b535f2e4ca7799be303e6eb1cbb79cca79a333a9f",
"ab7061780caf41dae3d3ce4efa2d7dabdf5018ae22afd88b6fa584643a6d38a0",
"263617c873983fbb17e74ac79ec5bb2da24949fda9dd7f866aeb994c9d199bdc",
"919a5d80ad90ccf1248622934a5fc954e2027a5910ef4574b486ba85642b3ec5",
"2bde15f5256a09a22dde2709240bb1003bbf75656bd62d62486f6d2c1283a6fa",
"b2c70632d21c6e61ef0d396b58dcf0032975d6dc2af80db7b218ca58574e3dd5",
"ef617a04c7d8a18f0bee10bd5b94c07842221b07b194fed5706646a43c4fa1fc",
]}
}) {
id
created_at
value(format:DEC)
src
dst
}
}
CUTOFFS - file “cutoffs.csv” shows all cutoffs returned separately by the elector contract as per the following query:
query {
messages(
filter: {
src: {eq: "-1:3333333333333333333333333333333333333333333333333333333333333333"}
value: {gt:"100000000000" lt:"200000000000000"}
created_at: {gt: 1602200796 le: 1603380444}
id: {notIn:[]}
}) {
id
created_at
value(format:DEC)
src
dst
}
}
RETURNS - file “retuns.csv” shows all returned stakes with rewards by the elector (apart from exluded returns) as per the following query:
1st excluded return includes several stakes from past rounds + one stake from the period combined together, 2nd is return of a stake made 2020-09-20
query {
messages(
filter: {
src: {eq: "-1:3333333333333333333333333333333333333333333333333333333333333333"}
value: {gt:"200000000000000"}
created_at: {gt: 1602307292 le: 1603486940}
id: {notIn:[
"6434d243b576354bdeccc25efc1e6f9d83df3a8dc0e2433163755d2eb81aee06",
"f0b632c8b3b28dd1797f418fdc1cdda20d1eac9a5b3d7de2d80ab1ba9d67551e",
]}
}) {
id
created_at
value(format:DEC)
src
dst
}
}