tx · JAQHG9ia53NYmzwNFBs3qNwh5Kk6PVBRojuoQ6DoZdDX

3MyfKzBNordUSxbv54zj1hxm98ojcDvaiXU:  -0.04000000 Waves

2021.09.07 00:56 [1691754] smart account 3MyfKzBNordUSxbv54zj1hxm98ojcDvaiXU > SELF 0.00000000 Waves

{ "type": 13, "id": "JAQHG9ia53NYmzwNFBs3qNwh5Kk6PVBRojuoQ6DoZdDX", "fee": 4000000, "feeAssetId": null, "timestamp": 1630965382860, "version": 2, "chainId": 84, "sender": "3MyfKzBNordUSxbv54zj1hxm98ojcDvaiXU", "senderPublicKey": "EhGswdVQkp8SXCWyKvRCUKYDidTrRjnzTPa8CZk6GYgN", "proofs": [ "4ay6bY8Zw1cpXrfnz6wqKDh5jx8N6Uxhmybq9ojv4TwGCPb4dNQsDVR71tnNBDJMQHrxZ5wEw1bSFnJ2Ex4xUuwr" ], "script": "base64:AAIFAAAAAAAAAEUIAhIDCgEIEgMKAQgSBwoFCAEIAQgSBAoCCAQSAwoBCBIDCgEIEgQKAggBEgQKAggBEgQKAggBEgMKAQgSBwoFCAgBCAgAAAAuAAAAAApiYXNlRmFjdG9yAAAAAAAAAAPoAAAAAAliYXNlSW5kZXgAACOG8m/BAAAAAAAADWJsb2Nrc1BlclllYXIAAAAAAAAIBSAAAAAABmNvbmZpZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAA1jb25maWdBZGRyZXNzAgAAAAAAAAAABWFkbWluCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAABmNvbmZpZwIAAAAFYWRtaW4CAAAAAAAAAAALd2F2ZXRyb2xsZXIJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAGY29uZmlnAgAAAAt3YXZldHJvbGxlcgIAAAAAAAAAAAZvcmFjbGUJ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AAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAMdG90YWxSZXNlcnZlAAAAAAAAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAtzdG9yZWRJbmRleAUAAAAJYmFzZUluZGV4CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAxzdG9yZWRIZWlnaHQFAAAABmhlaWdodAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAQYmFzZUV4Y2hhbmdlUmF0ZQUAAAAQYmFzZUV4Y2hhbmdlUmF0ZQkABEwAAAACCQEAAAALd3JpdGVTdHJpbmcAAAACAgAAAApkVG9rZW5OYW1lBQAAAAl0b2tlbk5hbWUJAARMAAAAAgkBAAAAC3dyaXRlU3RyaW5nAAAAAgIAAAAIZFRva2VuSWQJAAJYAAAAAQUAAAAHdG9rZW5JZAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAOZFRva2VuRGVjaW1hbHMAAAAAAAAAAAgJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADGRUb2tlblN1cHBseQAAAAAAAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAE1Bvb2wgYWxyZWFkeSBzZXR1cCEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlecdONSs=", "height": 1691754, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AiPAVgDh6X5G3bhFpytoGa4bHr6FrJG1Nki7o3qhRGpJ Next: B9idnqEtSr3GSrkwfyZADRFoV5Ngt5WJozXQDfqUrtjw Diff:
OldNewDifferences
137137
138138
139139 @Callable(i)
140+func getBorrowUSD (user) = {
141+ let borrow = getCurrentUserBorrow(user)
142+ let mantissa = pow(10, 0, assetDecimals, 0, 0, CEILING)
143+ let assetPrice = {
144+ let price = invoke(addressFromStringValue(oracle), "getPrice", [assetIdSub], nil)
145+ match price {
146+ case t: Int =>
147+ t
148+ case _ =>
149+ throw("Price is not an Integer!")
150+ }
151+ }
152+ $Tuple2(nil, $Tuple3(borrow, assetPrice, mantissa))
153+ }
154+
155+
156+
157+@Callable(i)
158+func getCollateralUSD (user) = {
159+ let dTokenCollateral = valueOrElse(getInteger(this, (user + "_locked")), 0)
160+ let assetCollateral = calcAssetAmount(dTokenCollateral)
161+ let mantissa = pow(10, 0, assetDecimals, 0, 0, CEILING)
162+ let assetPrice = {
163+ let price = invoke(addressFromStringValue(oracle), "getPrice", [assetIdSub], nil)
164+ match price {
165+ case t: Int =>
166+ t
167+ case _ =>
168+ throw("Price is not an Integer!")
169+ }
170+ }
171+ $Tuple2(nil, $Tuple3(assetCollateral, assetPrice, mantissa))
172+ }
173+
174+
175+
176+@Callable(i)
140177 func getUserHealthParameter (user,collateralAmount,collateralId,newDebtAmount,newDebtId) = if (isWavetroller(i.caller))
141178 then {
142179 let userLocked = valueOrElse(getInteger(this, (user + "_locked")), 0)
230267
231268
232269 @Callable(i)
270+func payoutPenalty (user,amount) = if (isWavetroller(i.caller))
271+ then {
272+ let dTokenCollateral = getIntegerValue(this, (user + "_locked"))
273+ let dTokenPenalty = calcDTokenAmount(amount)
274+ $Tuple2([writeInteger((user + "_locked"), (dTokenCollateral - dTokenPenalty)), Burn(fromBase58String(dTokenId), dTokenPenalty), writeInteger("dTokenSupply", (dTokenSupply - dTokenPenalty)), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", (currentTotalSupply - amount)), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), if ((assetIdSub == "WAVES"))
275+ then ScriptTransfer(i.caller, amount, unit)
276+ else ScriptTransfer(i.caller, amount, fromBase58String(assetIdSub))], amount)
277+ }
278+ else throw("Address does not match with wavetroller address!")
279+
280+
281+
282+@Callable(i)
233283 func repay (user) = if (isWavetroller(i.caller))
234284 then {
235285 let currentUserBorrow = getCurrentUserBorrow(user)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let baseFactor = 1000
55
66 let baseIndex = 10000000000000000
77
88 let blocksPerYear = 525600
99
1010 let config = valueOrElse(getString(this, "configAddress"), "")
1111
1212 let admin = valueOrElse(getString(addressFromStringValue(config), "admin"), "")
1313
1414 let wavetroller = valueOrElse(getString(addressFromStringValue(config), "wavetroller"), "")
1515
1616 let oracle = valueOrElse(getString(addressFromStringValue(config), "oracle"), "")
1717
1818 let assetIdSub = valueOrErrorMessage(getString(this, "assetId"), "No assetId could be found in data storage!")
1919
2020 let assetDecimals = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Decimals")), (("No key " + (assetIdSub + "_Decimals")) + " was found"))
2121
2222 let multiplier = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Multiplier")), (("No key " + (assetIdSub + "_Multiplier")) + " was found"))
2323
2424 let kink = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Kink")), (("No key " + (assetIdSub + "_Kink")) + " was found"))
2525
2626 let jumpMultiplier = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_JumpMultiplier")), (("No key " + (assetIdSub + "_JumpMultiplier")) + " was found"))
2727
2828 let baseRate = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_BaseRate")), (("No key " + (assetIdSub + "_BaseRate")) + " was found"))
2929
3030 let baseExchangeRate = valueOrErrorMessage(getInteger(this, "baseExchangeRate"), "No key baseExchangeRate was found")
3131
3232 let collateralFactor = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_CollateralFactor")), (("No key " + (assetIdSub + "_CollateralFactor")) + " was found"))
3333
3434 let liquidationThreshold = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Threshold")), (("No key " + (assetIdSub + "_Threshold")) + " was found"))
3535
3636 let reserveFactor = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_ReserveFactor")), (("No key " + (assetIdSub + "_ReserveFactor")) + " was found"))
3737
3838 let totalBorrow = valueOrElse(getInteger(this, "totalBorrow"), 0)
3939
4040 let totalSupply = valueOrElse(getInteger(this, "totalSupply"), 0)
4141
4242 let totalReserve = valueOrElse(getInteger(this, "totalReserve"), 0)
4343
4444 let dTokenSupply = valueOrErrorMessage(getInteger(this, "dTokenSupply"), "No key dTokenSupply was found")
4545
4646 let dTokenDecimals = valueOrErrorMessage(getInteger(this, "dTokenDecimals"), "No key dTokenDecimals was found")
4747
4848 let dTokenId = valueOrErrorMessage(getString(this, "dTokenId"), "No key dTokenId was found")
4949
5050 let dTokenName = valueOrErrorMessage(getString(this, "dTokenName"), "No key dTokenName was found")
5151
5252 let storedHeight = valueOrElse(getInteger(this, "storedHeight"), height)
5353
5454 let storedIndex = valueOrElse(getInteger(this, "storedIndex"), 10000000000000000)
5555
5656 func isAdminAddress (address) = if ((addressFromStringValue(admin) == address))
5757 then true
5858 else false
5959
6060
6161 func isWavetroller (address) = if ((addressFromStringValue(wavetroller) == address))
6262 then true
6363 else false
6464
6565
6666 func isAcceptableAssetId (assetId) = if ((assetId == assetIdSub))
6767 then true
6868 else false
6969
7070
7171 func writeString (key,stringValue) = StringEntry(key, stringValue)
7272
7373
7474 func writeInteger (key,integerValue) = IntegerEntry(key, integerValue)
7575
7676
7777 func userlockedBalance (userAddress) = valueOrElse(getInteger(this, (userAddress + "_locked")), 0)
7878
7979
8080 let utilization = if ((totalSupply > 0))
8181 then fraction(totalBorrow, baseFactor, totalSupply)
8282 else 0
8383
8484 let apr = {
8585 let minValue = [utilization, kink]
8686 let minValueItem = min(minValue)
8787 let maxValue = [0, (utilization - kink)]
8888 let maxValueItem = max(maxValue)
8989 ((fraction(multiplier, minValueItem, baseFactor) + fraction(jumpMultiplier, maxValueItem, baseFactor)) + baseRate)
9090 }
9191
9292 let apy = fraction(fraction(apr, utilization, baseFactor), (baseFactor - reserveFactor), baseFactor)
9393
9494 let borrowRatePerBlock = fraction(apr, baseIndex, (blocksPerYear * baseFactor))
9595
9696 let deltaBlocks = (height - storedHeight)
9797
9898 let currentIndex = fraction(storedIndex, (baseIndex + (borrowRatePerBlock * deltaBlocks)), baseIndex, CEILING)
9999
100100 let currentTotalBorrow = fraction(totalBorrow, currentIndex, storedIndex)
101101
102102 let collectedInterest = fraction(totalBorrow, (borrowRatePerBlock * deltaBlocks), baseIndex)
103103
104104 let currentTotalSupply = (totalSupply + fraction((baseFactor - reserveFactor), collectedInterest, baseFactor))
105105
106106 let currentReserve = (totalReserve + fraction(reserveFactor, collectedInterest, baseFactor))
107107
108108 let exchangeRate = if ((dTokenSupply > 0))
109109 then {
110110 let exponent = ((18 - dTokenDecimals) + assetDecimals)
111111 let mantissa = pow(10, 0, exponent, 0, 0, CEILING)
112112 fraction(currentTotalSupply, mantissa, dTokenSupply)
113113 }
114114 else baseExchangeRate
115115
116116 func calcDTokenAmount (assetAmount) = {
117117 let exponent = ((18 - dTokenDecimals) + assetDecimals)
118118 let mantissa = pow(10, 0, exponent, 0, 0, CEILING)
119119 fraction(assetAmount, mantissa, exchangeRate)
120120 }
121121
122122
123123 func calcAssetAmount (dTokenAmount) = {
124124 let exponent = ((18 - dTokenDecimals) + assetDecimals)
125125 let mantissa = pow(10, 0, exponent, 0, 0, CEILING)
126126 fraction(dTokenAmount, exchangeRate, mantissa)
127127 }
128128
129129
130130 func getCurrentUserBorrow (user) = {
131131 let storedBorrow = valueOrElse(getInteger(this, (user + "_borrow")), 0)
132132 let storedBorrowIndex = valueOrElse(getInteger(this, (user + "_index")), 0)
133133 if ((storedBorrowIndex > 0))
134134 then fraction(storedBorrow, currentIndex, storedBorrowIndex)
135135 else 0
136136 }
137137
138138
139139 @Callable(i)
140+func getBorrowUSD (user) = {
141+ let borrow = getCurrentUserBorrow(user)
142+ let mantissa = pow(10, 0, assetDecimals, 0, 0, CEILING)
143+ let assetPrice = {
144+ let price = invoke(addressFromStringValue(oracle), "getPrice", [assetIdSub], nil)
145+ match price {
146+ case t: Int =>
147+ t
148+ case _ =>
149+ throw("Price is not an Integer!")
150+ }
151+ }
152+ $Tuple2(nil, $Tuple3(borrow, assetPrice, mantissa))
153+ }
154+
155+
156+
157+@Callable(i)
158+func getCollateralUSD (user) = {
159+ let dTokenCollateral = valueOrElse(getInteger(this, (user + "_locked")), 0)
160+ let assetCollateral = calcAssetAmount(dTokenCollateral)
161+ let mantissa = pow(10, 0, assetDecimals, 0, 0, CEILING)
162+ let assetPrice = {
163+ let price = invoke(addressFromStringValue(oracle), "getPrice", [assetIdSub], nil)
164+ match price {
165+ case t: Int =>
166+ t
167+ case _ =>
168+ throw("Price is not an Integer!")
169+ }
170+ }
171+ $Tuple2(nil, $Tuple3(assetCollateral, assetPrice, mantissa))
172+ }
173+
174+
175+
176+@Callable(i)
140177 func getUserHealthParameter (user,collateralAmount,collateralId,newDebtAmount,newDebtId) = if (isWavetroller(i.caller))
141178 then {
142179 let userLocked = valueOrElse(getInteger(this, (user + "_locked")), 0)
143180 let userDTokenCollateral = if ((dTokenId == collateralId))
144181 then (userLocked - collateralAmount)
145182 else userLocked
146183 let currentUserBorrow = if ((newDebtId == assetIdSub))
147184 then (getCurrentUserBorrow(user) + newDebtAmount)
148185 else getCurrentUserBorrow(user)
149186 let userCollateral = calcAssetAmount(userDTokenCollateral)
150187 let assetPrice = invoke(addressFromStringValue(oracle), "getPrice", [assetIdSub], nil)
151188 match assetPrice {
152189 case t: Int =>
153190 let collateralValue = fraction(collateralFactor, userCollateral, baseFactor)
154191 let mantissa = pow(10, 0, assetDecimals, 0, 0, CEILING)
155192 let bCSummand = fraction(collateralValue, t, mantissa)
156193 let borrowInUSD = fraction(currentUserBorrow, t, mantissa)
157194 let bCUSummand = fraction(borrowInUSD, baseFactor, liquidationThreshold)
158195 $Tuple2(nil, $Tuple2(bCSummand, bCUSummand))
159196 case _ =>
160197 throw("Incorrect pricing")
161198 }
162199 }
163200 else throw("Address does not match with wavetroller address!")
164201
165202
166203
167204 @Callable(i)
168205 func deposit (user,isCollateral) = if (isWavetroller(i.caller))
169206 then {
170207 let userTokenAmount = calcDTokenAmount(i.payments[0].amount)
171208 let currentDTokenSupply = (dTokenSupply + userTokenAmount)
172209 if (isCollateral)
173210 then {
174211 let lockedUserBalance = (userlockedBalance(user) + userTokenAmount)
175212 $Tuple2([writeInteger((user + "_locked"), lockedUserBalance), writeInteger("dTokenSupply", currentDTokenSupply), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", (currentTotalSupply + i.payments[0].amount)), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), Reissue(fromBase58String(dTokenId), userTokenAmount, true)], ((toString(i.payments[0].amount) + dTokenName) + "were successfully locked"))
176213 }
177214 else $Tuple2([writeInteger("dTokenSupply", currentDTokenSupply), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", (currentTotalSupply + i.payments[0].amount)), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), Reissue(fromBase58String(dTokenId), userTokenAmount, true), ScriptTransfer(i.caller, userTokenAmount, fromBase58String(dTokenId))], userTokenAmount)
178215 }
179216 else throw("Address does not match with wavetroller address!")
180217
181218
182219
183220 @Callable(i)
184221 func withdraw (user) = if (isWavetroller(i.caller))
185222 then {
186223 let availableLiquidity = (currentTotalSupply - currentTotalBorrow)
187224 let requestedAssetAmount = calcAssetAmount(i.payments[0].amount)
188225 if ((availableLiquidity >= requestedAssetAmount))
189226 then $Tuple2([writeInteger("dTokenSupply", (dTokenSupply - i.payments[0].amount)), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", (currentTotalSupply - requestedAssetAmount)), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), Burn(fromBase58String(dTokenId), i.payments[0].amount), if ((assetIdSub == "WAVES"))
190227 then ScriptTransfer(i.caller, requestedAssetAmount, unit)
191228 else ScriptTransfer(i.caller, requestedAssetAmount, fromBase58String(assetIdSub))], requestedAssetAmount)
192229 else throw("Pool liquidity is not sufficient!")
193230 }
194231 else throw("Address does not match with wavetroller address!")
195232
196233
197234
198235 @Callable(i)
199236 func lockAsCollateral (user) = if (isWavetroller(i.caller))
200237 then {
201238 let newLockedBalance = (userlockedBalance(user) + i.payments[0].amount)
202239 $Tuple2([writeInteger((user + "_locked"), newLockedBalance), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", currentTotalSupply), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height)], ((toString(i.payments[0].amount) + dTokenName) + "were successfully locked"))
203240 }
204241 else throw("Address does not match with wavetroller address!")
205242
206243
207244
208245 @Callable(i)
209246 func redeemCollateral (user,amount) = if (isWavetroller(i.caller))
210247 then {
211248 let userCollateral = valueOrElse(getInteger(this, (user + "_locked")), 0)
212249 if ((userCollateral >= amount))
213250 then $Tuple2([writeInteger((user + "_locked"), (userCollateral - amount)), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", currentTotalSupply), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), ScriptTransfer(i.caller, amount, fromBase58String(dTokenId))], amount)
214251 else $Tuple2([writeInteger((user + "_locked"), 0), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", currentTotalSupply), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), ScriptTransfer(i.caller, userCollateral, fromBase58String(dTokenId))], userCollateral)
215252 }
216253 else throw("Address does not match with wavetroller address!")
217254
218255
219256
220257 @Callable(i)
221258 func borrow (user,amount) = if (isWavetroller(i.caller))
222259 then {
223260 let currentUserBorrow = getCurrentUserBorrow(user)
224261 $Tuple2([writeInteger((user + "_borrow"), (currentUserBorrow + amount)), writeInteger((user + "_index"), currentIndex), writeInteger("totalBorrow", (currentTotalBorrow + amount)), writeInteger("totalSupply", currentTotalSupply), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), if ((assetIdSub == "WAVES"))
225262 then ScriptTransfer(i.caller, amount, unit)
226263 else ScriptTransfer(i.caller, amount, fromBase58String(assetIdSub))], amount)
227264 }
228265 else throw("Address does not match with wavetroller address!")
229266
230267
231268
232269 @Callable(i)
270+func payoutPenalty (user,amount) = if (isWavetroller(i.caller))
271+ then {
272+ let dTokenCollateral = getIntegerValue(this, (user + "_locked"))
273+ let dTokenPenalty = calcDTokenAmount(amount)
274+ $Tuple2([writeInteger((user + "_locked"), (dTokenCollateral - dTokenPenalty)), Burn(fromBase58String(dTokenId), dTokenPenalty), writeInteger("dTokenSupply", (dTokenSupply - dTokenPenalty)), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", (currentTotalSupply - amount)), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), if ((assetIdSub == "WAVES"))
275+ then ScriptTransfer(i.caller, amount, unit)
276+ else ScriptTransfer(i.caller, amount, fromBase58String(assetIdSub))], amount)
277+ }
278+ else throw("Address does not match with wavetroller address!")
279+
280+
281+
282+@Callable(i)
233283 func repay (user) = if (isWavetroller(i.caller))
234284 then {
235285 let currentUserBorrow = getCurrentUserBorrow(user)
236286 if ((currentUserBorrow >= i.payments[0].amount))
237287 then $Tuple2([writeInteger((user + "_borrow"), (currentUserBorrow - i.payments[0].amount)), writeInteger((user + "_index"), currentIndex), writeInteger("totalBorrow", (currentTotalBorrow - i.payments[0].amount)), writeInteger("totalSupply", currentTotalSupply), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height)], ((toString(i.payments[0].amount) + " successfully repaid. User credit at") + toString((currentUserBorrow - i.payments[0].amount))))
238288 else {
239289 let remnant = (i.payments[0].amount - currentUserBorrow)
240290 $Tuple2([writeInteger((user + "_borrow"), 0), writeInteger((user + "_index"), currentIndex), writeInteger("totalBorrow", (currentTotalBorrow - currentUserBorrow)), writeInteger("totalSupply", currentTotalSupply), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), if ((assetIdSub == "WAVES"))
241291 then ScriptTransfer(i.caller, remnant, unit)
242292 else ScriptTransfer(i.caller, remnant, fromBase58String(assetIdSub))], remnant)
243293 }
244294 }
245295 else throw("Address does not match with wavetroller address!")
246296
247297
248298
249299 @Callable(i)
250300 func setup (aId,configAdd,baseExchangeRate,tokenName,tokenDescription) = if (!(isDefined(getString(this, "configAddress"))))
251301 then {
252302 let asset = Issue(tokenName, tokenDescription, 0, 8, true)
253303 let tokenId = calculateAssetId(asset)
254304 [asset, writeString("assetId", aId), writeString("configAddress", configAdd), IntegerEntry("totalBorrow", 0), IntegerEntry("totalSupply", 0), IntegerEntry("totalReserve", 0), IntegerEntry("storedIndex", baseIndex), IntegerEntry("storedHeight", height), IntegerEntry("baseExchangeRate", baseExchangeRate), writeString("dTokenName", tokenName), writeString("dTokenId", toBase58String(tokenId)), IntegerEntry("dTokenDecimals", 8), IntegerEntry("dTokenSupply", 0)]
255305 }
256306 else throw("Pool already setup!")
257307
258308
259309 @Verifier(tx)
260310 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
261311

github/deemru/w8io/026f985 
64.06 ms