tx · GULrNcZi283aQvWgjApCh7g734KLzU7KCVkz4WWKWTAe 3NAToHPcRGMR4M2pUpy6gPcpiMX5via7vf9: -0.01000000 Waves 2021.08.24 23:59 [1672911] smart account 3NAToHPcRGMR4M2pUpy6gPcpiMX5via7vf9 > SELF 0.00000000 Waves
{ "type": 13, "id": "GULrNcZi283aQvWgjApCh7g734KLzU7KCVkz4WWKWTAe", "fee": 1000000, "feeAssetId": null, "timestamp": 1629838858804, "version": 2, "chainId": 84, "sender": "3NAToHPcRGMR4M2pUpy6gPcpiMX5via7vf9", "senderPublicKey": "5fe3Hm6UB8fRqvLYhGeeNdy7rEgwpxWjdEFPgnNwSRCz", "proofs": [ "21EEHueXB4Gf3WiXkc5DU7Qg9eNiyGmE7XwXpExohNUPkLxmmpQKg6UFRUKBMD6fXj7rw34gogPddg2Y9R3vf45o" ], "script": "base64:AAIFAAAAAAAAAA4IAhIECgIIBBIECgIICAAAACYAAAAACmJhc2VGYWN0b3IAAAAAAAAAA+gAAAAACWJhc2VJbmRleAAAI4byb8EAAAAAAAANYmxvY2tzUGVyWWVhcgAAAAAAAAgFIAAAAAAGY29uZmlnCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAANY29uZmlnQWRkcmVzcwIAAAAxTm8gY29uZmlnIGFkZHJlc3MgY291bGQgYmUgZm91bmQgaW4gZGF0YSBzdG9yYWdlIQAAAAAFYWRtaW4JAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAZjb25maWcCAAAABWFkbWluAgAAADBObyBhZG1pbiBhZGRyZXNzIGNvdWxkIGJlIGZvdW5kIGluIGRhdGEgc3RvcmFnZSEAAAAAC3dhdmV0cm9sbGVyCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAA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AAAKkFkZHJlc3MgZG9lcyBub3QgbWF0Y2ggd2l0aCBhZG1pbiBhZGRyZXNzIQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5h5Q/ZQ==", "height": 1672911, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 7MBNuUuJ5mXuH84EAeHpxCxsqYz5k4jGbgdUfxRXGXSk Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let baseFactor = 1000 | |
5 | + | ||
6 | + | let baseIndex = 10000000000000000 | |
7 | + | ||
8 | + | let blocksPerYear = 525600 | |
9 | + | ||
10 | + | let config = valueOrErrorMessage(getString(this, "configAddress"), "No config address could be found in data storage!") | |
11 | + | ||
12 | + | let admin = valueOrErrorMessage(getString(addressFromStringValue(config), "admin"), "No admin address could be found in data storage!") | |
13 | + | ||
14 | + | let wavetroller = valueOrErrorMessage(getString(addressFromStringValue(config), "wavetroller"), "No wavetroller address could be found in data storage!") | |
15 | + | ||
16 | + | let assetIdSub = valueOrErrorMessage(getString(this, "assetId"), "No assetId could be found in data storage!") | |
17 | + | ||
18 | + | let assetDecimals = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Decimals")), (("No key " + (assetIdSub + "_Decimals")) + " was found")) | |
19 | + | ||
20 | + | let multiplier = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Multiplier")), (("No key " + (assetIdSub + "_Multiplier")) + " was found")) | |
21 | + | ||
22 | + | let kink = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_Kink")), (("No key " + (assetIdSub + "_Kink")) + " was found")) | |
23 | + | ||
24 | + | let jumpMultiplier = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_JumpMultiplier")), (("No key " + (assetIdSub + "_JumpMultiplier")) + " was found")) | |
25 | + | ||
26 | + | let baseRate = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_BaseRate")), (("No key " + (assetIdSub + "_BaseRate")) + " was found")) | |
27 | + | ||
28 | + | let reserveFactor = valueOrErrorMessage(getInteger(addressFromStringValue(config), (assetIdSub + "_ReserveFactor")), (("No key " + (assetIdSub + "_ReserveFactor")) + " was found")) | |
29 | + | ||
30 | + | let totalBorrow = valueOrErrorMessage(getInteger(this, "totalBorrow"), "No key totalBorrow was found") | |
31 | + | ||
32 | + | let totalSupply = valueOrErrorMessage(getInteger(this, "totalSupply"), "No key totalSupply was found") | |
33 | + | ||
34 | + | let totalReserve = valueOrErrorMessage(getInteger(this, "totalReserve"), "No key totalReserve was found") | |
35 | + | ||
36 | + | let dTokenSupply = valueOrErrorMessage(getInteger(this, "dTokenSupply"), "No key dTokenSupply was found") | |
37 | + | ||
38 | + | let dTokenDecimals = valueOrErrorMessage(getInteger(this, "dTokenDecimals"), "No key dTokenDecimals was found") | |
39 | + | ||
40 | + | let dTokenId = valueOrErrorMessage(getString(this, "dTokenId"), "No key dTokenId was found") | |
41 | + | ||
42 | + | let storedHeight = valueOrErrorMessage(getInteger(this, "storedHeight"), "No key storedHeight was found") | |
43 | + | ||
44 | + | let storedIndex = valueOrErrorMessage(getInteger(this, "storedIndex"), "No key storedIndex was found") | |
45 | + | ||
46 | + | func isAdminAddress (address) = if ((addressFromStringValue(admin) == address)) | |
47 | + | then true | |
48 | + | else false | |
49 | + | ||
50 | + | ||
51 | + | func isWavetroller (address) = if ((addressFromStringValue(wavetroller) == address)) | |
52 | + | then true | |
53 | + | else false | |
54 | + | ||
55 | + | ||
56 | + | func writeString (key,stringValue) = StringEntry(key, stringValue) | |
57 | + | ||
58 | + | ||
59 | + | func writeInteger (key,integerValue) = IntegerEntry(key, integerValue) | |
60 | + | ||
61 | + | ||
62 | + | func userTokenBalance (userAddress) = valueOrElse(getInteger(this, (userAddress + "_tokenBalance")), 0) | |
63 | + | ||
64 | + | ||
65 | + | let utilization = fraction(totalBorrow, baseFactor, totalSupply) | |
66 | + | ||
67 | + | let apr = { | |
68 | + | let minValue = [utilization, kink] | |
69 | + | let minValueItem = min(minValue) | |
70 | + | let maxValue = [0, (utilization - kink)] | |
71 | + | let maxValueItem = max(maxValue) | |
72 | + | ((fraction(multiplier, minValueItem, baseFactor) + fraction(jumpMultiplier, maxValueItem, baseFactor)) + baseRate) | |
73 | + | } | |
74 | + | ||
75 | + | let apy = fraction(fraction(apr, utilization, baseFactor), (baseFactor - reserveFactor), baseFactor) | |
76 | + | ||
77 | + | let borrowRatePerBlock = fraction(apr, baseIndex, (blocksPerYear * baseFactor)) | |
78 | + | ||
79 | + | let deltaBlocks = (height - storedHeight) | |
80 | + | ||
81 | + | let currentIndex = fraction(storedIndex, (baseIndex + (borrowRatePerBlock * deltaBlocks)), baseIndex, CEILING) | |
82 | + | ||
83 | + | let currentTotalBorrow = fraction(totalBorrow, currentIndex, storedIndex) | |
84 | + | ||
85 | + | let collectedInterest = fraction(totalBorrow, (borrowRatePerBlock * deltaBlocks), baseIndex) | |
86 | + | ||
87 | + | let currentSupply = (totalSupply + fraction((baseFactor - reserveFactor), collectedInterest, baseFactor)) | |
88 | + | ||
89 | + | let currentReserve = (totalReserve + fraction(reserveFactor, collectedInterest, baseFactor)) | |
90 | + | ||
91 | + | let dTokenExchangeRate = if ((dTokenSupply > 0)) | |
92 | + | then { | |
93 | + | let exponent = ((18 - 8) + assetDecimals) | |
94 | + | if ((10 > exponent)) | |
95 | + | then fraction(currentSupply, (1 * pow(10, 2, exponent, 1, 18, CEILING)), dTokenSupply) | |
96 | + | else fraction(currentSupply, (1 * pow(10, 2, exponent, 2, 18, CEILING)), dTokenSupply) | |
97 | + | } | |
98 | + | else { | |
99 | + | let rBaseExponent = (assetDecimals + 6) | |
100 | + | if ((10 > rBaseExponent)) | |
101 | + | then fraction(2, (1 * pow(10, 2, rBaseExponent, 1, 18, CEILING)), 1) | |
102 | + | else fraction(2, (1 * pow(10, 2, rBaseExponent, 2, 18, CEILING)), 1) | |
103 | + | } | |
104 | + | ||
105 | + | func calcTokenAmout (assetAmount) = { | |
106 | + | let exponent = ((18 - 8) + assetDecimals) | |
107 | + | let exponentPoint = if ((10 > exponent)) | |
108 | + | then 1 | |
109 | + | else 2 | |
110 | + | fraction(assetAmount, (1 * pow(10, 2, exponent, exponentPoint, 18, CEILING)), dTokenExchangeRate) | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | @Callable(i) | |
115 | + | func deposit (user,isCollateral) = if (isWavetroller(i.caller)) | |
116 | + | then { | |
117 | + | let userTokenAmount = calcTokenAmout(i.payments[0].amount) | |
118 | + | let currentDTokenSupply = (dTokenSupply + userTokenAmount) | |
119 | + | let userBalance = (userTokenBalance(user) + userTokenAmount) | |
120 | + | [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))] | |
121 | + | } | |
122 | + | else throw("Address does not match with wavetroller address!") | |
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | @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 | + | } | |
137 | + | ||
138 | + | ||
139 | + | @Verifier(tx) | |
140 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
141 | + |
github/deemru/w8io/169f3d6 21.91 ms ◑