tx · CG4LMwoRBTcQHvB95Nkr8qdzqZvHtDhShHnwfg2HLLwK

3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos:  -0.01500000 Waves

2024.06.03 17:00 [3134595] smart account 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos > SELF 0.00000000 Waves

{ "type": 13, "id": "CG4LMwoRBTcQHvB95Nkr8qdzqZvHtDhShHnwfg2HLLwK", "fee": 1500000, "feeAssetId": null, "timestamp": 1717423234359, "version": 2, "chainId": 84, "sender": "3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos", "senderPublicKey": "F7SLwr7RYVQpyocmVScFC6ooaAwewaGq6wNRDYvyiPj1", "proofs": [ "2Ye2WejVeJLhke8vdMdXYSLew91eWZKfhXCYBAhBZ68SNvZzVmzSjishHdFqkDpbrNN4TY8PWCKrLvwohaeJnaLa" ], "script": "base64:AAIFAAAAAAAAABIIAhIGCgQIGAgIEgQKAggIEgAAAAAPAAAAABRwcmVkaWN0aW9uTWF4Q291bnRlcgAAAAAAAAAAAwAAAAAKbWF4Q291bnRlcgAAAAAAAAAABgAAAAANZGVmYXVsdFJhdGluZwAAAAAAAAAAZAAAAAAOcmF0ZUFkanVzdG1lbnQAAAAAAAAAABQAAAAAB3Rva2VuSWQBAAAAIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAAAAAxwYXlvdXRBbW91bnQAAAAAAAX14QAAAAAADHJhdGluZ0N1dG9mZgAAAAAAAAAAMgAAAAAJcl9hdmVyYWdlAAAAAAAAAABkAQAAABFzZWFyY2hGb3JDb3VudGVycwAAAAIAAAAGaXRlbUlkAAAAB2NvdW50ZXIEAAAAEXNlYXJjaEZvckNvdW50ZXJzBAAAAAckbWF0Y2gwCQAEIgAAAAEJAAEsAAAAAgkAASwAAAACBQAAAAZpdGVtSWQCAAAAAV8JAAGkAAAAAQUAAAAHY291bnRlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAA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0UmF0aW5nBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWP9Pgk=", "height": 3134595, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8GKfovNdPx94daFZHUpSV8YKdY2AmNHq2XXKvpzkh1eo Next: 4JAZrZeJ6BDKXU99bBXkcwG4ss36BbYyWNUqtRLBqifM Diff:
OldNewDifferences
1414 let payoutAmount = 100000000
1515
1616 let ratingCutoff = 50
17+
18+let r_average = 100
1719
1820 func searchForCounters (itemId,counter) = {
1921 let searchForCounters = match getString(((itemId + "_") + toString(counter))) {
8789 }
8890
8991
92+func calculateExpectedScore (r_player,r_average) = {
93+ let diff = (r_average - r_player)
94+ let exponent = (diff / r_average)
95+ let powerOfTen = pow(10, 0, exponent, 0, 0, HALFUP)
96+ let denominator = (1 + powerOfTen)
97+ (1 / denominator)
98+ }
99+
100+
101+func calculatePayout (r_player,r_average) = {
102+ let ratio = ((r_player * 100) / r_average)
103+ let payout = ((payoutAmount * ratio) / 100)
104+ payout
105+ }
106+
107+
108+func calculateNewRating (r_player,r_average,k,actualScore) = {
109+ let expectedScore = calculateExpectedScore(r_player, r_average)
110+ let delta_r = (k * (actualScore - expectedScore))
111+ (r_player + delta_r)
112+ }
113+
114+
90115 @Callable(i)
91116 func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = {
92117 let caller = toString(i.caller)
96121 func updateRatingsFunc (accum,address) = {
97122 let rating = searchForRating(address)
98123 let prediction = searchForAddressPrediction(itemId, address)
99- let updatedRating = if ((prediction == finalPrediction))
100- then (rating + rateAdjustment)
101- else (rating - rateAdjustment)
124+ let actualScore = if ((prediction == finalPrediction))
125+ then 1
126+ else 0
127+ let newRating = calculateNewRating(rating, r_average, rateAdjustment, actualScore)
102128 let payout = if ((prediction == finalPrediction))
103- then payoutAmount
104- else 0
105- let updatedEntries = (accum :+ IntegerEntry(address, updatedRating))
106- if ((payout > 0))
107- then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), payout, tokenId))
129+ then true
130+ else false
131+ let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating))
132+ let calculatedAmount = calculatePayout(newRating, r_average)
133+ if (payout)
134+ then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId))
108135 else updatedEntries
109136 }
110137
191218 if ((lastPrediction == prediction))
192219 then if (((predictionCounter + 1) == predictionMaxCounter))
193220 then {
221+ let newRating = calculateNewRating(clientRating, r_average, rateAdjustment, 1)
222+ let calculatedAmount = calculatePayout(newRating, r_average)
194223 let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
195224 if ((invokeAdjustRating != invokeAdjustRating))
196225 then throw("Strict value is not equal to itself.")
197- else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), true), BooleanEntry((itemId + "_cancelled"), false), ScriptTransfer(Address(fromBase58String(clientAdress)), payoutAmount, tokenId), IntegerEntry(clientAdress, (clientRating + 20))]
226+ else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), true), BooleanEntry((itemId + "_cancelled"), false), ScriptTransfer(Address(fromBase58String(clientAdress)), calculatedAmount, tokenId), IntegerEntry((clientAdress + "_rating"), newRating)]
198227 }
199228 else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), false), BooleanEntry((itemId + "_cancelled"), false)]
200229 else if ((newCounter >= maxCounter))
226255 @Callable(i)
227256 func registerUser () = {
228257 let clientAdress = toString(i.caller)
229- let searchForUser = match getInteger(clientAdress) {
258+ let searchForUser = match getInteger((clientAdress + "_rating")) {
230259 case s: Int =>
231260 s
232261 case _ =>
234263 }
235264 if ((searchForUser != -1))
236265 then throw("User already exists")
237- else [IntegerEntry(clientAdress, defaultRating)]
266+ else [IntegerEntry((clientAdress + "_rating"), defaultRating)]
238267 }
239268
240269
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let predictionMaxCounter = 3
55
66 let maxCounter = 6
77
88 let defaultRating = 100
99
1010 let rateAdjustment = 20
1111
1212 let tokenId = base58'8QGJvsXqJ43q5ksFymoPKF1NWWhwUfr2F7h52oeWgVhH'
1313
1414 let payoutAmount = 100000000
1515
1616 let ratingCutoff = 50
17+
18+let r_average = 100
1719
1820 func searchForCounters (itemId,counter) = {
1921 let searchForCounters = match getString(((itemId + "_") + toString(counter))) {
2022 case s: String =>
2123 s
2224 case _ =>
2325 "No User"
2426 }
2527 searchForCounters
2628 }
2729
2830
2931 func searchForRating (address) = {
3032 let rating = match getInteger(address) {
3133 case r: Int =>
3234 r
3335 case _ =>
3436 defaultRating
3537 }
3638 rating
3739 }
3840
3941
4042 func searchForAddressPrediction (itemId,adress) = {
4143 let searchForPrediction = match getString(((itemId + "_") + adress)) {
4244 case s: String =>
4345 s
4446 case _ =>
4547 "Not Found"
4648 }
4749 searchForPrediction
4850 }
4951
5052
5153 func findPredictionAdresses (itemId,counter) = {
5254 let adressList = if ((counter >= 5))
5355 then {
5456 let adress1 = searchForCounters(itemId, 1)
5557 let adress2 = searchForCounters(itemId, 2)
5658 let adress3 = searchForCounters(itemId, 3)
5759 let adress4 = searchForCounters(itemId, 4)
5860 let adress5 = searchForCounters(itemId, 5)
5961 (((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
6062 }
6163 else if ((counter >= 4))
6264 then {
6365 let adress1 = searchForCounters(itemId, 1)
6466 let adress2 = searchForCounters(itemId, 2)
6567 let adress3 = searchForCounters(itemId, 3)
6668 let adress4 = searchForCounters(itemId, 4)
6769 ((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4)
6870 }
6971 else if ((counter >= 3))
7072 then {
7173 let adress1 = searchForCounters(itemId, 1)
7274 let adress2 = searchForCounters(itemId, 2)
7375 let adress3 = searchForCounters(itemId, 3)
7476 (((nil :+ adress1) :+ adress2) :+ adress3)
7577 }
7678 else if ((counter >= 2))
7779 then {
7880 let adress1 = searchForCounters(itemId, 1)
7981 let adress2 = searchForCounters(itemId, 2)
8082 ((nil :+ adress1) :+ adress2)
8183 }
8284 else {
8385 let adress1 = searchForCounters(itemId, 1)
8486 (nil :+ adress1)
8587 }
8688 adressList
8789 }
8890
8991
92+func calculateExpectedScore (r_player,r_average) = {
93+ let diff = (r_average - r_player)
94+ let exponent = (diff / r_average)
95+ let powerOfTen = pow(10, 0, exponent, 0, 0, HALFUP)
96+ let denominator = (1 + powerOfTen)
97+ (1 / denominator)
98+ }
99+
100+
101+func calculatePayout (r_player,r_average) = {
102+ let ratio = ((r_player * 100) / r_average)
103+ let payout = ((payoutAmount * ratio) / 100)
104+ payout
105+ }
106+
107+
108+func calculateNewRating (r_player,r_average,k,actualScore) = {
109+ let expectedScore = calculateExpectedScore(r_player, r_average)
110+ let delta_r = (k * (actualScore - expectedScore))
111+ (r_player + delta_r)
112+ }
113+
114+
90115 @Callable(i)
91116 func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = {
92117 let caller = toString(i.caller)
93118 if ((caller != toString(this)))
94119 then throw("You are not allowed to call this function")
95120 else {
96121 func updateRatingsFunc (accum,address) = {
97122 let rating = searchForRating(address)
98123 let prediction = searchForAddressPrediction(itemId, address)
99- let updatedRating = if ((prediction == finalPrediction))
100- then (rating + rateAdjustment)
101- else (rating - rateAdjustment)
124+ let actualScore = if ((prediction == finalPrediction))
125+ then 1
126+ else 0
127+ let newRating = calculateNewRating(rating, r_average, rateAdjustment, actualScore)
102128 let payout = if ((prediction == finalPrediction))
103- then payoutAmount
104- else 0
105- let updatedEntries = (accum :+ IntegerEntry(address, updatedRating))
106- if ((payout > 0))
107- then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), payout, tokenId))
129+ then true
130+ else false
131+ let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating))
132+ let calculatedAmount = calculatePayout(newRating, r_average)
133+ if (payout)
134+ then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId))
108135 else updatedEntries
109136 }
110137
111138 let updatedRatings = {
112139 let $l = addressList
113140 let $s = size($l)
114141 let $acc0 = nil
115142 func $f0_1 ($a,$i) = if (($i >= $s))
116143 then $a
117144 else updateRatingsFunc($a, $l[$i])
118145
119146 func $f0_2 ($a,$i) = if (($i >= $s))
120147 then $a
121148 else throw("List size exceeds 5")
122149
123150 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
124151 }
125152 (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true))
126153 }
127154 }
128155
129156
130157
131158 @Callable(i)
132159 func savePrediction (itemId,prediction) = {
133160 let clientAdress = toString(i.caller)
134161 let searchForUser = match getInteger(clientAdress) {
135162 case s: Int =>
136163 s
137164 case _ =>
138165 "User does not exist"
139166 }
140167 if ((searchForUser == "User does not exist"))
141168 then throw("User does not exist")
142169 else {
143170 let isFinal = match getBoolean((itemId + "_final")) {
144171 case s: Boolean =>
145172 s
146173 case _ =>
147174 false
148175 }
149176 if (isFinal)
150177 then throw("Final prediction already made")
151178 else {
152179 let isCanceled = match getBoolean((itemId + "_cancelled")) {
153180 case s: Boolean =>
154181 s
155182 case _ =>
156183 false
157184 }
158185 if (isCanceled)
159186 then throw("Final prediction already made")
160187 else {
161188 let clientRating = searchForRating(clientAdress)
162189 if ((ratingCutoff >= clientRating))
163190 then throw("You are not allowed to participate anymore")
164191 else {
165192 let searchForCounter = match getInteger((itemId + "_counter")) {
166193 case s: Int =>
167194 s
168195 case _ =>
169196 -1
170197 }
171198 if ((searchForCounter >= 1))
172199 then {
173200 let adressList = findPredictionAdresses(itemId, searchForCounter)
174201 if (containsElement(adressList, clientAdress))
175202 then throw("This User already gave a Prediction")
176203 else {
177204 let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
178205 case s: Int =>
179206 s
180207 case _ =>
181208 -1
182209 }
183210 let lastPredictionAdress = adressList[(size(adressList) - 1)]
184211 let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
185212 case s: String =>
186213 s
187214 case _ =>
188215 "no Prediction Found"
189216 }
190217 let newCounter = (searchForCounter + 1)
191218 if ((lastPrediction == prediction))
192219 then if (((predictionCounter + 1) == predictionMaxCounter))
193220 then {
221+ let newRating = calculateNewRating(clientRating, r_average, rateAdjustment, 1)
222+ let calculatedAmount = calculatePayout(newRating, r_average)
194223 let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
195224 if ((invokeAdjustRating != invokeAdjustRating))
196225 then throw("Strict value is not equal to itself.")
197- else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), true), BooleanEntry((itemId + "_cancelled"), false), ScriptTransfer(Address(fromBase58String(clientAdress)), payoutAmount, tokenId), IntegerEntry(clientAdress, (clientRating + 20))]
226+ else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), true), BooleanEntry((itemId + "_cancelled"), false), ScriptTransfer(Address(fromBase58String(clientAdress)), calculatedAmount, tokenId), IntegerEntry((clientAdress + "_rating"), newRating)]
198227 }
199228 else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), false), BooleanEntry((itemId + "_cancelled"), false)]
200229 else if ((newCounter >= maxCounter))
201230 then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter - 1)), BooleanEntry((itemId + "_cancelled"), true), BooleanEntry((itemId + "_final"), false)]
202231 else if (((predictionCounter - 1) == 0))
203232 then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), 1), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false), StringEntry("test", lastPrediction), IntegerEntry("test2", size(adressList))]
204233 else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter - 1)), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false), StringEntry("test", lastPrediction), IntegerEntry("test2", size(adressList))]
205234 }
206235 }
207236 else {
208237 let searchForNewItem = match getString(("new_" + itemId)) {
209238 case s: String =>
210239 s
211240 case _ =>
212241 "Item not Found"
213242 }
214243 if ((searchForNewItem == "Item not Found"))
215244 then throw("Item not found")
216245 else [StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry((itemId + "_predictionCounter"), 1), DeleteEntry(("new_" + itemId)), StringEntry(("updated_" + itemId), itemId)]
217246 }
218247 }
219248 }
220249 }
221250 }
222251 }
223252
224253
225254
226255 @Callable(i)
227256 func registerUser () = {
228257 let clientAdress = toString(i.caller)
229- let searchForUser = match getInteger(clientAdress) {
258+ let searchForUser = match getInteger((clientAdress + "_rating")) {
230259 case s: Int =>
231260 s
232261 case _ =>
233262 -1
234263 }
235264 if ((searchForUser != -1))
236265 then throw("User already exists")
237- else [IntegerEntry(clientAdress, defaultRating)]
266+ else [IntegerEntry((clientAdress + "_rating"), defaultRating)]
238267 }
239268
240269
241270 @Verifier(tx)
242271 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
243272

github/deemru/w8io/026f985 
39.54 ms