tx · 7MBNuUuJ5mXuH84EAeHpxCxsqYz5k4jGbgdUfxRXGXSk

3NAToHPcRGMR4M2pUpy6gPcpiMX5via7vf9:  -0.04000000 Waves

2021.08.25 00:06 [1672919] smart account 3NAToHPcRGMR4M2pUpy6gPcpiMX5via7vf9 > SELF 0.00000000 Waves

{ "type": 13, "id": "7MBNuUuJ5mXuH84EAeHpxCxsqYz5k4jGbgdUfxRXGXSk", "fee": 4000000, "feeAssetId": null, "timestamp": 1629839243649, "version": 2, "chainId": 84, "sender": "3NAToHPcRGMR4M2pUpy6gPcpiMX5via7vf9", "senderPublicKey": "5fe3Hm6UB8fRqvLYhGeeNdy7rEgwpxWjdEFPgnNwSRCz", "proofs": [ "5zn8559DFUHAExQLY18SoqCwmCbpzUQCYQLYx9jNL51bwAB6UJBXeXqXxHh5KeEWdocX9LeWZuN76Zc6kKvfPrL" ], "script": "base64:AAIFAAAAAAAAABAIAhIECgIIBBIGCgQICAgIAAAAJgAAAAAKYmFzZUZhY3RvcgAAAAAAAAAD6AAAAAAJYmFzZUluZGV4AAAjhvJvwQAAAAAAAA1ibG9ja3NQZXJZZWFyAAAAAAAACAUgAAAAAAZjb25maWcJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAR0aGlzAgAAAA1jb25maWdBZGRyZXNzAgAAADFObyBjb25maWcgYWRkcmVzcyBjb3VsZCBiZSBmb3VuZCBpbiBkYXRhIHN0b3JhZ2UhAAAAAAVhZG1pbgkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAABmNvbmZpZwIAAAAFYWRtaW4CAAAAME5vIGFkbWluIGFkZHJlc3MgY291bGQgYmUgZm91bmQgaW4gZGF0YSBzdG9yYWdlIQAAAAALd2F2ZXRyb2xsZXIJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACCQEAAAARQ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FkeSBzZXR1cCEAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleXIOwPI=", "height": 1672919, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GULrNcZi283aQvWgjApCh7g734KLzU7KCVkz4WWKWTAe Next: AoWCoxJ26T9LSHrydyXi5iTkBKZf2zowoDdm7qNrznM7 Diff:
OldNewDifferences
124124
125125
126126 @Callable(i)
127-func setup (aId,tokenName) = {
128- let isAdmin = isAdminAddress(i.caller)
129- if (isAdmin)
130- then {
131- let asset = Issue("dWAVES_Pool_Token", "Direct.finance Liquidity Provider Token of the Waves Coin Pool", 0, 8, true)
132- let tokenId = calculateAssetId(asset)
133-[writeString("assetId", aId), writeString("configAddress", "3N3ayfE547Cw4gBpg8iuMor6V2Ap2wELatz"), IntegerEntry("totalBorrow", 0), IntegerEntry("totalSupply", 0), IntegerEntry("totalReserve", 0), IntegerEntry("storedIndex", baseIndex), IntegerEntry("storedHeight", height), writeString("dTokenName", tokenName), writeString("dTokenId", toBase58String(tokenId)), IntegerEntry("dTokenDecimals", 8), IntegerEntry("dTokenSupply", 0)]
134- }
135- else throw("Address does not match with admin address!")
136- }
127+func setup (aId,configAdd,tokenName,tokenDescription) = if (if (!(isDefined("config")))
128+ then !(isDefined("admin"))
129+ else false)
130+ then {
131+ let asset = Issue(tokenName, tokenDescription, 0, 8, true)
132+ let tokenId = calculateAssetId(asset)
133+[writeString("assetId", aId), writeString("configAddress", configAdd), IntegerEntry("totalBorrow", 0), IntegerEntry("totalSupply", 0), IntegerEntry("totalReserve", 0), IntegerEntry("storedIndex", baseIndex), IntegerEntry("storedHeight", height), writeString("dTokenName", tokenName), writeString("dTokenId", toBase58String(tokenId)), IntegerEntry("dTokenDecimals", 8), IntegerEntry("dTokenSupply", 0)]
134+ }
135+ else throw("Pool already setup!")
137136
138137
139138 @Verifier(tx)
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 = valueOrErrorMessage(getString(this, "configAddress"), "No config address could be found in data storage!")
1111
1212 let admin = valueOrErrorMessage(getString(addressFromStringValue(config), "admin"), "No admin address could be found in data storage!")
1313
1414 let wavetroller = valueOrErrorMessage(getString(addressFromStringValue(config), "wavetroller"), "No wavetroller address could be found in data storage!")
1515
1616 let assetIdSub = valueOrErrorMessage(getString(this, "assetId"), "No assetId could be found in data storage!")
1717
1818 let assetDecimals = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Decimals")), (("No key " + (assetIdSub + "_Decimals")) + " was found"))
1919
2020 let multiplier = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Multiplier")), (("No key " + (assetIdSub + "_Multiplier")) + " was found"))
2121
2222 let kink = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Kink")), (("No key " + (assetIdSub + "_Kink")) + " was found"))
2323
2424 let jumpMultiplier = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_JumpMultiplier")), (("No key " + (assetIdSub + "_JumpMultiplier")) + " was found"))
2525
2626 let baseRate = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_BaseRate")), (("No key " + (assetIdSub + "_BaseRate")) + " was found"))
2727
2828 let reserveFactor = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_ReserveFactor")), (("No key " + (assetIdSub + "_ReserveFactor")) + " was found"))
2929
3030 let totalBorrow = valueOrErrorMessage(getInteger(this, "totalBorrow"), "No key totalBorrow was found")
3131
3232 let totalSupply = valueOrErrorMessage(getInteger(this, "totalSupply"), "No key totalSupply was found")
3333
3434 let totalReserve = valueOrErrorMessage(getInteger(this, "totalReserve"), "No key totalReserve was found")
3535
3636 let dTokenSupply = valueOrErrorMessage(getInteger(this, "dTokenSupply"), "No key dTokenSupply was found")
3737
3838 let dTokenDecimals = valueOrErrorMessage(getInteger(this, "dTokenDecimals"), "No key dTokenDecimals was found")
3939
4040 let dTokenId = valueOrErrorMessage(getString(this, "dTokenId"), "No key dTokenId was found")
4141
4242 let storedHeight = valueOrErrorMessage(getInteger(this, "storedHeight"), "No key storedHeight was found")
4343
4444 let storedIndex = valueOrErrorMessage(getInteger(this, "storedIndex"), "No key storedIndex was found")
4545
4646 func isAdminAddress (address) = if ((addressFromStringValue(admin) == address))
4747 then true
4848 else false
4949
5050
5151 func isWavetroller (address) = if ((addressFromStringValue(wavetroller) == address))
5252 then true
5353 else false
5454
5555
5656 func writeString (key,stringValue) = StringEntry(key, stringValue)
5757
5858
5959 func writeInteger (key,integerValue) = IntegerEntry(key, integerValue)
6060
6161
6262 func userTokenBalance (userAddress) = valueOrElse(getInteger(this, (userAddress + "_tokenBalance")), 0)
6363
6464
6565 let utilization = fraction(totalBorrow, baseFactor, totalSupply)
6666
6767 let apr = {
6868 let minValue = [utilization, kink]
6969 let minValueItem = min(minValue)
7070 let maxValue = [0, (utilization - kink)]
7171 let maxValueItem = max(maxValue)
7272 ((fraction(multiplier, minValueItem, baseFactor) + fraction(jumpMultiplier, maxValueItem, baseFactor)) + baseRate)
7373 }
7474
7575 let apy = fraction(fraction(apr, utilization, baseFactor), (baseFactor - reserveFactor), baseFactor)
7676
7777 let borrowRatePerBlock = fraction(apr, baseIndex, (blocksPerYear * baseFactor))
7878
7979 let deltaBlocks = (height - storedHeight)
8080
8181 let currentIndex = fraction(storedIndex, (baseIndex + (borrowRatePerBlock * deltaBlocks)), baseIndex, CEILING)
8282
8383 let currentTotalBorrow = fraction(totalBorrow, currentIndex, storedIndex)
8484
8585 let collectedInterest = fraction(totalBorrow, (borrowRatePerBlock * deltaBlocks), baseIndex)
8686
8787 let currentSupply = (totalSupply + fraction((baseFactor - reserveFactor), collectedInterest, baseFactor))
8888
8989 let currentReserve = (totalReserve + fraction(reserveFactor, collectedInterest, baseFactor))
9090
9191 let dTokenExchangeRate = if ((dTokenSupply > 0))
9292 then {
9393 let exponent = ((18 - 8) + assetDecimals)
9494 if ((10 > exponent))
9595 then fraction(currentSupply, (1 * pow(10, 2, exponent, 1, 18, CEILING)), dTokenSupply)
9696 else fraction(currentSupply, (1 * pow(10, 2, exponent, 2, 18, CEILING)), dTokenSupply)
9797 }
9898 else {
9999 let rBaseExponent = (assetDecimals + 6)
100100 if ((10 > rBaseExponent))
101101 then fraction(2, (1 * pow(10, 2, rBaseExponent, 1, 18, CEILING)), 1)
102102 else fraction(2, (1 * pow(10, 2, rBaseExponent, 2, 18, CEILING)), 1)
103103 }
104104
105105 func calcTokenAmout (assetAmount) = {
106106 let exponent = ((18 - 8) + assetDecimals)
107107 let exponentPoint = if ((10 > exponent))
108108 then 1
109109 else 2
110110 fraction(assetAmount, (1 * pow(10, 2, exponent, exponentPoint, 18, CEILING)), dTokenExchangeRate)
111111 }
112112
113113
114114 @Callable(i)
115115 func deposit (user,isCollateral) = if (isWavetroller(i.caller))
116116 then {
117117 let userTokenAmount = calcTokenAmout(i.payments[0].amount)
118118 let currentDTokenSupply = (dTokenSupply + userTokenAmount)
119119 let userBalance = (userTokenBalance(user) + userTokenAmount)
120120 [Reissue(fromBase58String(dTokenId), userTokenAmount, true), writeInteger("dTokenSupply", currentDTokenSupply), writeInteger((user + "_tokenBalance"), userBalance), BooleanEntry((user + "_useAsCollateral"), isCollateral), writeInteger("totalBorrow", currentTotalBorrow), writeInteger("totalSupply", (currentSupply + i.payments[0].amount)), writeInteger("totalReserve", currentReserve), writeInteger("storedIndex", currentIndex), writeInteger("storedHeight", height), ScriptTransfer(i.caller, userTokenAmount, fromBase58String(dTokenId))]
121121 }
122122 else throw("Address does not match with wavetroller address!")
123123
124124
125125
126126 @Callable(i)
127-func setup (aId,tokenName) = {
128- let isAdmin = isAdminAddress(i.caller)
129- if (isAdmin)
130- then {
131- let asset = Issue("dWAVES_Pool_Token", "Direct.finance Liquidity Provider Token of the Waves Coin Pool", 0, 8, true)
132- let tokenId = calculateAssetId(asset)
133-[writeString("assetId", aId), writeString("configAddress", "3N3ayfE547Cw4gBpg8iuMor6V2Ap2wELatz"), IntegerEntry("totalBorrow", 0), IntegerEntry("totalSupply", 0), IntegerEntry("totalReserve", 0), IntegerEntry("storedIndex", baseIndex), IntegerEntry("storedHeight", height), writeString("dTokenName", tokenName), writeString("dTokenId", toBase58String(tokenId)), IntegerEntry("dTokenDecimals", 8), IntegerEntry("dTokenSupply", 0)]
134- }
135- else throw("Address does not match with admin address!")
136- }
127+func setup (aId,configAdd,tokenName,tokenDescription) = if (if (!(isDefined("config")))
128+ then !(isDefined("admin"))
129+ else false)
130+ then {
131+ let asset = Issue(tokenName, tokenDescription, 0, 8, true)
132+ let tokenId = calculateAssetId(asset)
133+[writeString("assetId", aId), writeString("configAddress", configAdd), IntegerEntry("totalBorrow", 0), IntegerEntry("totalSupply", 0), IntegerEntry("totalReserve", 0), IntegerEntry("storedIndex", baseIndex), IntegerEntry("storedHeight", height), writeString("dTokenName", tokenName), writeString("dTokenId", toBase58String(tokenId)), IntegerEntry("dTokenDecimals", 8), IntegerEntry("dTokenSupply", 0)]
134+ }
135+ else throw("Pool already setup!")
137136
138137
139138 @Verifier(tx)
140139 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
141140

github/deemru/w8io/169f3d6 
32.55 ms