Transaction #3150

Hash 6a3561671254fdc642dd24a196db2f782c5cda28989fb2e6acf13c9da7ac67cb
Status Success
Timestamp 449 days ago - 2/12/2023, 9:18:53 PM UTC+0
Block 3150
Stamps Used 1221
Burned Fee 0.07224852 TAU
From 7c296eb80e379171f694a3c5be7640d16f300f09d731c99ac0a92f49c9c0c151 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 2
Processor 11185fe3c6e68d11f89929e2f531de3fb640771de1aee32c606c30c70b6600d2
Signature 5bfe03b6bc8af71c18e4df319d7a39997c285f204e3496ed4094ace2903b700ee160938909c907ea28a50231c5ae9975e49ff5b6391bca0a9378e81c07d85800
Stamps Supplied 3000
Stamps per TAU 169

Kwargs

code # Imports # Reward Token import con_lusd_lst001 import currency # AMM Contract import con_rocketswap_official_v1_1 # Setup Tokens DEX = con_rocketswap_official_v1_1 LIQUIDITY_TOKEN = "con_lusd_lst001" # TAU/RSWP Pair YIELD_TOKEN = currency # State Owner = Variable() DevRewardWallet = Variable() EmissionRatePerHour = Variable() DevRewardPct = Variable() StartTime = Variable() EndTime = Variable() OpenForBusiness = Variable() # If false, users will be unable to join the pool Deposits = Hash(default_value=False) Withdrawals = Hash(default_value=0) CurrentEpochIndex = Variable() Epochs = Hash(default_value=False) StakedBalance = Variable() # The total amount of farming token in the vault. WithdrawnBalance = Variable() EpochMinTime = Variable() # The minimum amount of seconds in Epoch EpochMaxRatioIncrease = ( Variable() ) # The maximum ratio which the Epoch can increase by since last Epoch before incrementing. meta = Hash(default_value=False) decimal_converter_var = Variable() TrustedImporters = Variable() # Vtoken balances = Hash(default_value=0) @construct def seed(): Owner.set(ctx.caller) DevRewardWallet.set(ctx.caller) CurrentEpochIndex.set(0) StakedBalance.set(0) WithdrawnBalance.set(0) EpochMaxRatioIncrease.set(10) EpochMinTime.set(86400) TrustedImporters.set([]) Epochs[0] = {"time": now, "staked": 0, "amt_per_hr": 64} # 1bn over 8 months meta["version"] = "0.4" meta["type"] = "liquidity_mining_smart_epoch" # staking || lp_farming meta["STAKING_TOKEN"] = "con_lusd_lst001" meta["YIELD_TOKEN"] = "currency" EmissionRatePerHour.set(64) # 1200000 RSWP per year = 10% of supply DevRewardPct.set(1/20) # The datetime from which you want to allow staking. StartTime.set(datetime.datetime(year=2023, month=2, day=28, hour=22)) # The datetime at which you want staking to finish. EndTime.set(datetime.datetime(year=2023, month=8, day=28, hour=22)) OpenForBusiness.set(True) @export def addStakingTokens(amount: float): user = ctx.caller deposit = Deposits[user] if deposit is False: return createNewDeposit(amount=amount, user_ctx="caller") else: return increaseDeposit(amount=amount, user_ctx="caller") def createNewDeposit( amount: float, user_ctx: str ): # user_ctx will either be "caller" or "signer" assert OpenForBusiness.get() == True, "This staking pool is not open right now." assert amount > 0, "You must stake something." user = ctx.caller # Take the staking tokens from the user's wallet DEX.transfer_liquidity_from( contract=LIQUIDITY_TOKEN, to=ctx.this, main_account=user, amount=amount ) # Update the Staked amount staked = StakedBalance.get() new_staked_amount = staked + amount StakedBalance.set(new_staked_amount) # Update the Epoch epoch_index = decideIncrementEpoch(new_staked_amount=new_staked_amount) # Create a record of the user's deposit Deposits[user] = { "starting_epoch": epoch_index, "time": now, "amount": amount, "user_yield": 0, } # mint vtoken equal to the deposit. mintVToken(amount=amount) return Deposits[user] @export def increaseDeposit( amount: float, user_ctx: str ): # user_ctx will either be "caller" or "signer" user = ctx.caller if user_ctx is "caller" else ctx.caller assert OpenForBusiness.get() == True, "This staking pool is not open right now." assert amount > 0, "You cannot stake a negative balance." deposit = Deposits[user] assert deposit is not False, "This user has no deposit to add to." # Take the staking tokens from the user's wallet DEX.transfer_liquidity_from( contract=LIQUIDITY_TOKEN, to=ctx.this, main_account=user, amount=amount ) withdrawn_yield = Withdrawals[user] user_yield = deposit["user_yield"] existing_stake = deposit["amount"] start_time = False user_yield += calculateYield(deposit=deposit) start_time = deposit["time"] existing_stake = deposit["amount"] total_deposit_amount = existing_stake + amount global_amount_staked = StakedBalance.get() new_global_staked = global_amount_staked + amount StakedBalance.set(new_global_staked) mintVToken(amount=amount) Deposits[user] = { "starting_epoch": decideIncrementEpoch(new_staked_amount=new_global_staked), "time": now, "amount": total_deposit_amount, "user_yield": user_yield, } return Deposits[user] @export def withdrawYield(amount: float): assert amount > 0, "You cannot harvest a negative balance" user = ctx.caller deposit = Deposits[user] assert deposit is not False, "You have no deposit to withdraw yield from." # Calculate how much yield is due per deposit account withdrawn_yield = Withdrawals[user] harvestable_yield = deposit["user_yield"] harvestable_yield += calculateYield(deposit=deposit) # Determine maximum amount of yield user can withdraw harvestable_yield -= withdrawn_yield yield_to_harvest = amount if amount < harvestable_yield else harvestable_yield assert yield_to_harvest > 0, "There is no yield to harvest right now :(" # Take % of Yield Tokens, send it to dev fund dev_share = yield_to_harvest * DevRewardPct.get() if dev_share > 0: YIELD_TOKEN.transfer(to=DevRewardWallet.get(), amount=dev_share) # DEX.transfer_liquidity(contract=LIQUIDITY_TOKEN, to=user, amount=amount) # Send remanding Yield Tokens to user user_share = yield_to_harvest - dev_share YIELD_TOKEN.transfer(to=user, amount=user_share) Withdrawals[user] = withdrawn_yield + yield_to_harvest new_withdrawn_amount = WithdrawnBalance.get() + yield_to_harvest WithdrawnBalance.set(new_withdrawn_amount) @export def withdrawTokensAndYield(): user = ctx.caller deposit = Deposits[user] assert deposit is not False, "You have no deposit to withdraw" # Calculate how much yield is due per deposit account withdrawn_yield = Withdrawals[user] stake_to_return = deposit["amount"] yield_to_harvest = deposit["user_yield"] yield_to_harvest += calculateYield(deposit=deposit) # Send Staking Tokens to user DEX.transfer_liquidity(contract=LIQUIDITY_TOKEN, to=user, amount=stake_to_return) # check that the user has yield left to harvest (this should never be negative, but let's check here just in case) yield_to_harvest -= withdrawn_yield if yield_to_harvest > 0: # Take % of Yield Tokens, send it to dev fund dev_share = yield_to_harvest * DevRewardPct.get() if dev_share > 0: YIELD_TOKEN.transfer(to=DevRewardWallet.get(), amount=dev_share) # Send remanding Yield Tokens to user user_share = yield_to_harvest - dev_share YIELD_TOKEN.transfer(to=user, amount=user_share) # Reset User's Deposits Deposits[user] = False # Reset User's Withdrawal Withdrawals[user] = 0 # Remove token amount from Staked new_staked_amount = StakedBalance.get() - stake_to_return returnAndBurnVToken(amount=stake_to_return) StakedBalance.set(new_staked_amount) new_withdrawn_amount = WithdrawnBalance.get() + yield_to_harvest WithdrawnBalance.set(new_withdrawn_amount) # Increment Epoch decideIncrementEpoch(new_staked_amount=new_staked_amount) # This runs over each of the items in the user's Deposit def calculateYield(deposit): starting_epoch_index = deposit.get("starting_epoch") start_time = deposit.get("time") amount = deposit.get("amount") current_epoch_index = getCurrentEpochIndex() this_epoch_index = starting_epoch_index y = 0 while this_epoch_index <= current_epoch_index: this_epoch = Epochs[this_epoch_index] next_epoch = Epochs[this_epoch_index + 1] delta = 0 if starting_epoch_index == current_epoch_index: delta = fitTimeToRange(now) - fitTimeToRange(start_time) elif this_epoch_index == starting_epoch_index: delta = fitTimeToRange(next_epoch["time"]) - fitTimeToRange(start_time) elif this_epoch_index == current_epoch_index: delta = fitTimeToRange(now) - fitTimeToRange(this_epoch["time"]) else: delta = fitTimeToRange(next_epoch["time"]) - fitTimeToRange( this_epoch["time"] ) pct_share_of_stake = 0 if amount is not 0 and this_epoch["staked"] is not 0: pct_share_of_stake = amount / this_epoch["staked"] # These two lines below were causing some problems, until I used the decimal method. get a python expert to review. emission_rate_per_hour = this_epoch["amt_per_hr"] global_yield_this_epoch = delta.seconds * getEmissionRatePerSecond( emission_rate_per_hour ) decimal_converter_var.set(pct_share_of_stake) pct_share_of_stake = decimal_converter_var.get() deposit_yield_this_epoch = global_yield_this_epoch * pct_share_of_stake y += deposit_yield_this_epoch this_epoch_index += 1 return y def fitTimeToRange(time: Any): if time < StartTime.get(): time = StartTime.get() elif time > EndTime.get(): time = EndTime.get() return time def getCurrentEpochIndex(): current_epoch_index = CurrentEpochIndex.get() return current_epoch_index def decideIncrementEpoch(new_staked_amount: float): epoch_index = getCurrentEpochIndex() this_epoch = Epochs[epoch_index] this_epoch_staked = this_epoch["staked"] delta = now - this_epoch["time"] delta_seconds = delta.seconds if delta.seconds > 0 else 0 if ( delta_seconds >= EpochMinTime.get() or this_epoch_staked is 0 or maxStakedChangeRatioExceeded( new_staked_amount=new_staked_amount, this_epoch_staked=this_epoch_staked ) ): epoch_index = incrementEpoch(new_staked_amount) return epoch_index def maxStakedChangeRatioExceeded(new_staked_amount: float, this_epoch_staked: float): if this_epoch_staked < 0.0001 : return true smaller = ( new_staked_amount if new_staked_amount <= this_epoch_staked else this_epoch_staked ) bigger = ( new_staked_amount if new_staked_amount >= this_epoch_staked else this_epoch_staked ) dif = bigger - smaller return (dif) / this_epoch_staked >= EpochMaxRatioIncrease.get() def incrementEpoch(new_staked_amount: float): current_epoch = getCurrentEpochIndex() new_epoch_idx = current_epoch + 1 CurrentEpochIndex.set(new_epoch_idx) Epochs[new_epoch_idx] = { "time": now, "staked": new_staked_amount, "amt_per_hr": Epochs[current_epoch]["amt_per_hr"], } return new_epoch_idx @export def changeAmountPerHour(amount_per_hour: float): assertOwner() current_epoch = getCurrentEpochIndex() new_epoch_idx = current_epoch + 1 CurrentEpochIndex.set(new_epoch_idx) setEmissionRatePerHour(amount=amount_per_hour) Epochs[new_epoch_idx] = { "time": now, "staked": StakedBalance.get(), "amt_per_hr": amount_per_hour, } @export def setEpochMinTime(min_seconds: float): assertOwner() assert min_seconds >= 0, "you must choose a positive value." EpochMinTime.set(min_seconds) @export def setEpochMaxRatioIncrease(ratio: float): assertOwner() assert ratio > 0, "must be a positive value" EpochMaxRatioIncrease.set(ratio) def getEmissionRatePerSecond(emission_rate_per_hour: float): emission_rate_per_minute = emission_rate_per_hour / 60 emission_rate_per_second = emission_rate_per_minute / 60 return emission_rate_per_second @export def setOwner(vk: str): assertOwner() Owner.set(vk) @export def setDevWallet(vk: str): assertOwner() DevRewardWallet.set(vk) @export def setDevRewardPct(amount: float): assertOwner() assert amount < 1 and amount >= 0, "Amount must be a value between 0 and 1" DevRewardPct.set(amount) @export def setEmissionRatePerHour(amount: float): assertOwner() EmissionRatePerHour.set(amount) @export def recoverYieldToken(amount: float): assertOwner() YIELD_TOKEN.transfer(amount=amount, to=Owner.get()) @export def allowStaking(is_open: bool): assertOwner() OpenForBusiness.set(is_open) @export def setStartTime(year: int, month: int, day: int, hour: int): assertOwner() time = datetime.datetime(year, month, day, hour) StartTime.set(time) @export def setEndTime(year: int, month: int, day: int, hour: int): assertOwner() time = datetime.datetime(year, month, day, hour) EndTime.set(time) def assertOwner(): assert Owner.get() == ctx.caller, "You must be the owner to call this function." # This is only to be called in emergencies - the user will forgo their yield when calling this FN. @export def emergencyReturnStake(): user = ctx.caller deposit = Deposits[user] assert Deposits[user] is not False, "This account has no deposits to return." stake_to_return = deposit["amount"] DEX.transfer_liquidity(contract=LIQUIDITY_TOKEN, to=user, amount=stake_to_return) returnAndBurnVToken(amount=stake_to_return) Deposits[user] = False Withdrawals[user] = 0 # Remove token amount from Staked new_staked_amount = StakedBalance.get() - stake_to_return StakedBalance.set(new_staked_amount) @export def exportYieldToForeignContract(): # TrustedImporters = Variable() # calling_contract = ctx.caller user = ctx.signer withdrawn_yield = Withdrawals[user] # verify that the contract is calling it is trusted. assert ( calling_contract in TrustedImporters.get() ), "The calling contract is not in the trusted list ! :(" transferred = sendYieldToTarget( amount=999999999999, target=calling_contract, user=user, # big number - transfers all yield. ) return transferred def sendYieldToTarget(amount: float, target: str, user: str): deposit = Deposits[user] assert deposit is not False, "You have no deposit to withdraw yield from." # Calculate how much yield is due per deposit account withdrawn_yield = Withdrawals[user] harvestable_yield = 0 harvestable_yield += calculateYield(deposit=deposit) # Determine maximum amount of yield user can withdraw harvestable_yield -= withdrawn_yield yield_to_harvest = amount if amount < harvestable_yield else harvestable_yield assert yield_to_harvest > 0, "There is no yield to harvest right now :(" # Take % of Yield Tokens, send it to dev fund dev_share = yield_to_harvest * DevRewardPct.get() if dev_share > 0: YIELD_TOKEN.transfer(to=DevRewardWallet.get(), amount=dev_share) # Send remanding Yield Tokens to user user_share = yield_to_harvest - dev_share YIELD_TOKEN.transfer(to=target, amount=user_share) Withdrawals[user] = withdrawn_yield + yield_to_harvest new_withdrawn_amount = WithdrawnBalance.get() + yield_to_harvest WithdrawnBalance.set(new_withdrawn_amount) return user_share @export def addToTrustedImporters(contract: str): assertOwner() trusted_importers = TrustedImporters.get() trusted_importers.append(contract) TrustedImporters.set(trusted_importers) @export def removeFromTrustedImporters(contract: str): assertOwner() trusted_importers = TrustedImporters.get() trusted_importers.remove(contract) TrustedImporters.set(trusted_importers) # VTOKEN METHODS @export def transfer(amount: float, to: str): assert amount > 0, "Cannot send negative balances!" assert balances[ctx.caller] >= amount, "Not enough VTOKENS to send!" balances[ctx.caller] -= amount balances[to] += amount @export def approve(amount: float, to: str): assert amount > 0, "Cannot send negative balances!" balances[ctx.caller, to] += amount @export def transfer_from(amount: float, to: str, main_account: str): assert amount > 0, "Cannot send negative balances!" assert ( balances[main_account, ctx.caller] >= amount ), "Not enough coins approved to send! You have {} and are trying to spend {}".format( balances[main_account, ctx.caller], amount ) assert balances[main_account] >= amount, "Not enough coins to send!" balances[main_account, ctx.caller] -= amount balances[main_account] -= amount balances[to] += amount def returnAndBurnVToken(amount: float): user = ctx.caller this = ctx.this assert ( balances[user] >= amount ), "Your VTOKEN balance is too low to unstake, recover your VTOKENS and try again." balances[user] -= amount def mintVToken(amount: float): user = ctx.signer balances[user] += amount
name con_liq_mining_lusd_tau

State Changes

Contract con_liq_mining_lusd_tau
Variable Owner
New Value 7c296eb80e379171f694a3c5be7640d16f300f09d731c99ac0a92f49c9c0c151
 
Contract con_liq_mining_lusd_tau
Variable DevRewardWallet
New Value 7c296eb80e379171f694a3c5be7640d16f300f09d731c99ac0a92f49c9c0c151
 
Contract con_liq_mining_lusd_tau
Variable CurrentEpochIndex
New Value 0
 
Contract con_liq_mining_lusd_tau
Variable StakedBalance
New Value 0
 
Contract con_liq_mining_lusd_tau
Variable WithdrawnBalance
New Value 0
 
Contract con_liq_mining_lusd_tau
Variable EpochMaxRatioIncrease
New Value 10
 
Contract con_liq_mining_lusd_tau
Variable EpochMinTime
New Value 86400
 
Contract con_liq_mining_lusd_tau
Variable TrustedImporters
New Value []
 
Contract con_liq_mining_lusd_tau
Variable Epochs
Key 0
New Value {"amt_per_hr":64,"staked":0,"time":{"__time__":[2023,2,12,21,18,54,0]}}
 
Contract con_liq_mining_lusd_tau
Variable meta
Key version
New Value 0.4
 
Contract con_liq_mining_lusd_tau
Variable meta
Key type
New Value liquidity_mining_smart_epoch
 
Contract con_liq_mining_lusd_tau
Variable meta
Key STAKING_TOKEN
New Value con_lusd_lst001
 
Contract con_liq_mining_lusd_tau
Variable meta
Key YIELD_TOKEN
New Value currency
 
Contract con_liq_mining_lusd_tau
Variable EmissionRatePerHour
New Value 64
 
Contract con_liq_mining_lusd_tau
Variable DevRewardPct
New Value 0.05
 
Contract con_liq_mining_lusd_tau
Variable StartTime
New Value 2023,2,28,22,0,0,0
 
Contract con_liq_mining_lusd_tau
Variable EndTime
New Value 2023,8,28,22,0,0,0
 
Contract con_liq_mining_lusd_tau
Variable OpenForBusiness
New Value true
 
Contract con_liq_mining_lusd_tau
Variable __code__
New Value import con_lusd_lst001 import currency import con_rocketswap_official_v1_1 DEX = con_rocketswap_official_v1_1 LIQUIDITY_TOKEN = 'con_lusd_lst001' YIELD_TOKEN = currency __Owner = Variable(contract='con_liq_mining_lusd_tau', name='Owner') __DevRewardWallet = Variable(contract='con_liq_mining_lusd_tau', name= 'DevRewardWallet') __EmissionRatePerHour = Variable(contract='con_liq_mining_lusd_tau', name= 'EmissionRatePerHour') __DevRewardPct = Variable(contract='con_liq_mining_lusd_tau', name= 'DevRewardPct') __StartTime = Variable(contract='con_liq_mining_lusd_tau', name='StartTime') __EndTime = Variable(contract='con_liq_mining_lusd_tau', name='EndTime') __OpenForBusiness = Variable(contract='con_liq_mining_lusd_tau', name= 'OpenForBusiness') __Deposits = Hash(default_value=False, contract='con_liq_mining_lusd_tau', name='Deposits') __Withdrawals = Hash(default_value=0, contract='con_liq_mining_lusd_tau', name='Withdrawals') __CurrentEpochIndex = Variable(contract='con_liq_mining_lusd_tau', name= 'CurrentEpochIndex') __Epochs = Hash(default_value=False, contract='con_liq_mining_lusd_tau', name='Epochs') __StakedBalance = Variable(contract='con_liq_mining_lusd_tau', name= 'StakedBalance') __WithdrawnBalance = Variable(contract='con_liq_mining_lusd_tau', name= 'WithdrawnBalance') __EpochMinTime = Variable(contract='con_liq_mining_lusd_tau', name= 'EpochMinTime') __EpochMaxRatioIncrease = Variable(contract='con_liq_mining_lusd_tau', name ='EpochMaxRatioIncrease') __meta = Hash(default_value=False, contract='con_liq_mining_lusd_tau', name ='meta') __decimal_converter_var = Variable(contract='con_liq_mining_lusd_tau', name ='decimal_converter_var') __TrustedImporters = Variable(contract='con_liq_mining_lusd_tau', name= 'TrustedImporters') __balances = Hash(default_value=0, contract='con_liq_mining_lusd_tau', name ='balances') def ____(): __Owner.set(ctx.caller) __DevRewardWallet.set(ctx.caller) __CurrentEpochIndex.set(0) __StakedBalance.set(0) __WithdrawnBalance.set(0) __EpochMaxRatioIncrease.set(10) __EpochMinTime.set(86400) __TrustedImporters.set([]) __Epochs[0] = {'time': now, 'staked': 0, 'amt_per_hr': 64} __meta['version'] = '0.4' __meta['type'] = 'liquidity_mining_smart_epoch' __meta['STAKING_TOKEN'] = 'con_lusd_lst001' __meta['YIELD_TOKEN'] = 'currency' __EmissionRatePerHour.set(64) __DevRewardPct.set(1 / 20) __StartTime.set(datetime.datetime(year=2023, month=2, day=28, hour=22)) __EndTime.set(datetime.datetime(year=2023, month=8, day=28, hour=22)) __OpenForBusiness.set(True) @__export('con_liq_mining_lusd_tau') def addStakingTokens(amount: float): user = ctx.caller deposit = __Deposits[user] if deposit is False: return __createNewDeposit(amount=amount, user_ctx='caller') else: return increaseDeposit(amount=amount, user_ctx='caller') def __createNewDeposit(amount: float, user_ctx: str): assert __OpenForBusiness.get( ) == True, 'This staking pool is not open right now.' assert amount > 0, 'You must stake something.' user = ctx.caller DEX.transfer_liquidity_from(contract=LIQUIDITY_TOKEN, to=ctx.this, main_account=user, amount=amount) staked = __StakedBalance.get() new_staked_amount = staked + amount __StakedBalance.set(new_staked_amount) epoch_index = __decideIncrementEpoch(new_staked_amount=new_staked_amount) __Deposits[user] = {'starting_epoch': epoch_index, 'time': now, 'amount': amount, 'user_yield': 0} __mintVToken(amount=amount) return __Deposits[user] @__export('con_liq_mining_lusd_tau') def increaseDeposit(amount: float, user_ctx: str): user = ctx.caller if user_ctx is 'caller' else ctx.caller assert __OpenForBusiness.get( ) == True, 'This staking pool is not open right now.' assert amount > 0, 'You cannot stake a negative balance.' deposit = __Deposits[user] assert deposit is not False, 'This user has no deposit to add to.' DEX.transfer_liquidity_from(contract=LIQUIDITY_TOKEN, to=ctx.this, main_account=user, amount=amount) withdrawn_yield = __Withdrawals[user] user_yield = deposit['user_yield'] existing_stake = deposit['amount'] start_time = False user_yield += __calculateYield(deposit=deposit) start_time = deposit['time'] existing_stake = deposit['amount'] total_deposit_amount = existing_stake + amount global_amount_staked = __StakedBalance.get() new_global_staked = global_amount_staked + amount __StakedBalance.set(new_global_staked) __mintVToken(amount=amount) __Deposits[user] = {'starting_epoch': __decideIncrementEpoch( new_staked_amount=new_global_staked), 'time': now, 'amount': total_deposit_amount, 'user_yield': user_yield} return __Deposits[user] @__export('con_liq_mining_lusd_tau') def withdrawYield(amount: float): assert amount > 0, 'You cannot harvest a negative balance' user = ctx.caller deposit = __Deposits[user] assert deposit is not False, 'You have no deposit to withdraw yield from.' withdrawn_yield = __Withdrawals[user] harvestable_yield = deposit['user_yield'] harvestable_yield += __calculateYield(deposit=deposit) harvestable_yield -= withdrawn_yield yield_to_harvest = (amount if amount < harvestable_yield else harvestable_yield) assert yield_to_harvest > 0, 'There is no yield to harvest right now :(' dev_share = yield_to_harvest * __DevRewardPct.get() if dev_share > 0: YIELD_TOKEN.transfer(to=__DevRewardWallet.get(), amount=dev_share) user_share = yield_to_harvest - dev_share YIELD_TOKEN.transfer(to=user, amount=user_share) __Withdrawals[user] = withdrawn_yield + yield_to_harvest new_withdrawn_amount = __WithdrawnBalance.get() + yield_to_harvest __WithdrawnBalance.set(new_withdrawn_amount) @__export('con_liq_mining_lusd_tau') def withdrawTokensAndYield(): user = ctx.caller deposit = __Deposits[user] assert deposit is not False, 'You have no deposit to withdraw' withdrawn_yield = __Withdrawals[user] stake_to_return = deposit['amount'] yield_to_harvest = deposit['user_yield'] yield_to_harvest += __calculateYield(deposit=deposit) DEX.transfer_liquidity(contract=LIQUIDITY_TOKEN, to=user, amount= stake_to_return) yield_to_harvest -= withdrawn_yield if yield_to_harvest > 0: dev_share = yield_to_harvest * __DevRewardPct.get() if dev_share > 0: YIELD_TOKEN.transfer(to=__DevRewardWallet.get(), amount=dev_share) user_share = yield_to_harvest - dev_share YIELD_TOKEN.transfer(to=user, amount=user_share) __Deposits[user] = False __Withdrawals[user] = 0 new_staked_amount = __StakedBalance.get() - stake_to_return __returnAndBurnVToken(amount=stake_to_return) __StakedBalance.set(new_staked_amount) new_withdrawn_amount = __WithdrawnBalance.get() + yield_to_harvest __WithdrawnBalance.set(new_withdrawn_amount) __decideIncrementEpoch(new_staked_amount=new_staked_amount) def __calculateYield(deposit): starting_epoch_index = deposit.get('starting_epoch') start_time = deposit.get('time') amount = deposit.get('amount') current_epoch_index = __getCurrentEpochIndex() this_epoch_index = starting_epoch_index y = 0 while this_epoch_index <= current_epoch_index: this_epoch = __Epochs[this_epoch_index] next_epoch = __Epochs[this_epoch_index + 1] delta = 0 if starting_epoch_index == current_epoch_index: delta = __fitTimeToRange(now) - __fitTimeToRange(start_time) elif this_epoch_index == starting_epoch_index: delta = __fitTimeToRange(next_epoch['time']) - __fitTimeToRange( start_time) elif this_epoch_index == current_epoch_index: delta = __fitTimeToRange(now) - __fitTimeToRange(this_epoch['time'] ) else: delta = __fitTimeToRange(next_epoch['time']) - __fitTimeToRange( this_epoch['time']) pct_share_of_stake = 0 if amount is not 0 and this_epoch['staked'] is not 0: pct_share_of_stake = amount / this_epoch['staked'] emission_rate_per_hour = this_epoch['amt_per_hr'] global_yield_this_epoch = delta.seconds * __getEmissionRatePerSecond( emission_rate_per_hour) __decimal_converter_var.set(pct_share_of_stake) pct_share_of_stake = __decimal_converter_var.get() deposit_yield_this_epoch = global_yield_this_epoch * pct_share_of_stake y += deposit_yield_this_epoch this_epoch_index += 1 return y def __fitTimeToRange(time: Any): if time < __StartTime.get(): time = __StartTime.get() elif time > __EndTime.get(): time = __EndTime.get() return time def __getCurrentEpochIndex(): current_epoch_index = __CurrentEpochIndex.get() return current_epoch_index def __decideIncrementEpoch(new_staked_amount: float): epoch_index = __getCurrentEpochIndex() this_epoch = __Epochs[epoch_index] this_epoch_staked = this_epoch['staked'] delta = now - this_epoch['time'] delta_seconds = delta.seconds if delta.seconds > 0 else 0 if delta_seconds >= __EpochMinTime.get( ) or this_epoch_staked is 0 or __maxStakedChangeRatioExceeded( new_staked_amount=new_staked_amount, this_epoch_staked= this_epoch_staked): epoch_index = __incrementEpoch(new_staked_amount) return epoch_index def __maxStakedChangeRatioExceeded(new_staked_amount: float, this_epoch_staked: float): if this_epoch_staked < decimal('0.0001'): return true smaller = (new_staked_amount if new_staked_amount <= this_epoch_staked else this_epoch_staked) bigger = (new_staked_amount if new_staked_amount >= this_epoch_staked else this_epoch_staked) dif = bigger - smaller return dif / this_epoch_staked >= __EpochMaxRatioIncrease.get() def __incrementEpoch(new_staked_amount: float): current_epoch = __getCurrentEpochIndex() new_epoch_idx = current_epoch + 1 __CurrentEpochIndex.set(new_epoch_idx) __Epochs[new_epoch_idx] = {'time': now, 'staked': new_staked_amount, 'amt_per_hr': __Epochs[current_epoch]['amt_per_hr']} return new_epoch_idx @__export('con_liq_mining_lusd_tau') def changeAmountPerHour(amount_per_hour: float): __assertOwner() current_epoch = __getCurrentEpochIndex() new_epoch_idx = current_epoch + 1 __CurrentEpochIndex.set(new_epoch_idx) setEmissionRatePerHour(amount=amount_per_hour) __Epochs[new_epoch_idx] = {'time': now, 'staked': __StakedBalance.get(), 'amt_per_hr': amount_per_hour} @__export('con_liq_mining_lusd_tau') def setEpochMinTime(min_seconds: float): __assertOwner() assert min_seconds >= 0, 'you must choose a positive value.' __EpochMinTime.set(min_seconds) @__export('con_liq_mining_lusd_tau') def setEpochMaxRatioIncrease(ratio: float): __assertOwner() assert ratio > 0, 'must be a positive value' __EpochMaxRatioIncrease.set(ratio) def __getEmissionRatePerSecond(emission_rate_per_hour: float): emission_rate_per_minute = emission_rate_per_hour / 60 emission_rate_per_second = emission_rate_per_minute / 60 return emission_rate_per_second @__export('con_liq_mining_lusd_tau') def setOwner(vk: str): __assertOwner() __Owner.set(vk) @__export('con_liq_mining_lusd_tau') def setDevWallet(vk: str): __assertOwner() __DevRewardWallet.set(vk) @__export('con_liq_mining_lusd_tau') def setDevRewardPct(amount: float): __assertOwner() assert amount < 1 and amount >= 0, 'Amount must be a value between 0 and 1' __DevRewardPct.set(amount) @__export('con_liq_mining_lusd_tau') def setEmissionRatePerHour(amount: float): __assertOwner() __EmissionRatePerHour.set(amount) @__export('con_liq_mining_lusd_tau') def recoverYieldToken(amount: float): __assertOwner() YIELD_TOKEN.transfer(amount=amount, to=__Owner.get()) @__export('con_liq_mining_lusd_tau') def allowStaking(is_open: bool): __assertOwner() __OpenForBusiness.set(is_open) @__export('con_liq_mining_lusd_tau') def setStartTime(year: int, month: int, day: int, hour: int): __assertOwner() time = datetime.datetime(year, month, day, hour) __StartTime.set(time) @__export('con_liq_mining_lusd_tau') def setEndTime(year: int, month: int, day: int, hour: int): __assertOwner() time = datetime.datetime(year, month, day, hour) __EndTime.set(time) def __assertOwner(): assert __Owner.get( ) == ctx.caller, 'You must be the owner to call this function.' @__export('con_liq_mining_lusd_tau') def emergencyReturnStake(): user = ctx.caller deposit = __Deposits[user] assert __Deposits[user ] is not False, 'This account has no deposits to return.' stake_to_return = deposit['amount'] DEX.transfer_liquidity(contract=LIQUIDITY_TOKEN, to=user, amount= stake_to_return) __returnAndBurnVToken(amount=stake_to_return) __Deposits[user] = False __Withdrawals[user] = 0 new_staked_amount = __StakedBalance.get() - stake_to_return __StakedBalance.set(new_staked_amount) @__export('con_liq_mining_lusd_tau') def exportYieldToForeignContract(): calling_contract = ctx.caller user = ctx.signer withdrawn_yield = __Withdrawals[user] assert calling_contract in __TrustedImporters.get( ), 'The calling contract is not in the trusted list ! :(' transferred = __sendYieldToTarget(amount=999999999999, target= calling_contract, user=user) return transferred def __sendYieldToTarget(amount: float, target: str, user: str): deposit = __Deposits[user] assert deposit is not False, 'You have no deposit to withdraw yield from.' withdrawn_yield = __Withdrawals[user] harvestable_yield = 0 harvestable_yield += __calculateYield(deposit=deposit) harvestable_yield -= withdrawn_yield yield_to_harvest = (amount if amount < harvestable_yield else harvestable_yield) assert yield_to_harvest > 0, 'There is no yield to harvest right now :(' dev_share = yield_to_harvest * __DevRewardPct.get() if dev_share > 0: YIELD_TOKEN.transfer(to=__DevRewardWallet.get(), amount=dev_share) user_share = yield_to_harvest - dev_share YIELD_TOKEN.transfer(to=target, amount=user_share) __Withdrawals[user] = withdrawn_yield + yield_to_harvest new_withdrawn_amount = __WithdrawnBalance.get() + yield_to_harvest __WithdrawnBalance.set(new_withdrawn_amount) return user_share @__export('con_liq_mining_lusd_tau') def addToTrustedImporters(contract: str): __assertOwner() trusted_importers = __TrustedImporters.get() trusted_importers.append(contract) __TrustedImporters.set(trusted_importers) @__export('con_liq_mining_lusd_tau') def removeFromTrustedImporters(contract: str): __assertOwner() trusted_importers = __TrustedImporters.get() trusted_importers.remove(contract) __TrustedImporters.set(trusted_importers) @__export('con_liq_mining_lusd_tau') def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' assert __balances[ctx.caller] >= amount, 'Not enough VTOKENS to send!' __balances[ctx.caller] -= amount __balances[to] += amount @__export('con_liq_mining_lusd_tau') def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' __balances[ctx.caller, to] += amount @__export('con_liq_mining_lusd_tau') def transfer_from(amount: float, to: str, main_account: str): assert amount > 0, 'Cannot send negative balances!' assert __balances[main_account, ctx.caller ] >= amount, 'Not enough coins approved to send! You have {} and are trying to spend {}'.format( __balances[main_account, ctx.caller], amount) assert __balances[main_account] >= amount, 'Not enough coins to send!' __balances[main_account, ctx.caller] -= amount __balances[main_account] -= amount __balances[to] += amount def __returnAndBurnVToken(amount: float): user = ctx.caller this = ctx.this assert __balances[user ] >= amount, 'Your VTOKEN balance is too low to unstake, recover your VTOKENS and try again.' __balances[user] -= amount def __mintVToken(amount: float): user = ctx.signer __balances[user] += amount
 
Contract con_liq_mining_lusd_tau
Variable __compiled__
New Value e3000000000000000000000000060000004000000073a4030000640064016c005a00640064016c015a01640064016c025a0265025a0364025a0465015a0565066403640464058d025a0765066403640664058d025a0865066403640764058d025a0965066403640864058d025a0a65066403640964058d025a0b65066403640a64058d025a0c65066403640b64058d025a0d650e640c6403640d640e8d035a0f650e64006403640f640e8d035a1065066403641064058d025a11650e640c64036411640e8d035a1265066403641264058d025a1365066403641364058d025a1465066403641464058d025a1565066403641564058d025a16650e640c64036416640e8d035a1765066403641764058d025a1865066403641864058d025a19650e640064036419640e8d035a1a641a641b84005a1b651c64038301651d641c9c01641d641e840483015a1e651d651f641f9c026420642184045a20651c64038301651d651f641f9c0264226423840483015a21651c64038301651d641c9c0164246425840483015a22651c6403830164266427840083015a236428642984005a246525642a9c01642b642c84045a26642d642e84005a27651d642f9c016430643184045a28651d651d64329c026433643484045a29651d642f9c016435643684045a2a651c64038301651d64379c0164386439840483015a2b651c64038301651d643a9c01643b643c840483015a2c651c64038301651d643d9c01643e643f840483015a2d651d64409c016441644284045a2e651c64038301651f64439c0164446445840483015a2f651c64038301651f64439c0164466447840483015a30651c64038301651d641c9c0164486449840483015a31651c64038301651d641c9c01644a644b840483015a32651c64038301651d641c9c01644c644d840483015a33651c640383016534644e9c01644f6450840483015a35651c64038301653665366536653664519c0464526453840483015a37651c64038301653665366536653664519c0464546455840483015a386456645784005a39651c6403830164586459840083015a3a651c64038301645a645b840083015a3b651d651f651f645c9c03645d645e84045a3c651c64038301651f645f9c0164606461840483015a3d651c64038301651f645f9c0164626463840483015a3e651c64038301651d651f64649c0264656466840483015a3f651c64038301651d651f64649c0264676468840483015a40651c64038301651d651f651f64699c03646a646b840483015a41651d641c9c01646c646d84045a42651d641c9c01646e646f84045a43640153002970e9000000004eda0f636f6e5f6c7573645f6c7374303031da17636f6e5f6c69715f6d696e696e675f6c7573645f746175da054f776e65722902da08636f6e7472616374da046e616d65da0f44657652657761726457616c6c6574da13456d697373696f6e52617465506572486f7572da0c446576526577617264506374da09537461727454696d65da07456e6454696d65da0f4f70656e466f72427573696e65737346da084465706f736974732903da0d64656661756c745f76616c756572050000007206000000da0b5769746864726177616c73da1143757272656e7445706f6368496e646578da0645706f636873da0d5374616b656442616c616e6365da1057697468647261776e42616c616e6365da0c45706f63684d696e54696d65da1545706f63684d6178526174696f496e637265617365da046d657461da15646563696d616c5f636f6e7665727465725f766172da1054727573746564496d706f7274657273da0862616c616e63657363000000000000000000000000070000004300000073d600000074006a0174026a038301010074046a0174026a038301010074056a0164018301010074066a0164018301010074076a0164018301010074086a0164028301010074096a01640383010100740a6a01670083010100740b6401640464059c03740c64013c006406740d64073c006408740d64093c00640a740d640b3c00640c740d640d3c00740e6a01640483010100740f6a0164178301010074106a0174116a11641064116412641364148d048301010074126a0174116a11641064156412641364148d048301010074136a016416830101006400530029184e7201000000e90a0000006980510100e9400000002903da0474696d65da067374616b6564da0a616d745f7065725f68727a03302e34da0776657273696f6eda1c6c69717569646974795f6d696e696e675f736d6172745f65706f6368da04747970657202000000da0d5354414b494e475f544f4b454eda0863757272656e6379da0b5949454c445f544f4b454ee901000000e91400000069e7070000e902000000e91c000000e9160000002904da0479656172da056d6f6e7468da03646179da04686f7572e90800000054679a9999999999a93f2914da075f5f4f776e6572da03736574da03637478da0663616c6c6572da115f5f44657652657761726457616c6c6574da135f5f43757272656e7445706f6368496e646578da0f5f5f5374616b656442616c616e6365da125f5f57697468647261776e42616c616e6365da175f5f45706f63684d6178526174696f496e637265617365da0e5f5f45706f63684d696e54696d65da125f5f54727573746564496d706f7274657273da036e6f77da085f5f45706f636873da065f5f6d657461da155f5f456d697373696f6e52617465506572486f7572da0e5f5f446576526577617264506374da0b5f5f537461727454696d65da086461746574696d65da095f5f456e6454696d65da115f5f4f70656e466f72427573696e657373a90072430000007243000000da00da045f5f5f5f2c000000732400000000010c010c010a010a010a010a010a010a01100108010801080108010a010a011801180172450000002901da06616d6f756e74630100000000000000030000000400000043000000733200000074006a017d0174027c0119007d027c0264016b08722274037c00640264038d02530074047c00640264038d0253006400530029044e46723200000029027246000000da08757365725f637478290572310000007232000000da0a5f5f4465706f73697473da125f5f6372656174654e65774465706f736974da0f696e6372656173654465706f73697429037246000000da0475736572da076465706f736974724300000072430000007244000000da106164645374616b696e67546f6b656e7341000000730a00000000020601080108010c02724d000000290272460000007247000000630200000000000000060000000600000043000000738600000074006a01830064016b02731474026402830182017c0064036b047324740264048301820174036a047d0274056a06740774036a087c027c0064058d04010074096a0183007d037c037c0017007d0474096a0a7c0483010100740b7c0464068d017d057c05740c7c00640364079c04740d7c023c00740e7c0064088d010100740d7c021900530029094e547a2854686973207374616b696e6720706f6f6c206973206e6f74206f70656e207269676874206e6f772e72010000007a19596f75206d757374207374616b6520736f6d657468696e672e29047205000000da02746fda0c6d61696e5f6163636f756e7472460000002901da116e65775f7374616b65645f616d6f756e742904da0e7374617274696e675f65706f6368721c0000007246000000da0a757365725f7969656c6429017246000000290f7242000000da03676574da0e417373657274696f6e4572726f7272310000007232000000da03444558da177472616e736665725f6c69717569646974795f66726f6dda0f4c49515549444954595f544f4b454eda047468697372350000007230000000da165f5f646563696465496e6372656d656e7445706f6368723a0000007248000000da0c5f5f6d696e7456546f6b656e290672460000007247000000724b000000721d0000007250000000da0b65706f63685f696e64657872430000007243000000724400000072490000004b000000731c000000000106010e01100106010a010a01080108010a010a0104010e010a0172490000006302000000000000000b000000060000004300000073ea0000007c0164016b08720e74006a016e0474006a017d0274026a03830064026b02732874046403830182017c0064046b047338740464058301820174057c0219007d037c0364066b097350740464078301820174066a07740874006a097c027c0064088d040100740a7c0219007d047c03640919007d057c03640a19007d0664067d077c05740b7c03640b8d0137007d057c03640c19007d077c03640a19007d067c067c0017007d08740c6a0383007d097c097c0017007d0a740c6a0d7c0a83010100740e7c00640d8d010100740f7c0a640e8d0174107c087c05640f9c0474057c023c0074057c021900530029104e7232000000547a2854686973207374616b696e6720706f6f6c206973206e6f74206f70656e207269676874206e6f772e72010000007a24596f752063616e6e6f74207374616b652061206e656761746976652062616c616e63652e467a2354686973207573657220686173206e6f206465706f73697420746f2061646420746f2e29047205000000724e000000724f0000007246000000725200000072460000002901724c000000721c000000290172460000002901725000000029047251000000721c0000007246000000725200000029117231000000723200000072420000007253000000725400000072480000007255000000725600000072570000007258000000da0d5f5f5769746864726177616c73da105f5f63616c63756c6174655969656c6472350000007230000000725a0000007259000000723a000000290b72460000007247000000724b000000724c000000da0f77697468647261776e5f7969656c647252000000da0e6578697374696e675f7374616b65da0a73746172745f74696d65da14746f74616c5f6465706f7369745f616d6f756e74da14676c6f62616c5f616d6f756e745f7374616b6564da116e65775f676c6f62616c5f7374616b6564724300000072430000007244000000724a0000005c00000073300000000002140106010e011001080110010a010a0108010801080104010e01080108010801080108010a010a01020108010e01724a00000063010000000000000009000000040000004300000073d60000007c0064016b047310740064028301820174016a027d0174037c0119007d027c0264036b09732e740064048301820174047c0119007d037c02640519007d047c0474057c0264068d0137007d047c047c0338007d047c007c046b0072607c006e027c047d057c0564016b04737474006407830182017c0574066a07830014007d067c0664016b04729a74086a09740a6a0783007c0664088d0201007c057c0618007d0774086a097c017c0764088d0201007c037c05170074047c013c00740b6a0783007c0517007d08740b6a0c7c08830101006400530029094e72010000007a25596f752063616e6e6f7420686172766573742061206e656761746976652062616c616e6365467a2b596f752068617665206e6f206465706f73697420746f207769746864726177207969656c642066726f6d2e72520000002901724c0000007a295468657265206973206e6f207969656c6420746f2068617276657374207269676874206e6f77203a282902724e0000007246000000290d7254000000723100000072320000007248000000725c000000725d000000723e00000072530000007224000000da087472616e7366657272330000007236000000723000000029097246000000724b000000724c000000725e000000da116861727665737461626c655f7969656c64da107969656c645f746f5f68617276657374da096465765f7368617265da0a757365725f7368617265da146e65775f77697468647261776e5f616d6f756e74724300000072430000007244000000da0d77697468647261775969656c6478000000732600000000021001060108011001080108010e0108010c01040110010c010801120108010e010c010c01726a00000063000000000000000009000000050000004300000073f400000074006a017d0074027c0019007d017c0164016b09731e740364028301820174047c0019007d027c01640319007d037c01640419007d047c0474057c0164058d0137007d0474066a0774087c007c0364068d0301007c047c0238007d047c0464076b0472a07c0474096a0a830014007d057c0564076b04728a740b6a0c740d6a0a83007c0564088d0201007c047c0518007d06740b6a0c7c007c0664088d020100640174027c003c00640774047c003c00740e6a0a83007c0318007d07740f7c0364098d010100740e6a107c078301010074116a0a83007c0417007d0874116a107c088301010074127c07640a8d01010064005300290b4e467a1f596f752068617665206e6f206465706f73697420746f207769746864726177724600000072520000002901724c00000029037205000000724e000000724600000072010000002902724e0000007246000000290172460000002901725000000029137231000000723200000072480000007254000000725c000000725d0000007255000000da127472616e736665725f6c69717569646974797257000000723e00000072530000007224000000726400000072330000007235000000da155f5f72657475726e416e644275726e56546f6b656e7230000000723600000072590000002909724b000000724c000000725e000000da0f7374616b655f746f5f72657475726e72660000007267000000726800000072500000007269000000724300000072430000007244000000da167769746864726177546f6b656e73416e645969656c648f000000733000000000020601080110010801080108010e0108010801080108010c010801120108010e01080108010c010a010a010c010a01726e0000006301000000000000000e0000000400000043000000732a0100007c006a00640183017d017c006a00640283017d027c006a00640383017d03740183007d047c017d0564047d0678f87c057c046b019001722474027c0519007d0774027c056405170019007d0864047d097c017c046b02726a74037404830174037c02830118007d096e547c057c016b02728874037c0864021900830174037c02830118007d096e367c057c046b0272a674037404830174037c0764021900830118007d096e1874037c0864021900830174037c0764021900830118007d0964047d0a7c0364046b0972e27c076406190064046b0972e27c037c07640619001b007d0a7c07640719007d0b7c096a0574067c0b830114007d0c74076a087c0a8301010074076a0083007d0a7c0c7c0a14007d0d7c067c0d37007d067c05640537007d05712e57007c06530029084e7251000000721c000000724600000072010000007225000000721d000000721e00000029097253000000da165f5f67657443757272656e7445706f6368496e646578723b000000da105f5f66697454696d65546f52616e6765723a000000da077365636f6e6473da1a5f5f676574456d697373696f6e526174655065725365636f6e64da175f5f646563696d616c5f636f6e7665727465725f7661727230000000290e724c000000da147374617274696e675f65706f63685f696e64657872600000007246000000da1363757272656e745f65706f63685f696e646578da10746869735f65706f63685f696e646578da0179da0a746869735f65706f6368da0a6e6578745f65706f6368da0564656c7461da127063745f73686172655f6f665f7374616b65da16656d697373696f6e5f726174655f7065725f686f7572da17676c6f62616c5f7969656c645f746869735f65706f6368da186465706f7369745f7969656c645f746869735f65706f6368724300000072430000007244000000725d000000ab000000733e00000000010a010a010a010601040104010c0108010c0104010801120108010c010a01080116030c010c01040114010c010801060108010a010801080108010c01725d0000002901721c000000630100000000000000010000000200000043000000732e0000007c0074006a0183006b00721674006a0183007d006e147c0074026a0183006b04722a74026a0183007d007c00530029014e2903723f000000725300000072410000002901721c0000007243000000724300000072440000007270000000cf000000730a00000000010c010a010c0108017270000000630000000000000000010000000100000043000000730c00000074006a0183007d007c00530029014e29027234000000725300000029017275000000724300000072430000007244000000726f000000d7000000730400000000010801726f000000290172500000006301000000000000000600000004000000430000007362000000740083007d0174017c0119007d027c02640119007d0374027c026402190018007d047c046a0364036b0472327c046a036e0264037d057c0574046a0583006b0573567c0364036b08735674067c007c0364048d02725e74077c0083017d017c01530029054e721d000000721c000000720100000029027250000000da11746869735f65706f63685f7374616b65642908726f000000723b000000723a000000727100000072380000007253000000da1e5f5f6d61785374616b65644368616e6765526174696f4578636565646564da105f5f696e6372656d656e7445706f636829067250000000725b0000007278000000727f000000727a000000da0d64656c74615f7365636f6e64737243000000724300000072440000007259000000dc000000731600000000010601080108010c0114010c010a01020108010801725900000029027250000000727f00000063020000000000000005000000030000004300000073480000007c017400640183016b007210740153007c007c016b01721c7c006e027c017d027c007c016b05722c7c006e027c017d037c037c0218007d047c047c011b0074026a0383006b05530029024e7a06302e303030312904da07646563696d616cda04747275657237000000725300000029057250000000727f000000da07736d616c6c6572da06626967676572da036469667243000000724300000072440000007280000000ea000000731000000000020c0104010c0104010c010401080172800000006301000000000000000300000004000000430000007334000000740083007d017c01640117007d0274016a027c028301010074037c0074047c0119006402190064039c0374047c023c007c02530029044e7225000000721e0000002903721c000000721d000000721e0000002905726f00000072340000007230000000723a000000723b00000029037250000000da0d63757272656e745f65706f6368da0d6e65775f65706f63685f6964787243000000724300000072440000007281000000f6000000730c0000000001060108010a010401140172810000002901da0f616d6f756e745f7065725f686f75726301000000000000000300000004000000430000007340000000740083000100740183007d017c01640117007d0274026a037c028301010074047c0064028d010100740574066a0783007c0064039c0374087c023c006400530029044e7225000000290172460000002903721c000000721d000000721e0000002909da0d5f5f6173736572744f776e6572726f00000072340000007230000000da16736574456d697373696f6e52617465506572486f7572723a00000072350000007253000000723b0000002903728a00000072880000007289000000724300000072430000007244000000da136368616e6765416d6f756e74506572486f7572ff000000730e00000000020601060108010a010a010801728d0000002901da0b6d696e5f7365636f6e647363010000000000000001000000020000004300000073240000007400830001007c0064016b057316740164028301820174026a037c00830101006400530029034e72010000007a21796f75206d7573742063686f6f7365206120706f7369746976652076616c75652e2904728b0000007254000000723800000072300000002901728e000000724300000072430000007244000000da0f73657445706f63684d696e54696d650a0100007306000000000206011001728f0000002901da05726174696f63010000000000000001000000020000004300000073240000007400830001007c0064016b047316740164028301820174026a037c00830101006400530029034e72010000007a186d757374206265206120706f7369746976652076616c75652904728b00000072540000007237000000723000000029017290000000724300000072430000007244000000da1873657445706f63684d6178526174696f496e63726561736511010000730600000000020601100172910000002901727c00000063010000000000000003000000020000004300000073140000007c0064011b007d017c0164011b007d027c02530029024ee93c00000072430000002903727c000000da18656d697373696f6e5f726174655f7065725f6d696e757465da18656d697373696f6e5f726174655f7065725f7365636f6e64724300000072430000007244000000727200000018010000730600000000010801080172720000002901da02766b630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e2903728b000000722f000000723000000029017295000000724300000072430000007244000000da087365744f776e65721e0100007304000000000206017296000000630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e2903728b0000007233000000723000000029017295000000724300000072430000007244000000da0c73657444657657616c6c6574240100007304000000000206017297000000630100000000000000010000000200000043000000732c0000007400830001007c0064016b0072167c0064026b05731e740164038301820174026a037c00830101006400530029044e722500000072010000007a26416d6f756e74206d75737420626520612076616c7565206265747765656e203020616e6420312904728b0000007254000000723e000000723000000029017246000000724300000072430000007244000000da0f7365744465765265776172645063742a01000073060000000002060118017298000000630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e2903728b000000723d000000723000000029017246000000724300000072430000007244000000728c00000031010000730400000000020601728c000000630100000000000000010000000400000043000000731c00000074008300010074016a027c0074036a04830064018d0201006400530029024e29027246000000724e0000002905728b00000072240000007264000000722f000000725300000029017246000000724300000072430000007244000000da117265636f7665725969656c64546f6b656e3701000073040000000002060172990000002901da0769735f6f70656e630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e2903728b000000724200000072300000002901729a000000724300000072430000007244000000da0c616c6c6f775374616b696e673d010000730400000000020601729b0000002904722a000000722b000000722c000000722d000000630400000000000000050000000500000043000000732400000074008300010074016a017c007c017c027c0383047d0474026a037c04830101006400530029014e2904728b0000007240000000723f00000072300000002905722a000000722b000000722c000000722d000000721c000000724300000072430000007244000000da0c736574537461727454696d65430100007306000000000206011001729c000000630400000000000000050000000500000043000000732400000074008300010074016a017c007c017c027c0383047d0474026a037c04830101006400530029014e2904728b0000007240000000724100000072300000002905722a000000722b000000722c000000722d000000721c000000724300000072430000007244000000da0a736574456e6454696d654a0100007306000000000206011001729d000000630000000000000000000000000200000043000000731a00000074006a01830074026a036b02731674046401830182016400530029024e7a2c596f75206d75737420626520746865206f776e657220746f2063616c6c20746869732066756e6374696f6e2e2905722f00000072530000007231000000723200000072540000007243000000724300000072430000007244000000728b00000051010000730400000000010601728b000000630000000000000000040000000500000043000000736e00000074006a017d0074027c0019007d0174027c00190064016b09732274036402830182017c01640319007d0274046a0574067c007c0264048d03010074077c0264058d010100640174027c003c00640674087c003c0074096a0a83007c0218007d0374096a0b7c03830101006400530029074e467a2754686973206163636f756e7420686173206e6f206465706f7369747320746f2072657475726e2e724600000029037205000000724e0000007246000000290172460000007201000000290c72310000007232000000724800000072540000007255000000726b0000007257000000726c000000725c0000007235000000725300000072300000002904724b000000724c000000726d0000007250000000724300000072430000007244000000da14656d657267656e637952657475726e5374616b6556010000731800000000020601080106010e010801080108010a01080108010c01729e000000630000000000000000040000000500000043000000733a00000074006a017d0074006a027d0174037c0119007d027c0074046a0583006b0673287406640183018201740764027c007c0164038d037d037c03530029044e7a345468652063616c6c696e6720636f6e7472616374206973206e6f7420696e207468652074727573746564206c6973742021203a286c03000000ff0f4a29a30329037246000000da06746172676574724b000000290872310000007232000000da067369676e6572725c000000723900000072530000007254000000da135f5f73656e645969656c64546f5461726765742904da1063616c6c696e675f636f6e7472616374724b000000725e000000da0b7472616e73666572726564724300000072430000007244000000da1c6578706f72745969656c64546f466f726569676e436f6e747261637466010000731000000000020601060108010e01060104010a0172a400000029037246000000729f000000724b0000006303000000000000000a000000040000004300000073bc00000074007c0219007d037c0364016b097318740164028301820174027c0219007d0464037d057c0574037c0364048d0137007d057c057c0438007d057c007c056b0072467c006e027c057d067c0664036b04735a74016405830182017c0674046a05830014007d077c0764036b04728074066a0774086a0583007c0764068d0201007c067c0718007d0874066a077c017c0864068d0201007c047c06170074027c023c0074096a0583007c0617007d0974096a0a7c09830101007c08530029074e467a2b596f752068617665206e6f206465706f73697420746f207769746864726177207969656c642066726f6d2e72010000002901724c0000007a295468657265206973206e6f207969656c6420746f2068617276657374207269676874206e6f77203a282902724e0000007246000000290b72480000007254000000725c000000725d000000723e000000725300000072240000007264000000723300000072360000007230000000290a7246000000729f000000724b000000724c000000725e0000007265000000726600000072670000007268000000726900000072430000007243000000724400000072a1000000720100007324000000000108011001080104010e0108010c01040110010c010801120108010e010c010c010a0172a100000029017205000000630100000000000000020000000200000043000000732600000074008300010074016a0283007d017c016a037c008301010074016a047c01830101006400530029014e2905728b00000072390000007253000000da06617070656e64723000000029027205000000da11747275737465645f696d706f7274657273724300000072430000007244000000da15616464546f54727573746564496d706f72746572738701000073080000000002060108010a0172a7000000630100000000000000020000000200000043000000732600000074008300010074016a0283007d017c016a037c008301010074016a047c01830101006400530029014e2905728b00000072390000007253000000da0672656d6f766572300000002902720500000072a6000000724300000072430000007244000000da1a72656d6f766546726f6d54727573746564496d706f72746572738f01000073080000000002060108010a0172a900000029027246000000724e000000630200000000000000020000000400000043000000734c0000007c0064016b0473107400640283018201740174026a0319007c006b0573267400640383018201740174026a03050019007c00380003003c0074017c01050019007c00370003003c006400530029044e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a1b4e6f7420656e6f7567682056544f4b454e5320746f2073656e642129047254000000da0a5f5f62616c616e6365737231000000723200000029027246000000724e000000724300000072430000007244000000726400000097010000730800000000021001160112017264000000630200000000000000020000000400000043000000732a0000007c0064016b0473107400640283018201740174026a037c016602050019007c00370003003c006400530029034e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573212904725400000072aa0000007231000000723200000029027246000000724e000000724300000072430000007244000000da07617070726f76659f01000073040000000002100172ab00000029037246000000724e000000724f000000630300000000000000030000000500000043000000738a0000007c0064016b047310740064028301820174017c0274026a03660219007c006b05733c740064036a0474017c0274026a03660219007c0083028301820174017c0219007c006b057350740064048301820174017c0274026a036602050019007c00380003003c0074017c02050019007c00380003003c0074017c01050019007c00370003003c006400530029054e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a494e6f7420656e6f75676820636f696e7320617070726f76656420746f2073656e642120596f752068617665207b7d20616e642061726520747279696e6720746f207370656e64207b7d7a194e6f7420656e6f75676820636f696e7320746f2073656e64212905725400000072aa00000072310000007232000000da06666f726d617429037246000000724e000000724f000000724300000072430000007244000000da0d7472616e736665725f66726f6da50100007310000000000210010c010c01140114011601100172ad000000630100000000000000030000000400000043000000733400000074006a017d0174006a027d0274037c0119007c006b057320740464018301820174037c01050019007c00380003003c006400530029024e7a4e596f75722056544f4b454e2062616c616e636520697320746f6f206c6f7720746f20756e7374616b652c207265636f76657220796f75722056544f4b454e5320616e642074727920616761696e2e290572310000007232000000725800000072aa000000725400000029037246000000724b0000007258000000724300000072430000007244000000726c000000b1010000730a00000000010601060106010e01726c000000630100000000000000020000000400000043000000731a00000074006a017d0174027c01050019007c00370003003c006400530029014e2903723100000072a000000072aa00000029027246000000724b000000724300000072430000007244000000725a000000b9010000730400000000010601725a000000294472020000007223000000da1c636f6e5f726f636b6574737761705f6f6666696369616c5f76315f31725500000072570000007224000000da085661726961626c65722f0000007233000000723d000000723e000000723f00000072410000007242000000da04486173687248000000725c0000007234000000723b0000007235000000723600000072380000007237000000723c0000007273000000723900000072aa0000007245000000da085f5f6578706f7274da05666c6f6174724d000000da037374727249000000724a000000726a000000726e000000725d000000da03416e797270000000726f000000725900000072800000007281000000728d000000728f00000072910000007272000000729600000072970000007298000000728c0000007299000000da04626f6f6c729b000000da03696e74729c000000729d000000728b000000729e00000072a400000072a100000072a700000072a9000000726400000072ab00000072ad000000726c000000725a0000007243000000724300000072430000007244000000da083c6d6f64756c653e0100000073be0000000801080108010401040104010c010401080104010801040108010c010c010401080106010801060108010401080106010801040108010401080104010801040108010601080104010801040108010601080308150601100910110601121b06011016101c08240e0808050e0e02010e0b0e090601100a06011006060110060e06060110050601100506011006060110050601100506011005060116060601160608051010100c1215060110070601100706011207060112050601140b0e08
 
Contract con_liq_mining_lusd_tau
Variable __owner__
New Value null
 
Contract con_liq_mining_lusd_tau
Variable __submitted__
New Value 2023,2,12,21,18,54,0
 
Contract con_liq_mining_lusd_tau
Variable __developer__
New Value 7c296eb80e379171f694a3c5be7640d16f300f09d731c99ac0a92f49c9c0c151
 
Contract currency
Variable balances
Key 7c296eb80e379171f694a3c5be7640d16f300f09d731c99ac0a92f49c9c0c151
New Value 380336.736760868469213008427977103335