Transaction #382350

Hash e9d0c5f36a63a123dd4f9f43a6c9352840557e9ab1b4b8d25a9cd85f30e3feda
Status Success
Timestamp 73 days ago - 11/15/2021, 6:09:27 AM UTC+0
Block 370817
Stamps Used 981
Burned Fee 0.05804734 TAU
From fb8721c4f736b22075f08f1161f24522132522311ac4f1e19730e3298bb8a40e 
Contract Name submission
Function Name submit_contract

Additional Info
SubBlock Number 0
Nonce 1373
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature 653195688de8e727ea1f6ecdc883b412ee27b3b80b623decf6d3fbc71e0b277737a8ca6ffbd7c6e4c595158a30fa5ff778f747252276bc379cc9f4155e02b805
Stamps Supplied 1000
Stamps per TAU 169

Kwargs

code tad_contract = importlib.import_module('con_rubix_test_dec_tad') vaults = Hash(default_value=0) stability_rate = Hash(default_value=1) cdp = Hash(default_value=0) stability_pool = Hash(default_value=0) @construct def seed(): vaults['OWNER'] = ctx.caller cdp['current_value'] = 0 vaults['list'] = [0] vaults['current_number'] = 1 vaults['oracle'] = 'oracle' # dummy for testing purposes vaults[0, 'collateral_type'] = 'currency' vaults[0, 'minimum_collateralization'] = 1.5 vaults[0, 'minimum_auction_time'] = 259200 vaults[0, 'cap'] = 100000 vaults[0, 'weight'] = 10 stability_rate[0] = 1.1 # dummy for testing purposes @export def get_timestamp(): # https://developers.lamden.io/docs/smart-contracts/datetime-module/ td = now - datetime.datetime(1970, 1, 1, 0, 0, 0) return td.seconds @export def create_vault(vault_type: int, amount_of_tad: float, amount_of_collateral: float): assert vault_type in vaults['list'], 'Not an available contract!' collateral = importlib.import_module( vaults[vault_type, 'collateral_type']) # TODO: Add interface enforcement oracle = importlib.import_module(vaults['oracle']) price = oracle.get_price(vault_type) assert amount_of_tad > 0, 'Amount of tad must be positive!' assert vaults[vault_type, 'total'] + amount_of_tad <= vaults[vault_type, 'cap'], 'The allowance is not sufficent!' assert (amount_of_collateral * price) / \ amount_of_tad >= vaults[vault_type, 'minimum_collateralization'], 'Not enough collateral!' cdp_number = cdp['current_value'] cdp['current_value'] += 1 cdp[cdp_number, 'owner'] = ctx.caller cdp[cdp_number, 'open'] = True cdp[cdp_number, 'collateral_type'] = vaults[vault_type, 'collateral_type'] cdp[cdp_number, 'vault_type'] = vault_type cdp[cdp_number, 'tad'] = amount_of_tad cdp[cdp_number, 'collateral_amount'] = amount_of_collateral cdp[cdp_number, 'time'] = get_timestamp() collateral.approve(amount=amount_of_collateral, to=ctx.this) collateral.transfer_from(amount=amount_of_collateral, to=ctx.this, main_account=ctx.caller) tad_contract.mint(amount=amount_of_tad) tad_contract.transfer(amount=amount_of_tad, to=ctx.caller) vaults[vault_type, 'issued'] += amount_of_tad vaults[vault_type, 'total'] += amount_of_tad return cdp_number @export def close_vault(cdp_number: int): assert cdp[cdp_number, 'owner'] == ctx.caller, 'Not the owner!' assert cdp[cdp_number, 'open'] == True, 'Vault has already been closed!' collateral = importlib.import_module( vaults[cdp[cdp_number, 'vault_type'], 'collateral_type']) stability_ratio = vaults[cdp[cdp_number, 'vault_type'], 'total'] / \ vaults[cdp[cdp_number, 'vault_type'], 'issued'] redemption_cost = cdp[cdp_number, 'tad'] * stability_ratio fee = redemption_cost * \ (stability_rate[cdp[cdp_number, 'vault_type']] ** (get_timestamp() - cdp[cdp_number, 'time'])) - redemption_cost amount = redemption_cost + fee tad_contract.transfer_from( amount=amount, to=ctx.this, main_account=ctx.caller) tad_contract.burn(amount=redemption_cost) stability_pool[cdp[cdp_number, 'vault_type']] += fee vaults[cdp[cdp_number, 'vault_type'], 'issued'] -= cdp[cdp_number, 'tad'] # This is only different if the ratio is different vaults[cdp[cdp_number, 'vault_type'], 'total'] -= redemption_cost cdp[cdp_number, 'open'] = False # Return collateral collateral.transfer( amount=cdp[cdp_number, 'collateral_amount'], to=ctx.caller) return amount @export def fast_force_close_vault(cdp_number: int): assert_insufficent_collateral(cdp_number=cdp_number) assert cdp[cdp_number, 'open'] is True, 'Vault has already been closed!' collateral = importlib.import_module( vaults[cdp[cdp_number, 'vault_type'], 'collateral_type']) oracle = importlib.import_module(vaults['oracle']) stability_ratio = vaults[cdp[cdp_number, 'vault_type'], 'total'] / vaults[cdp[cdp_number, 'vault_type'], 'issued'] redemption_cost_without_fee = cdp[cdp_number, 'tad'] * stability_ratio redemption_cost = redemption_cost_without_fee * 1.1 fee = redemption_cost_without_fee * \ (stability_rate[cdp[cdp_number, 'vault_type']] ** (get_timestamp() - cdp[cdp_number, 'time'])) - redemption_cost_without_fee redemption_cost += fee amount_of_collateral = cdp[cdp_number, 'collateral_amount'] collateral_type = cdp[cdp_number, 'collateral_type'] price = oracle.get_price(cdp[cdp_number, 'vault_type']) collateral_percent = (amount_of_collateral * price) / \ redemption_cost if collateral_percent >= 1.03: tad_contract.transfer_from( amount=redemption_cost, to=ctx.this, main_account=ctx.caller) tad_contract.burn(amount=redemption_cost_without_fee) amount = (redemption_cost * 1.03) / price # Double check this math is correct collateral.transfer(amount=amount, to=ctx.caller) collateral.transfer(amount=amount_of_collateral - amount, to=cdp[cdp_number, 'owner']) vaults[cdp[cdp_number, 'vault_type'], 'issued'] -= cdp[cdp_number, 'tad'] vaults[cdp[cdp_number, 'vault_type'], 'total'] -= redemption_cost_without_fee else: redemption_cost, redemption_cost_without_fee = redemption_cost * \ (collateral_percent / 1.03), redemption_cost_without_fee * \ (collateral_percent / 1.03) tad_contract.transfer_from( amount=redemption_cost, to=ctx.this, main_account=ctx.caller) tad_contract.burn(amount=redemption_cost_without_fee) amount = cdp[cdp_number, 'collateral_amount'] # TODO: Add an assert later collateral.transfer(amount=amount, to=ctx.caller) vaults[cdp[cdp_number, 'vault_type'], 'issued'] -= cdp[cdp_number, 'tad'] vaults[cdp[cdp_number, 'vault_type'], 'total'] -= redemption_cost_without_fee stability_pool[cdp[cdp_number, 'vault_type'] ] += redemption_cost - redemption_cost_without_fee cdp[cdp_number, 'open'] = False return amount @export def open_force_close_auction(cdp_number: int): assert_insufficent_collateral(cdp_number=cdp_number) assert cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert cdp[cdp_number, 'auction', 'open'] is not True, 'Auction is already taking place!' # Probably a redundant check, can be removed assert cdp[cdp_number, 'open'] is True, 'Vault has already been closed!' # This contract may only be bid on, and not closed cdp[cdp_number, 'open'] = False cdp[cdp_number, 'auction', 'open'] = True cdp[cdp_number, 'auction', 'highest_bidder'] = ctx.caller cdp[cdp_number, 'auction', 'top_bid'] = 0.0 cdp[cdp_number, 'auction', 'time'] = get_timestamp() return True @export def bid_on_force_close(cdp_number: int, amount: float): assert cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert cdp[cdp_number, 'auction', 'open'] is True, 'Auction is not open!' assert amount > cdp[cdp_number, 'auction', 'top_bid'], 'There is already a higher bid!' if cdp[cdp_number, 'auction', ctx.caller, 'bid'] is not None: tad_contract.transfer_from( amount=amount - cdp[cdp_number, 'auction', ctx.caller, 'bid'], to=ctx.this, main_account=ctx.caller) else: tad_contract.transfer_from( amount=amount, to=ctx.this, main_account=ctx.caller) cdp[cdp_number, 'auction', 'highest_bidder'] = ctx.caller cdp[cdp_number, 'auction', 'top_bid'] = amount cdp[cdp_number, 'auction', ctx.caller, 'bid'] = amount return True @export def settle_force_close(cdp_number: int): assert cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert cdp[cdp_number, 'auction', 'open'] is True, 'Auction is not open!' assert get_timestamp() - cdp[cdp_number, 'auction', 'time'] > vaults[cdp[cdp_number, 'vault_type'], 'minimum_auction_time'], 'Auction is still open!' collateral = importlib.import_module( vaults[cdp[cdp_number, 'vault_type'], 'collateral_type']) cdp[cdp_number, 'auction', 'settled'] = True cdp[cdp_number, 'open'] = False cdp[cdp_number, 'auction', 'open'] = False cdp[cdp_number, 'auction', cdp[cdp_number, 'auction', 'highest_bidder'], 'bid'] = 0 fee = cdp[cdp_number, 'auction', 'top_bid'] * 0.1 collateral.transfer_from( amount=cdp[cdp_number, 'collateral_amount'], to=ctx.caller, main_account=ctx.this) tad_contract.burn(amount=cdp[cdp_number, 'auction', 'top_bid'] - fee) stability_pool[cdp[cdp_number, 'vault_type']] += fee vaults[cdp[cdp_number, 'vault_type'], 'issued'] -= cdp[cdp_number, 'tad'] vaults[cdp[cdp_number, 'vault_type'], 'total'] -= cdp[cdp_number, 'auction', 'top_bid'] - fee # Fee is not burned, so it does not count return cdp[cdp_number, 'auction', 'highest_bidder'], cdp[cdp_number, 'auction', 'top_bid'] @export def claim_unwon_bid(cdp_number: int): assert cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert cdp[cdp_number, 'auction', 'settled'] is True, 'Auction is still open or not opened!' tad_contract.transfer( to=ctx.caller, amount=cdp[cdp_number, 'auction', ctx.caller, 'bid']) cdp[cdp_number, 'auction', ctx.caller, 'bid'] = 0 return True @export def sync_stability_pool(vault_type: int): assert vault_type in vaults['list'], 'Not an available contract!' default_amount = vaults[vault_type, 'total'] - vaults[vault_type, 'issued'] if default_amount > stability_pool[vault_type]: vaults[vault_type, 'issued'] += stability_pool[vault_type] stability_pool[vault_type] = 0 # Return new ratio return vaults[vault_type, 'issued'] / vaults[vault_type, 'total'] else: # This also applies to negatives and zeros, although those situations are unlikely vaults[vault_type, 'issued'] = vaults[vault_type, 'total'] stability_pool[vault_type] -= default_amount return 1.0 # The ratio is perfectly equal @export def export_rewards(vault_type: int, amount: float): # TODO: Change DSR to something else in future assert vaults[vault_type, 'DSR', 'owner'] == ctx.caller, 'Not the owner!' assert stability_pool[vault_type] >= amount, 'Not enough tad in stability pool to export!' stability_pool[vault_type] -= amount tad_contract.transfer(to=ctx.caller, amount=amount) return True @export def mint_rewards(amount: float): # TODO: MAKE SURE MATH CHECKS OUT # TODO: Change DSR to something else in future assert vaults['mint', 'DSR', 'owner'] == ctx.caller, 'Not the owner!' assert amount > 0, 'Cannot mint negative amount!' tad_contract.mint(amount=amount) tad_contract.transfer(to=ctx.caller, amount=amount) total_weight = 0 total_funds = amount for vault_type in vaults['list']: total_weight += vaults[vault_type, 'weight'] # To make the contract more robust, and to prevent floating point errors for vault_type in vaults['list']: funds_transferred = ( vaults[vault_type, 'weight'] / total_weight) * total_funds vaults[vault_type, 'total'] += funds_transferred total_funds -= funds_transferred total_weight -= vaults[vault_type, 'weight'] return True @export def sync_burn(vault_type: int, amount: float): assert vault_type in vaults['list'], 'Not an available contract!' tad_contract.transfer_from( to=ctx.this, amount=amount, main_account=ctx.caller) tad_contract.burn(amount=amount) vaults[vault_type, 'total'] -= amount return vaults[vault_type, 'total'] @export def add_vault(collateral_type: str, collateral_amount: float, auction_time: float, max_minted: float, s_rate: float, weight: float): assert vaults['OWNER'] == ctx.caller, 'Not the owner!' vault_number = vaults['current_number'] vaults['list'].append(vault_number) vaults['current_number'] += 1 vaults[vault_number, 'collateral_type'] = collateral_type vaults[vault_number, 'minimum_collateralization'] = collateral_amount vaults[vault_number, 'minimum_auction_time'] = auction_time vaults[vault_number, 'cap'] = max_minted vaults[vault_number, 'weight'] = weight stability_rate[vault_number] = s_rate return vault_number @export def remove_vault(vault_type: int): assert vaults['OWNER'] == ctx.caller, 'Not the owner!' vaults['list'].remove(vault_type) @export def change_state(key: str, new_value: str, convert_to_decimal: bool = False): assert vaults['OWNER'] == ctx.caller, 'Not the owner!' assert type(key) == str, 'Invalid type for key' assert type(new_value) == str, 'Invalid type for new value' if convert_to_decimal: new_value = decimal(new_value) vaults[key] = new_value return new_value @export def change_any_state(key: Any, new_value: Any, convert_to_tuple: bool = False): assert vaults['OWNER'] == ctx.caller, 'Not the owner!' if convert_to_tuple: key = tuple(key) vaults[key] = new_value return new_value @export def change_stability_rate(key: int, new_value: float): assert vaults['OWNER'] == ctx.caller, 'Not the owner!' stability_rate[key] = new_value return new_value @export def get_collateralization_percent(cdp_number: int): assert cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' # TODO: Change this from a one-liner to proper function oracle = importlib.import_module(vaults['oracle']) return cdp[cdp_number, 'collateral_amount'] * oracle.get_price(cdp[cdp_number, 'vault_type']) / cdp[cdp_number, 'tad'] # code to check if minimum is met would be # assert cdp[cdp_number, 'collateral_amount'] >= vaults[cdp[cdp_number, 'collateral_type'], 'minimum_collateralization'] def assert_insufficent_collateral(cdp_number: int): assert cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' oracle = importlib.import_module(vaults['oracle']) assert (cdp[cdp_number, 'collateral_amount'] * oracle.get_price(cdp[cdp_number, 'vault_type']) / cdp[cdp_number, 'tad']) < \ vaults[cdp[cdp_number, 'collateral_type'], 'minimum_collateralization'], 'Vault above minimum collateralization!'
name con_rubix_test_dec_vault

State Changes

Contract con_rubix_test_dec_vault
Variable vaults
Key OWNER
New Value fb8721c4f736b22075f08f1161f24522132522311ac4f1e19730e3298bb8a40e
 
Contract con_rubix_test_dec_vault
Variable cdp
Key current_value
New Value 0
 
Contract con_rubix_test_dec_vault
Variable vaults
Key list
New Value
 
Contract con_rubix_test_dec_vault
Variable vaults
Key current_number
New Value 1
 
Contract con_rubix_test_dec_vault
Variable vaults
Key oracle
New Value oracle
 
Contract con_rubix_test_dec_vault
Variable vaults
Key 0:collateral_type
New Value currency
 
Contract con_rubix_test_dec_vault
Variable vaults
Key 0:minimum_collateralization
New Value 1.5
 
Contract con_rubix_test_dec_vault
Variable vaults
Key 0:minimum_auction_time
New Value 259200
 
Contract con_rubix_test_dec_vault
Variable vaults
Key 0:cap
New Value 100000
 
Contract con_rubix_test_dec_vault
Variable vaults
Key 0:weight
New Value 10
 
Contract con_rubix_test_dec_vault
Variable stability_rate
Key 0
New Value 1.1
 
Contract con_rubix_test_dec_vault
Variable __code__
New Value tad_contract = importlib.import_module('con_rubix_test_dec_tad') __vaults = Hash(default_value=0, contract='con_rubix_test_dec_vault', name= 'vaults') __stability_rate = Hash(default_value=1, contract= 'con_rubix_test_dec_vault', name='stability_rate') __cdp = Hash(default_value=0, contract='con_rubix_test_dec_vault', name='cdp') __stability_pool = Hash(default_value=0, contract= 'con_rubix_test_dec_vault', name='stability_pool') def ____(): __vaults['OWNER'] = ctx.caller __cdp['current_value'] = 0 __vaults['list'] = [0] __vaults['current_number'] = 1 __vaults['oracle'] = 'oracle' __vaults[0, 'collateral_type'] = 'currency' __vaults[0, 'minimum_collateralization'] = decimal('1.5') __vaults[0, 'minimum_auction_time'] = 259200 __vaults[0, 'cap'] = 100000 __vaults[0, 'weight'] = 10 __stability_rate[0] = decimal('1.1') @__export('con_rubix_test_dec_vault') def get_timestamp(): td = now - datetime.datetime(1970, 1, 1, 0, 0, 0) return td.seconds @__export('con_rubix_test_dec_vault') def create_vault(vault_type: int, amount_of_tad: float, amount_of_collateral: float): assert vault_type in __vaults['list'], 'Not an available contract!' collateral = importlib.import_module(__vaults[vault_type, 'collateral_type']) oracle = importlib.import_module(__vaults['oracle']) price = oracle.get_price(vault_type) assert amount_of_tad > 0, 'Amount of tad must be positive!' assert __vaults[vault_type, 'total'] + amount_of_tad <= __vaults[ vault_type, 'cap'], 'The allowance is not sufficent!' assert amount_of_collateral * price / amount_of_tad >= __vaults[ vault_type, 'minimum_collateralization'], 'Not enough collateral!' cdp_number = __cdp['current_value'] __cdp['current_value'] += 1 __cdp[cdp_number, 'owner'] = ctx.caller __cdp[cdp_number, 'open'] = True __cdp[cdp_number, 'collateral_type'] = __vaults[vault_type, 'collateral_type'] __cdp[cdp_number, 'vault_type'] = vault_type __cdp[cdp_number, 'tad'] = amount_of_tad __cdp[cdp_number, 'collateral_amount'] = amount_of_collateral __cdp[cdp_number, 'time'] = get_timestamp() collateral.approve(amount=amount_of_collateral, to=ctx.this) collateral.transfer_from(amount=amount_of_collateral, to=ctx.this, main_account=ctx.caller) tad_contract.mint(amount=amount_of_tad) tad_contract.transfer(amount=amount_of_tad, to=ctx.caller) __vaults[vault_type, 'issued'] += amount_of_tad __vaults[vault_type, 'total'] += amount_of_tad return cdp_number @__export('con_rubix_test_dec_vault') def close_vault(cdp_number: int): assert __cdp[cdp_number, 'owner'] == ctx.caller, 'Not the owner!' assert __cdp[cdp_number, 'open'] == True, 'Vault has already been closed!' collateral = importlib.import_module(__vaults[__cdp[cdp_number, 'vault_type'], 'collateral_type']) stability_ratio = __vaults[__cdp[cdp_number, 'vault_type'], 'total' ] / __vaults[__cdp[cdp_number, 'vault_type'], 'issued'] redemption_cost = __cdp[cdp_number, 'tad'] * stability_ratio fee = redemption_cost * __stability_rate[__cdp[cdp_number, 'vault_type'] ] ** (get_timestamp() - __cdp[cdp_number, 'time']) - redemption_cost amount = redemption_cost + fee tad_contract.transfer_from(amount=amount, to=ctx.this, main_account=ctx .caller) tad_contract.burn(amount=redemption_cost) __stability_pool[__cdp[cdp_number, 'vault_type']] += fee __vaults[__cdp[cdp_number, 'vault_type'], 'issued'] -= __cdp[cdp_number, 'tad'] __vaults[__cdp[cdp_number, 'vault_type'], 'total'] -= redemption_cost __cdp[cdp_number, 'open'] = False collateral.transfer(amount=__cdp[cdp_number, 'collateral_amount'], to= ctx.caller) return amount @__export('con_rubix_test_dec_vault') def fast_force_close_vault(cdp_number: int): __assert_insufficent_collateral(cdp_number=cdp_number) assert __cdp[cdp_number, 'open'] is True, 'Vault has already been closed!' collateral = importlib.import_module(__vaults[__cdp[cdp_number, 'vault_type'], 'collateral_type']) oracle = importlib.import_module(__vaults['oracle']) stability_ratio = __vaults[__cdp[cdp_number, 'vault_type'], 'total' ] / __vaults[__cdp[cdp_number, 'vault_type'], 'issued'] redemption_cost_without_fee = __cdp[cdp_number, 'tad'] * stability_ratio redemption_cost = redemption_cost_without_fee * decimal('1.1') fee = redemption_cost_without_fee * __stability_rate[__cdp[cdp_number, 'vault_type']] ** (get_timestamp() - __cdp[cdp_number, 'time'] ) - redemption_cost_without_fee redemption_cost += fee amount_of_collateral = __cdp[cdp_number, 'collateral_amount'] collateral_type = __cdp[cdp_number, 'collateral_type'] price = oracle.get_price(__cdp[cdp_number, 'vault_type']) collateral_percent = amount_of_collateral * price / redemption_cost if collateral_percent >= decimal('1.03'): tad_contract.transfer_from(amount=redemption_cost, to=ctx.this, main_account=ctx.caller) tad_contract.burn(amount=redemption_cost_without_fee) amount = redemption_cost * decimal('1.03') / price collateral.transfer(amount=amount, to=ctx.caller) collateral.transfer(amount=amount_of_collateral - amount, to=__cdp[ cdp_number, 'owner']) __vaults[__cdp[cdp_number, 'vault_type'], 'issued'] -= __cdp[ cdp_number, 'tad'] __vaults[__cdp[cdp_number, 'vault_type'], 'total' ] -= redemption_cost_without_fee else: redemption_cost, redemption_cost_without_fee = redemption_cost * ( collateral_percent / decimal('1.03') ), redemption_cost_without_fee * (collateral_percent / decimal( '1.03')) tad_contract.transfer_from(amount=redemption_cost, to=ctx.this, main_account=ctx.caller) tad_contract.burn(amount=redemption_cost_without_fee) amount = __cdp[cdp_number, 'collateral_amount'] collateral.transfer(amount=amount, to=ctx.caller) __vaults[__cdp[cdp_number, 'vault_type'], 'issued'] -= __cdp[ cdp_number, 'tad'] __vaults[__cdp[cdp_number, 'vault_type'], 'total' ] -= redemption_cost_without_fee __stability_pool[__cdp[cdp_number, 'vault_type'] ] += redemption_cost - redemption_cost_without_fee __cdp[cdp_number, 'open'] = False return amount @__export('con_rubix_test_dec_vault') def open_force_close_auction(cdp_number: int): __assert_insufficent_collateral(cdp_number=cdp_number) assert __cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert __cdp[cdp_number, 'auction', 'open' ] is not True, 'Auction is already taking place!' assert __cdp[cdp_number, 'open'] is True, 'Vault has already been closed!' __cdp[cdp_number, 'open'] = False __cdp[cdp_number, 'auction', 'open'] = True __cdp[cdp_number, 'auction', 'highest_bidder'] = ctx.caller __cdp[cdp_number, 'auction', 'top_bid'] = decimal('0.0') __cdp[cdp_number, 'auction', 'time'] = get_timestamp() return True @__export('con_rubix_test_dec_vault') def bid_on_force_close(cdp_number: int, amount: float): assert __cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert __cdp[cdp_number, 'auction', 'open'] is True, 'Auction is not open!' assert amount > __cdp[cdp_number, 'auction', 'top_bid' ], 'There is already a higher bid!' if __cdp[cdp_number, 'auction', ctx.caller, 'bid'] is not None: tad_contract.transfer_from(amount=amount - __cdp[cdp_number, 'auction', ctx.caller, 'bid'], to=ctx.this, main_account=ctx.caller ) else: tad_contract.transfer_from(amount=amount, to=ctx.this, main_account =ctx.caller) __cdp[cdp_number, 'auction', 'highest_bidder'] = ctx.caller __cdp[cdp_number, 'auction', 'top_bid'] = amount __cdp[cdp_number, 'auction', ctx.caller, 'bid'] = amount return True @__export('con_rubix_test_dec_vault') def settle_force_close(cdp_number: int): assert __cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert __cdp[cdp_number, 'auction', 'open'] is True, 'Auction is not open!' assert get_timestamp() - __cdp[cdp_number, 'auction', 'time'] > __vaults[ __cdp[cdp_number, 'vault_type'], 'minimum_auction_time' ], 'Auction is still open!' collateral = importlib.import_module(__vaults[__cdp[cdp_number, 'vault_type'], 'collateral_type']) __cdp[cdp_number, 'auction', 'settled'] = True __cdp[cdp_number, 'open'] = False __cdp[cdp_number, 'auction', 'open'] = False __cdp[cdp_number, 'auction', __cdp[cdp_number, 'auction', 'highest_bidder'], 'bid'] = 0 fee = __cdp[cdp_number, 'auction', 'top_bid'] * decimal('0.1') collateral.transfer_from(amount=__cdp[cdp_number, 'collateral_amount'], to=ctx.caller, main_account=ctx.this) tad_contract.burn(amount=__cdp[cdp_number, 'auction', 'top_bid'] - fee) __stability_pool[__cdp[cdp_number, 'vault_type']] += fee __vaults[__cdp[cdp_number, 'vault_type'], 'issued'] -= __cdp[cdp_number, 'tad'] __vaults[__cdp[cdp_number, 'vault_type'], 'total'] -= __cdp[cdp_number, 'auction', 'top_bid'] - fee return __cdp[cdp_number, 'auction', 'highest_bidder'], __cdp[cdp_number, 'auction', 'top_bid'] @__export('con_rubix_test_dec_vault') def claim_unwon_bid(cdp_number: int): assert __cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' assert __cdp[cdp_number, 'auction', 'settled' ] is True, 'Auction is still open or not opened!' tad_contract.transfer(to=ctx.caller, amount=__cdp[cdp_number, 'auction', ctx.caller, 'bid']) __cdp[cdp_number, 'auction', ctx.caller, 'bid'] = 0 return True @__export('con_rubix_test_dec_vault') def sync_stability_pool(vault_type: int): assert vault_type in __vaults['list'], 'Not an available contract!' default_amount = __vaults[vault_type, 'total'] - __vaults[vault_type, 'issued'] if default_amount > __stability_pool[vault_type]: __vaults[vault_type, 'issued'] += __stability_pool[vault_type] __stability_pool[vault_type] = 0 return __vaults[vault_type, 'issued'] / __vaults[vault_type, 'total'] else: __vaults[vault_type, 'issued'] = __vaults[vault_type, 'total'] __stability_pool[vault_type] -= default_amount return decimal('1.0') @__export('con_rubix_test_dec_vault') def export_rewards(vault_type: int, amount: float): assert __vaults[vault_type, 'DSR', 'owner'] == ctx.caller, 'Not the owner!' assert __stability_pool[vault_type ] >= amount, 'Not enough tad in stability pool to export!' __stability_pool[vault_type] -= amount tad_contract.transfer(to=ctx.caller, amount=amount) return True @__export('con_rubix_test_dec_vault') def mint_rewards(amount: float): assert __vaults['mint', 'DSR', 'owner'] == ctx.caller, 'Not the owner!' assert amount > 0, 'Cannot mint negative amount!' tad_contract.mint(amount=amount) tad_contract.transfer(to=ctx.caller, amount=amount) total_weight = 0 total_funds = amount for vault_type in __vaults['list']: total_weight += __vaults[vault_type, 'weight'] for vault_type in __vaults['list']: funds_transferred = __vaults[vault_type, 'weight' ] / total_weight * total_funds __vaults[vault_type, 'total'] += funds_transferred total_funds -= funds_transferred total_weight -= __vaults[vault_type, 'weight'] return True @__export('con_rubix_test_dec_vault') def sync_burn(vault_type: int, amount: float): assert vault_type in __vaults['list'], 'Not an available contract!' tad_contract.transfer_from(to=ctx.this, amount=amount, main_account=ctx .caller) tad_contract.burn(amount=amount) __vaults[vault_type, 'total'] -= amount return __vaults[vault_type, 'total'] @__export('con_rubix_test_dec_vault') def add_vault(collateral_type: str, collateral_amount: float, auction_time: float, max_minted: float, s_rate: float, weight: float): assert __vaults['OWNER'] == ctx.caller, 'Not the owner!' vault_number = __vaults['current_number'] __vaults['list'].append(vault_number) __vaults['current_number'] += 1 __vaults[vault_number, 'collateral_type'] = collateral_type __vaults[vault_number, 'minimum_collateralization'] = collateral_amount __vaults[vault_number, 'minimum_auction_time'] = auction_time __vaults[vault_number, 'cap'] = max_minted __vaults[vault_number, 'weight'] = weight __stability_rate[vault_number] = s_rate return vault_number @__export('con_rubix_test_dec_vault') def remove_vault(vault_type: int): assert __vaults['OWNER'] == ctx.caller, 'Not the owner!' __vaults['list'].remove(vault_type) @__export('con_rubix_test_dec_vault') def change_state(key: str, new_value: str, convert_to_decimal: bool=False): assert __vaults['OWNER'] == ctx.caller, 'Not the owner!' assert type(key) == str, 'Invalid type for key' assert type(new_value) == str, 'Invalid type for new value' if convert_to_decimal: new_value = decimal(new_value) __vaults[key] = new_value return new_value @__export('con_rubix_test_dec_vault') def change_any_state(key: Any, new_value: Any, convert_to_tuple: bool=False): assert __vaults['OWNER'] == ctx.caller, 'Not the owner!' if convert_to_tuple: key = tuple(key) __vaults[key] = new_value return new_value @__export('con_rubix_test_dec_vault') def change_stability_rate(key: int, new_value: float): assert __vaults['OWNER'] == ctx.caller, 'Not the owner!' __stability_rate[key] = new_value return new_value @__export('con_rubix_test_dec_vault') def get_collateralization_percent(cdp_number: int): assert __cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' oracle = importlib.import_module(__vaults['oracle']) return __cdp[cdp_number, 'collateral_amount'] * oracle.get_price(__cdp[ cdp_number, 'vault_type']) / __cdp[cdp_number, 'tad'] def __assert_insufficent_collateral(cdp_number: int): assert __cdp[cdp_number, 'owner'] != 0, 'Nonexistent cdp' oracle = importlib.import_module(__vaults['oracle']) assert __cdp[cdp_number, 'collateral_amount'] * oracle.get_price(__cdp[ cdp_number, 'vault_type']) / __cdp[cdp_number, 'tad'] < __vaults[ __cdp[cdp_number, 'collateral_type'], 'minimum_collateralization' ], 'Vault above minimum collateralization!'
 
Contract con_rubix_test_dec_vault
Variable __compiled__
New Value e30000000000000000000000000800000040000000730402000065006a01640083015a02650364016402640364048d035a04650364056402640664048d035a05650364016402640764048d035a06650364016402640864048d035a076409640a84005a08650964028301640b640c840083015a0a650964028301650b650c650c640d9c03640e640f840483015a0d650964028301650b64109c0164116412840483015a0e650964028301650b64109c0164136414840483015a0f650964028301650b64109c0164156416840483015a10650964028301650b650c64179c0264186419840483015a11650964028301650b64109c01641a641b840483015a12650964028301650b64109c01641c641d840483015a13650964028301650b641e9c01641f6420840483015a14650964028301650b650c64219c0264226423840483015a15650964028301650c64249c0164256426840483015a16650964028301650b650c64219c0264276428840483015a176509640283016518650c650c650c650c650c64299c06642a642b840483015a19650964028301650b641e9c01642c642d840483015a1a650964028301643d65186518651b642f9c0364306431840583015a1c650964028301643e651d651d651b64329c0364336434840583015a1e650964028301650b650c64359c0264366437840483015a1f650964028301650b64109c0164386439840483015a20650b64109c01643a643b84045a21643c5300293fda16636f6e5f72756269785f746573745f6465635f746164e900000000da18636f6e5f72756269785f746573745f6465635f7661756c74da067661756c74732903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d65e901000000da0e73746162696c6974795f72617465da03636470da0e73746162696c6974795f706f6f6c630000000000000000000000000400000043000000736800000074006a01740264013c006402740364033c0064026701740264043c006405740264063c006407740264073c006408740264133c007404640a8301740264143c00640c740264153c00640e740264163c006410740264173c00740464128301740564023c006400530029184eda054f574e45527202000000da0d63757272656e745f76616c7565da046c6973747208000000da0e63757272656e745f6e756d626572da066f7261636c65da0863757272656e6379da0f636f6c6c61746572616c5f747970657a03312e35da196d696e696d756d5f636f6c6c61746572616c697a6174696f6e6980f40300da146d696e696d756d5f61756374696f6e5f74696d6569a0860100da03636170e90a000000da067765696768747a03312e312902720200000072120000002902720200000072130000002902720200000072140000002902720200000072150000002902720200000072170000002906da03637478da0663616c6c6572da085f5f7661756c7473da055f5f636470da07646563696d616cda105f5f73746162696c6974795f72617465a900721e000000721e000000da00da045f5f5f5f0b000000731600000000010a0108010a010801080108010c010801080108017220000000630000000000000000010000000800000043000000731e000000740074016a01640164026402640364036403830618007d007c006a02530029044e69b2070000720800000072020000002903da036e6f77da086461746574696d65da077365636f6e64732901da027464721e000000721e000000721f000000da0d6765745f74696d657374616d701900000073040000000002180172250000002903da0a7661756c745f74797065da0d616d6f756e745f6f665f746164da14616d6f756e745f6f665f636f6c6c61746572616c63030000000000000007000000050000004300000073760100007c007400640119006b067314740164028301820174026a0374007c0064036602190083017d0374026a0374006404190083017d047c046a047c0083017d057c0164056b04734e740164068301820174007c006407660219007c01170074007c006408660219006b01737274016409830182017c027c0514007c011b0074007c00640a660219006b0573927401640b830182017405640c19007d067405640c05001900640d370003003c0074066a0774057c06640e66023c00640f74057c06641066023c0074007c0064036602190074057c06640366023c007c0074057c06641166023c007c0174057c06641266023c007c0274057c06641366023c007408830074057c06641466023c007c036a097c0274066a0a64158d0201007c036a0b7c0274066a0a74066a0764168d030100740c6a0d7c0164178d010100740c6a0e7c0174066a0764158d02010074007c0064186602050019007c01370003003c0074007c0064076602050019007c01370003003c007c06530029194e720e0000007a1a4e6f7420616e20617661696c61626c6520636f6e7472616374217212000000721000000072020000007a1f416d6f756e74206f6620746164206d75737420626520706f73697469766521da05746f74616c72150000007a1f54686520616c6c6f77616e6365206973206e6f7420737566666963656e742172130000007a164e6f7420656e6f75676820636f6c6c61746572616c21720d0000007208000000da056f776e657254da046f70656e7226000000da03746164da11636f6c6c61746572616c5f616d6f756e74da0474696d652902da06616d6f756e74da02746f2903722f0000007230000000da0c6d61696e5f6163636f756e742901722f000000da06697373756564290f721a000000da0e417373657274696f6e4572726f72da09696d706f72746c6962da0d696d706f72745f6d6f64756c65da096765745f7072696365721b000000721800000072190000007225000000da07617070726f7665da0474686973da0d7472616e736665725f66726f6dda0c7461645f636f6e7472616374da046d696e74da087472616e736665722907722600000072270000007228000000da0a636f6c6c61746572616c7210000000da057072696365da0a6364705f6e756d626572721e000000721e000000721f000000da0c6372656174655f7661756c741f00000073380000000003140108010a010e010a011001100114010c011401080110010e010c01040110010c010c010c010e0110010a010a010c0110011401140172400000002901723f000000630100000000000000060000000600000043000000735601000074007c0064016602190074016a026b02731a740364028301820174007c0064036602190064046b027332740364058301820174046a05740674007c0064066602190064076602190083017d01740674007c00640666021900640866021900740674007c006406660219006409660219001b007d0274007c00640a660219007c0214007d037c03740774007c0064066602190019007408830074007c00640b660219001800130014007c0318007d047c037c0417007d0574096a0a7c0574016a0b74016a02640c8d03010074096a0c7c03640d8d010100740d74007c00640666021900050019007c04370003003c00740674007c00640666021900640966020500190074007c00640a66021900380003003c00740674007c0064066602190064086602050019007c03380003003c00640e74007c00640366023c007c016a0e74007c00640f6602190074016a0264108d0201007c05530029114e722a0000007a0e4e6f7420746865206f776e657221722b000000547a1e5661756c742068617320616c7265616479206265656e20636c6f736564217226000000721200000072290000007232000000722c000000722e0000002903722f000000723000000072310000002901722f00000046722d0000002902722f0000007230000000290f721b00000072180000007219000000723300000072340000007235000000721a000000721d0000007225000000723a00000072390000007238000000da046275726eda105f5f73746162696c6974795f706f6f6c723c0000002906723f000000723d000000da0f73746162696c6974795f726174696fda0f726564656d7074696f6e5f636f7374da03666565722f000000721e000000721e000000721f000000da0b636c6f73655f7661756c7440000000732800000000021a0118010a01100112011601100110011a01080114020c01180118010c011c010c010e010a0172460000006301000000000000000c0000000600000043000000736a02000074007c0064018d01010074017c0064026602190064036b087322740264048301820174036a04740574017c0064056602190064066602190083017d0174036a0474056407190083017d02740574017c00640566021900640866021900740574017c006405660219006409660219001b007d0374017c00640a660219007c0314007d047c047406640b830114007d057c04740774017c0064056602190019007408830074017c00640c660219001800130014007c0418007d067c057c0637007d0574017c00640d660219007d0774017c006406660219007d087c026a0974017c0064056602190083017d097c077c0914007c051b007d0a7c0a7406640e83016b05900172a0740a6a0b7c05740c6a0d740c6a0e640f8d030100740a6a0f7c0464108d0101007c057406640e830114007c091b007d0b7c016a107c0b740c6a0e64118d0201007c016a107c077c0b180074017c0064126602190064118d020100740574017c00640566021900640966020500190074017c00640a66021900380003003c00740574017c0064056602190064086602050019007c04380003003c006e9e7c057c0a7406640e83011b0014007c047c0a7406640e83011b00140002007d057d04740a6a0b7c05740c6a0d740c6a0e640f8d030100740a6a0f7c0464108d01010074017c00640d660219007d0b7c016a107c0b740c6a0e64118d020100740574017c00640566021900640966020500190074017c00640a66021900380003003c00740574017c0064056602190064086602050019007c04380003003c00741174017c00640566021900050019007c057c041800370003003c00641374017c00640266023c007c0b530029144e2901723f000000722b000000547a1e5661756c742068617320616c7265616479206265656e20636c6f7365642172260000007212000000721000000072290000007232000000722c0000007a03312e31722e000000722d0000007a04312e30332903722f000000723000000072310000002901722f0000002902722f0000007230000000722a000000462912da1f5f5f6173736572745f696e737566666963656e745f636f6c6c61746572616c721b000000723300000072340000007235000000721a000000721c000000721d00000072250000007236000000723a00000072390000007218000000723800000072190000007241000000723c0000007242000000290c723f000000723d00000072100000007243000000da1b726564656d7074696f6e5f636f73745f776974686f75745f6665657244000000724500000072280000007212000000723e000000da12636f6c6c61746572616c5f70657263656e74722f000000721e000000721e000000721f000000da16666173745f666f7263655f636c6f73655f7661756c7459000000735c00000000020a0118010a0110010e011201160110010c0108011c01060108010c010c0112010c010e010a010a010c01100110010c010e0116010e0114010a0202010c0106010e010a010a010c010c01100116010e011401080110010c010c01724a00000063010000000000000001000000050000004300000073a400000074007c0064018d01010074017c0064026602190064036b037322740264048301820174017c00640564066603190064076b09733c740264088301820174017c0064066602190064076b0873547402640983018201640a74017c00640666023c00640774017c006405640666033c0074036a0474017c006405640b66033c007405640c830174017c006405640d66033c007406830074017c006405640e66033c0064075300290f4e2901723f000000722a00000072020000007a0f4e6f6e6578697374656e7420636470da0761756374696f6e722b000000547a2041756374696f6e20697320616c72656164792074616b696e6720706c616365217a1e5661756c742068617320616c7265616479206265656e20636c6f7365642146da0e686967686573745f6269646465727a03302e30da07746f705f626964722e00000029077247000000721b000000723300000072180000007219000000721c00000072250000002901723f000000721e000000721e000000721f000000da186f70656e5f666f7263655f636c6f73655f61756374696f6e8c000000731600000000020a0118010c010e0118010c010e01100112011001724e0000002902723f000000722f00000063020000000000000002000000070000004300000073d200000074007c0064016602190064026b037318740164038301820174007c00640464056603190064066b08733274016407830182017c0174007c0064046408660319006b04734c740164098301820174007c00640474026a03640a6604190064006b09728a74046a057c0174007c00640474026a03640a66041900180074026a0674026a03640b8d0301006e1474046a057c0174026a0674026a03640b8d03010074026a0374007c006404640c66033c007c0174007c006404640866033c007c0174007c00640474026a03640a66043c0064065300290d4e722a00000072020000007a0f4e6f6e6578697374656e7420636470724b000000722b000000547a1441756374696f6e206973206e6f74206f70656e21724d0000007a1e546865726520697320616c72656164792061206869676865722062696421da036269642903722f00000072300000007231000000724c0000002907721b000000723300000072180000007219000000723a000000723900000072380000002902723f000000722f000000721e000000721e000000721f000000da126269645f6f6e5f666f7263655f636c6f73659b000000731a000000000218011a011401060116010a011e030a010a0110010e0112017250000000630100000000000000030000000800000043000000738c01000074007c0064016602190064026b037318740164038301820174007c00640464056603190064066b08733274016407830182017402830074007c0064046408660319001800740374007c00640966021900640a660219006b0473627401640b8301820174046a05740374007c00640966021900640c6602190083017d01640674007c006404640d66033c00640e74007c00640566023c00640e74007c006404640566033c00640274007c00640474007c006404640f66031900641066043c0074007c00640464116603190074066412830114007d027c016a0774007c0064136602190074086a0974086a0a64148d030100740b6a0c74007c0064046411660319007c02180064158d010100740d74007c00640966021900050019007c02370003003c00740374007c00640966021900641666020500190074007c00641766021900380003003c00740374007c00640966021900641866020500190074007c0064046411660319007c021800380003003c0074007c006404640f6603190074007c0064046411660319006602530029194e722a00000072020000007a0f4e6f6e6578697374656e7420636470724b000000722b000000547a1441756374696f6e206973206e6f74206f70656e21722e000000722600000072140000007a1641756374696f6e206973207374696c6c206f70656e217212000000da07736574746c656446724c000000724f000000724d0000007a03302e31722d0000002903722f000000723000000072310000002901722f0000007232000000722c0000007229000000290e721b00000072330000007225000000721a00000072340000007235000000721c0000007239000000721800000072190000007238000000723a000000724100000072420000002903723f000000723d0000007245000000721e000000721e000000721f000000da12736574746c655f666f7263655f636c6f7365ae000000732c000000000218011a011401160106010a0110010e010c010e021a0116010e010e011a01180118010c011801120110017252000000630100000000000000010000000700000043000000736600000074007c0064016602190064026b037318740164038301820174007c00640464056603190064066b087332740164078301820174026a0374046a0574007c00640474046a0564086604190064098d020100640274007c00640474046a05640866043c0064065300290a4e722a00000072020000007a0f4e6f6e6578697374656e7420636470724b0000007251000000547a2441756374696f6e206973207374696c6c206f70656e206f72206e6f74206f70656e656421724f00000029027230000000722f0000002906721b0000007233000000723a000000723c000000721800000072190000002901723f000000721e000000721e000000721f000000da0f636c61696d5f756e776f6e5f626964c9000000730e000000000218010c010e010e011001120172530000002901722600000063010000000000000002000000050000004300000073a00000007c007400640119006b067314740164028301820174007c0064036602190074007c0064046602190018007d017c0174027c0019006b04727074007c00640466020500190074027c001900370003003c00640574027c003c0074007c0064046602190074007c006403660219001b00530074007c0064036602190074007c00640466023c0074027c00050019007c01380003003c0074036406830153006400530029074e720e0000007a1a4e6f7420616e20617661696c61626c6520636f6e7472616374217229000000723200000072020000007a03312e302904721a00000072330000007242000000721c00000029027226000000da0e64656661756c745f616d6f756e74721e000000721e000000721f000000da1373796e635f73746162696c6974795f706f6f6cd40000007314000000000214010e010a010c0118010801180214011001725500000029027226000000722f000000630200000000000000020000000400000043000000735400000074007c00640164026603190074016a026b02731c740364038301820174047c0019007c016b057330740364048301820174047c00050019007c01380003003c0074056a0674016a027c0164058d0201006406530029074eda03445352722a0000007a0e4e6f7420746865206f776e6572217a2b4e6f7420656e6f7567682074616420696e2073746162696c69747920706f6f6c20746f206578706f72742129027230000000722f000000542907721a0000007218000000721900000072330000007242000000723a000000723c00000029027226000000722f000000721e000000721e000000721f000000da0e6578706f72745f72657761726473e3000000730c00000000021c0106010e011001100172570000002901722f00000063010000000000000005000000050000004300000073c20000007400640d190074016a026b02731674036404830182017c0064056b047326740364068301820174046a057c0064078d01010074046a0674016a027c0064088d02010064057d017c007d02782074006409190044005d147d037c0174007c03640a6602190037007d0171545700785074006409190044005d447d0374007c03640a660219007c011b007c0214007d0474007c03640b6602050019007c04370003003c007c027c0438007d027c0174007c03640a6602190038007d0171765700640c5300290e4e723b0000007256000000722a0000007a0e4e6f7420746865206f776e65722172020000007a1c43616e6e6f74206d696e74206e6567617469766520616d6f756e74212901722f00000029027230000000722f000000720e00000072170000007229000000542903723b0000007256000000722a0000002907721a000000721800000072190000007233000000723a000000723b000000723c0000002905722f000000da0c746f74616c5f776569676874da0b746f74616c5f66756e64737226000000da1166756e64735f7472616e73666572726564721e000000721e000000721f000000da0c6d696e745f72657761726473ed000000731c0000000002160110010c011001040104010e0114010e021401140108011401725b00000063020000000000000002000000050000004300000073540000007c007400640119006b067314740164028301820174026a0374046a057c0174046a0664038d03010074026a077c0164048d01010074007c0064056602050019007c01380003003c0074007c00640566021900530029064e720e0000007a1a4e6f7420616e20617661696c61626c6520636f6e74726163742129037230000000722f00000072310000002901722f00000072290000002908721a0000007233000000723a0000007239000000721800000072380000007219000000724100000029027226000000722f000000721e000000721e000000721f000000da0973796e635f6275726e00010000730a0000000002140114020c011401725c00000029067212000000722d000000da0c61756374696f6e5f74696d65da0a6d61785f6d696e746564da06735f726174657217000000630600000000000000070000000400000043000000738400000074006401190074016a026b02731674036402830182017400640319007d067400640419006a047c068301010074006403050019006405370003003c007c0074007c06640666023c007c0174007c06640766023c007c0274007c06640866023c007c0374007c06640966023c007c0574007c06640a66023c007c0474057c063c007c065300290b4e720c0000007a0e4e6f7420746865206f776e657221720f000000720e0000007208000000721200000072130000007214000000721500000072170000002906721a000000721800000072190000007233000000da06617070656e64721d00000029077212000000722d000000725d000000725e000000725f0000007217000000da0c7661756c745f6e756d626572721e000000721e000000721f000000da096164645f7661756c740a01000073160000000003160108010e0110010c010c010c010c010c0108017262000000630100000000000000010000000200000043000000732800000074006401190074016a026b02731674036402830182017400640319006a047c00830101006400530029044e720c0000007a0e4e6f7420746865206f776e657221720e0000002905721a000000721800000072190000007233000000da0672656d6f766529017226000000721e000000721e000000721f000000da0c72656d6f76655f7661756c741a0100007304000000000216017264000000462903da036b6579da096e65775f76616c7565da12636f6e766572745f746f5f646563696d616c630300000000000000030000000300000043000000735600000074006401190074016a026b027316740364028301820174047c00830174056b02732a740364038301820174047c01830174056b02733e74036404830182017c02724a74067c0183017d017c0174007c003c007c01530029054e720c0000007a0e4e6f7420746865206f776e6572217a14496e76616c6964207479706520666f72206b65797a1a496e76616c6964207479706520666f72206e65772076616c75652907721a000000721800000072190000007233000000da0474797065da03737472721c0000002903726500000072660000007267000000721e000000721e000000721f000000da0c6368616e67655f737461746520010000730e0000000002160114011401040108010801726a000000290372650000007266000000da10636f6e766572745f746f5f7475706c65630300000000000000030000000300000043000000732e00000074006401190074016a026b02731674036402830182017c02722274047c0083017d007c0174007c003c007c01530029034e720c0000007a0e4e6f7420746865206f776e6572212905721a000000721800000072190000007233000000da057475706c65290372650000007266000000726b000000721e000000721e000000721f000000da106368616e67655f616e795f73746174652b010000730a00000000021601040108010801726d000000290272650000007266000000630200000000000000020000000300000043000000732200000074006401190074016a026b02731674036402830182017c0174047c003c007c01530029034e720c0000007a0e4e6f7420746865206f776e6572212905721a000000721800000072190000007233000000721d000000290272650000007266000000721e000000721e000000721f000000da156368616e67655f73746162696c6974795f72617465340100007306000000000216010801726e000000630100000000000000020000000500000043000000735000000074007c0064016602190064026b037318740164038301820174026a0374046404190083017d0174007c006405660219007c016a0574007c006406660219008301140074007c006407660219001b00530029084e722a00000072020000007a0f4e6f6e6578697374656e74206364707210000000722d0000007226000000722c0000002906721b000000723300000072340000007235000000721a00000072360000002902723f0000007210000000721e000000721e000000721f000000da1d6765745f636f6c6c61746572616c697a6174696f6e5f70657263656e743b0100007306000000000218010e02726f000000630100000000000000020000000500000043000000737000000074007c0064016602190064026b037318740164038301820174026a0374046404190083017d0174007c006405660219007c016a0574007c006406660219008301140074007c006407660219001b00740474007c006408660219006409660219006b00736c7401640a8301820164005300290b4e722a00000072020000007a0f4e6f6e6578697374656e74206364707210000000722d0000007226000000722c000000721200000072130000007a265661756c742061626f7665206d696e696d756d20636f6c6c61746572616c697a6174696f6e212906721b000000723300000072340000007235000000721a00000072360000002902723f0000007210000000721e000000721e000000721f000000724700000043010000730a000000000118010e022a01160172470000004e290146290146292272340000007235000000723a000000da0448617368721a000000721d000000721b00000072420000007220000000da085f5f6578706f72747225000000da03696e74da05666c6f617472400000007246000000724a000000724e00000072500000007252000000725300000072550000007257000000725b000000725c000000726900000072620000007264000000da04626f6f6c726a000000da03416e79726d000000726e000000726f0000007247000000721e000000721e000000721e000000721f000000da083c6d6f64756c653e01000000735c0000000a010601080104010a010e0104010a03080e100606010401101f06011018060110320601100e060112120601101a0601100a0601100e06011209060110120601120906010401160e060110050601160a060116080601120606011007
 
Contract con_rubix_test_dec_vault
Variable __owner__
New Value null
 
Contract con_rubix_test_dec_vault
Variable __submitted__
New Value 2021,11,14,22,9,32,0
 
Contract con_rubix_test_dec_vault
Variable __developer__
New Value fb8721c4f736b22075f08f1161f24522132522311ac4f1e19730e3298bb8a40e
 
Contract currency
Variable balances
Key fb8721c4f736b22075f08f1161f24522132522311ac4f1e19730e3298bb8a40e
New Value 96.67396438988165166