Skip to main content
Version: 1.3.4

Configuration

The Simulation Modules system needs a lot of input to run a simulation. This configuration documentation hopes to give you; the reader a good understanding of what these inputs are and how you can give the simulator all the information it needs to run a successfull simulation.

YAML

The format for all the inputs that the simulator needs is a YAML file. It's a single file that has to be uploaded to a specific folder in the simulators Google Cloud Storage bucket.

The details of how the file has to be passed into the simulator aren't relevant for this documentation (for the technical documentation see the Developer Documentation). For the end-user it's important to always use the Simulation CLI which will help you to perform simulations more easily.

What is more relevant is how to write this YAML in the format that the simulator expects, there are a lot of different fields:

Each of these fields has it's own page explaining what the field means and the possible options that you can use.

Validation

The configuration YAML can be validated using the YAML Validation plugin which is available for a lot of IDEs. The VSCode plugin can be found here. This plugin will automatically use the currently installed version of the simcli to validate the YAML file.

If you want to use a new version, make sure to install the correct version of the simcli or SDK version in the local Python environment of the simulation config. This will force you to update the simulatorVersion variable in the YAML file to the correct version.

poetry update almanak-simulations-sdk==[VERSION NUMBER]

The validation file is located in the SDK under almanak/simulations/assets/validation.json.

Example

Below you can see a working example for the current version. Please note that this simulation is for Bancor.

# yaml-language-server: $schema=.venv/lib/python3.10/site-packages/almanak/simulations/assets/validation.json
simulatorVersion: "0.0.0"
block: 16100000
steps: 10
parameters:
- name: "swapping_fees_ETH_1"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_ETH_2"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_WBTC_1"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_WBTC_2"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_LINK_1"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_LINK_2"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_DAI_1"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_DAI_2"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_BNT_1"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_BNT_2"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_VBNT_1"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "swapping_fees_VBNT_2"
value: 0.001
optimizer:
optimize: true
range: [0.001, 0.01]
isDigit: false
- name: "tl_adjustments_ETH_25"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_ETH_50"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_ETH_100"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_ETH_200"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_LINK_25"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_LINK_50"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_LINK_100"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_LINK_200"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_DAI_25"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_DAI_50"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_DAI_100"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_DAI_200"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_WBTC_25"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_WBTC_50"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_WBTC_100"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_WBTC_200"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_BNT_25"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_BNT_50"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_BNT_100"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_BNT_200"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_VBNT_25"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_VBNT_50"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_VBNT_100"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
- name: "tl_adjustments_VBNT_200"
value: 0.5
optimizer:
optimize: true
range: [0.0, 1.0]
isDigit: false
optimizer:
algorithm: "NSGA-II"
individuals: 100
generations: 10
tokens:
- name: "DAI"
address: "0x6B175474E89094C44Da98b954EedeAC495271d0F"
isNative: false
- name: "BNT"
address: "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C"
isNative: false
- name: "ETH"
address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
isNative: true
nativeLabel: "bancor"
prices:
- tokenPair: ["ETH", "USDT"]
historical: [
1297.85,
1297.84,
1298.1,
1298.11,
1298.1,
1298.1,
1298.1,
1298.01,
1298.01,
1298.0,
1298.11,
1298.11,
1298.13,
1298.49,
1298.71
]
simulated: [
1298.12,
1557.744,
1869.2927999999997,
2243.1513599999994,
1881.1996227747038,
2257.4395473296445,
1805.9516378637159,
1805.531131512327,
1968.1101423290597,
2216.577577107679,
2314.1243588734665
]
volatility_simulated: [
1.7552695580538409,
0.4247090094792248,
0.8125873575657275,
1.4016464235403154,
0.7881283043629046,
0.7982408734761127,
0.2508450652614522,
0.2277733584864604,
0.3216851572583862,
0.4714774547177195
]
volatility_historical: [
0.009785811183924562,
3.7927447291764933,
3.7719409380351063,
3.7912038674352817,
3.7927445748511075,
3.791974224110421,
3.791974224110421,
3.798907434186675,
3.791974224110421,
3.7927446341997113,
3.7834996478392435,
3.791974224110421,
3.790433522629026,
3.7642420247159083,
3.77503146752392
]
- tokenPair: ["USDT", "DAI"]
historical: [
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002,
1.0002
]
simulated: [
1.0002,
0.9999306790097684,
1.000099827957043,
1.000387540887459,
1.000256934105859,
1.0004344111360963,
1.0003570976195375,
1.0004490256198768,
1.0005037930838563,
1.0006519285172202,
1.000659624679919
]
volatility_simulated: [
0.0006903394999330383,
0.000697302978777174,
0.0006947901000087285,
0.0006925587480221076,
0.0006959996571272091,
0.0006936038277888245,
0.0006931859693437201,
0.0006920231807223003,
0.0006924101703075814,
0.0007031425972445004
]
volatility_historical: [
0.0004929897728370462,
0.0006017707080099281,
0.0006484455480441094,
0.000670130520287174,
0.0006805039486197004,
0.0006855296287700919,
0.0006879788102555496,
0.0006891757318461979,
0.0006897614652242049,
0.0006900482930810471,
0.0006901887952170918,
0.0006902576308235978,
0.0006902913577649869,
0.000690307883364729,
0.0006903159807641855
]
- tokenPair: ["BNT", "USDT"]
historical: [
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388,
0.388
]
simulated: [
0.388,
0.42526270157058677,
0.4622291246919008,
0.506975724768615,
0.5525531671267159,
0.6080607759755131,
0.6672640827361996,
0.7272875746861834,
0.663800054106946,
0.7235885171641008,
0.6573987119638841
]
volatility_simulated: [
1.7552695580538409,
0.4247090094792248,
0.8125873575657275,
1.4016464235403154,
0.7881283043629046,
0.7982408734761127,
0.2508450652614522,
0.2277733584864604,
0.3216851572583862,
0.4714774547177195
]
volatility_historical: [
0.0025317928973576918,
0.003553540318120192,
0.0043195823993042205,
0.004950656634921844,
0.005493969772308274,
0.005973957274614051,
0.0064052707459556265,
0.006797546712217086,
0.0071575425141090394,
0.007490225308472919,
0.007799380981346264,
0.008087979114529688,
0.008358403959369553,
0.008612607155862428
]
priceSimulator:
price_names: [["ETH", "USDT"], ["USDT", "DAI"], ["BNT", "USDT"]]
historicalDataBlockRange: [16085600, 16085610]
maturity: 1.0
granularity: 1
random_seed_price: 42
random_seed_sigma: 42
random_seed_black_swan: 42
volatility_mode: "cccgarch"
settings:
volatility_scale: 1.0
market_drift: 2.0
enable_black_swan_event: false
black_swan_must_happen_by: 0.8
black_swan_cannot_happen_before: 0.3
black_swan_range: [0.3, 0.5]
black_swan_step_length: 100
black_swan_kappa: 0.3
black_swan_theta: 0.02
black_swan_xi: 0.1
max_percentage_change: 0.2
max_value_percentage: 1.0
min_value_percentage: 1.0
asset_settings:
- price_name: ["USDT", "DAI"]
settings:
market_drift: 2.0
enable_black_swan_event: false
max_percentage_change: 0.001
max_value_percentage: 0.001
min_value_percentage: 0.001
postprocessing:
- name: "aggregate"
content:
steps:
0: 60
is_ohlc: true
gas:
strategy:
name: "none"
agentClasses:
- class: "lp"
models: ["bancor_lp_action", "bancor_lp_volume"]
agentInitialization: |
def custom_agent_class_initialization(agent, environment, metric_collector):
agent.set_variable('withdrawal_request_ids_by_token', collections.defaultdict(list))
settings = agent.get_settings()

custom_agent_class_initialization(a, b, metric_collector)
agentPreStep: |
def custom_agent_class_pre_step(agent, environment, metric_collector):
# A set of individual token names (e.g., {"ETH", "DAI", "LINK"})
current_tokens = set(agent.get_wallet().get_token_names())

# A list of TokenPair objects (e.g., [TokenPair("ETH", "USDT"), TokenPair("USDT", "DAI")])
simulated_tokens = list(environment.get_current_prices().keys())

step_list = []
for token in simulated_tokens:
if (token.get_a() in current_tokens or token.get_b() in current_tokens) and \
token.upper() != 'BNTUSDT':
step = AgentStep()
step.token = token
step_list.append(step)
agent.set_step_list(step_list)

settings = agent.get_settings()

custom_agent_class_pre_step(a, b, metric_collector)
agentFeatureVector: |
def agent_feature_vector(agent, step, model_alias, environment, metric_collector):
token = step.token
non_usdt_token = token.get_a() if token.get_a() != 'USDT' else token.get_b()
coins_abr = {
'BNT': 0,
'LINK': 1,
'ETH': 2,
'DAI': 3,
'WBTC': 4
}

# same as for traders, calculate asset specific features
vol = environment.get_price_slice_std(token, lookback=3)
change = environment.get_state().token_states[token].price_change

# calculate asset share
share = agent.get_wallet().get_token_share(non_usdt_token)
return np.array([coins_abr[non_usdt_token], change, vol, share])
agentStep: |
def custom_agent_class_step(agent, step, environment, metric_collector):
try:
model_output = step.get_model_output()
action = model_output['bancor_lp_action'][0][0]
quantity = model_output['bancor_lp_volume'][0][0][0]
token = step.token
non_usdt_token = token.get_a() if token.get_a() != 'USDT' else token.get_b()
token_address = get_token_address(environment, non_usdt_token)
quantity = int(quantity)
price_granularity = environment.get_price_granularity()
if action == 1:
agent.set_latest_action("deposit")
agent.get_client().bancor_network.deposit(token_address, quantity).transact(generate_tx_details(agent.get_address()))
agent.add_affected_token(token)
elif action == 2:
pending_withdrawals = agent.get_variable('withdrawal_request_ids_by_token')[non_usdt_token]

if len(pending_withdrawals) > 0:
agent.set_latest_action("withdrawal")
environment.get_client().bancor_network.withdraw(pending_withdrawals[0]).transact({'from': agent.get_address()})
else:
agent.set_latest_action("cooldown")
withdrawal_request_id = environment.get_client().bancor_network.initWithdrawal(
token_address, quantity).transact({'from': agent.get_address()})
agent.get_variable('withdrawal_request_ids_by_token')[non_usdt_token].append(withdrawal_request_id)
else:
agent.set_latest_action('nothing')
except Exception as e:
agent.set_latest_action('nothing')

custom_agent_class_step(a, b, c, metric_collector)
agentPostStep: |
def custom_agent_class_post_step(agent, environment, metric_collector):
pass

custom_agent_class_post_step(a, b, metric_collector)
agentTeardown: |
def agent_teardown(_agent: AgentWrapper, _environment: EnvironmentWrapper, _metric_collector: MetricCollectorWrapper):
pass

agent_teardown(a, b, metric_collector)
- class: "arb"
agentInitialization: |
def custom_agent_class_initialization(agent, environment, metric_collector):
agent.set_variable('withdrawal_request_ids_by_token', collections.defaultdict(list))

custom_agent_class_initialization(a, b, metric_collector)
agentPreStep: |
def custom_agent_class_pre_step(agent, environment, metric_collector):
# A set of individual token names (e.g., {"ETH", "DAI", "LINK"})
current_tokens = set(agent.get_wallet().get_token_names())

# A list of TokenPair objects (e.g., [TokenPair("ETH", "USDT"), TokenPair("USDT", "DAI")])
simulated_tokens = list(environment.get_current_prices().keys())

step_list = []
for token in simulated_tokens:
if (token.get_a() in current_tokens or token.get_b() in current_tokens) and \
token.upper() != 'BNTUSDT':
step = AgentStep()
step.token = token
step_list.append(step)
agent.set_step_list(step_list)

custom_agent_class_pre_step(a, b, metric_collector)
agentFeatureVector: |
def agent_feature_vector(agent, step, model_alias, environment, metric_collector):
return np.array([])
agentStep: |
def custom_agent_class_step(agent, step, environment, metric_collector):
token = step.token
non_usdt_token = token.get_a() if token.get_a() != 'USDT' else token.get_b()
agent.set_latest_action('arb')

token_address = get_token_address(environment, non_usdt_token)

current_prices = environment.get_current_prices()
tkn_price = Decimal(str(current_prices[token]))
bnt_price = Decimal(str(current_prices['BNTUSDT']))
trading_liquidity = environment.get_client().bancor_network_info.tradingLiquidity(token_address).call()
bnt_trading_liquidity = Decimal(str(trading_liquidity[0]))
tkn_trading_liquidity = Decimal(str(trading_liquidity[1]))
trading_fee = Decimal(str(environment.get_state().token_states[token].swap_fee
if environment.get_state() is not None else environment.get_swap_fee(non_usdt_token)))

trade_amt, source_token, target_token = process_arbitrage_trade(
non_usdt_token,
tkn_price,
bnt_price,
bnt_trading_liquidity,
tkn_trading_liquidity,
trading_fee,
)

from_address = agent.get_address()
if not environment.get_client().is_checksum_address(from_address):
from_address = environment.get_client().to_checksum_address(from_address)
source_token_address = get_token_address(environment, source_token)
if not environment.get_client().is_checksum_address(source_token_address):
source_token_address = environment.get_client().to_checksum_address(source_token_address)
target_token_address = get_token_address(environment, target_token)
if not environment.get_client().is_checksum_address(target_token_address):
target_token_address = environment.get_client().to_checksum_address(target_token_address)

trade_amount = int(trade_amt)
min_return_amount = 1 # Accept any amount returned by the trade, cannot be 0
deadline = int(time.time()) + 3600

if not agent.get_wallet().has_token(source_token) or \
trade_amount > agent.get_wallet().get_token(source_token).get_quantity() or \
trade_amount == 0:
agent.set_latest_action('nothing')
else:
try:
trade_by_source_amount(
environment=environment,
from_address=from_address,
source_token=source_token_address,
target_token=target_token_address,
source_amount=trade_amount,
min_return_amount=min_return_amount,
deadline=deadline,
beneficiary=from_address
)

swap_fee = environment.get_swap_fee(non_usdt_token)
environment.add_revenue(environment.get_client().get_chain().get_token(
non_usdt_token, native_token_name='bancor').get_token_quantity_as_decimal(
non_usdt_token, trade_amount) * swap_fee)

agent.add_affected_token(source_token)
agent.add_affected_token(target_token)
print(f'{from_address}: Trade Success')
except ContractLogicError as e:
print(f'{from_address}: Arb ContractLogicError, {e}')
agent.set_latest_action('nothing')

custom_agent_class_step(a, b, c, metric_collector)
agentPostStep: |
def custom_agent_class_post_step(agent, environment, metric_collector):
pass

custom_agent_class_post_step(a, b, metric_collector)
agentTeardown: |
def agent_teardown(_agent: AgentWrapper, _environment: EnvironmentWrapper, _metric_collector: MetricCollectorWrapper):
pass

agent_teardown(a, b, metric_collector)
- class: "trader"
models: ["bancor_trader"]
agentInitialization: |
def custom_agent_class_initialization(agent, environment, metric_collector):
agent.set_variable('withdrawal_request_ids_by_token', collections.defaultdict(list))

custom_agent_class_initialization(a, b, metric_collector)
agentPreStep: |
def custom_agent_class_pre_step(agent, environment, metric_collector):
# A set of individual token names (e.g., {"ETH", "DAI", "LINK"})
current_tokens = set(agent.get_wallet().get_token_names())

# A list of TokenPair objects (e.g., [TokenPair("ETH", "USDT"), TokenPair("USDT", "DAI")])
simulated_tokens = list(environment.get_current_prices().keys())

step_list = []
for token in simulated_tokens:
if (token.get_a() in current_tokens or token.get_b() in current_tokens) and \
token.upper() != 'BNTUSDT':
step = AgentStep()
step.token = token
step_list.append(step)
agent.set_step_list(step_list)

custom_agent_class_pre_step(a, b, metric_collector)
agentFeatureVector: |
def agent_feature_vector(agent, step, model_alias, environment, metric_collector):
token = step.token
non_usdt_token = token.get_a() if token.get_a() != 'USDT' else token.get_b()

# get number for respective asset
code_coins = {
'ETH': 0,
'DAI': 1,
'LINK': 2,
'WBTC': 3,
'VBNT': 4
}

# if asset is non-bnt, select the respective asset to be traded for bnt
if non_usdt_token != 'bnt':
token_to = code_coins[non_usdt_token]
token_from = 5
# if not, the only other asset held by the user is selected
else:
token_to = 5
token_from = code_coins[random.choice(
[x for x in list(agent.get_wallet().get_token_names()) if
x not in ['bneth', 'bnlink', 'bndai', 'bnbnt', 'bnwbtc', 'bnvbnt', 'bnt']])]

# get the volatility of the past 24 hour for the chosen asset
# and calculate the price change over the past hour
vol = environment.get_price_slice_std(token, lookback=3)
change = environment.get_state().token_states[token].price_change

# get swapping fee of asset
swap_fee = environment.get_state().token_states[token].swap_fee \
if environment.get_state() is not None else environment.get_variable('swap_fee')

# get difference in spot rate vs ground truth
delta_price = environment.get_state().token_states[token].price_discrepancy

return np.array([token_to, token_from, change, vol, delta_price, swap_fee])
agentStep: |
def custom_agent_class_step(agent, step, environment, metric_collector):
model_output = step.get_model_output()
quantity = model_output['bancor_trader'][0][0][0]
token = step.token
non_usdt_token = token.get_a() if token.get_a() != 'USDT' else token.get_b()
agent.set_latest_action('trade')
if non_usdt_token != 'bnt':
target_tkn = 'bnt'
else:
target_tkns = [
x for x in [
x for x in list(agent.get_wallet().get_token_names())
if float(agent.get_wallet().get_token(x).get_quantity()) > 0 and len(x) < 5
]
if x != 'bnt'
]
target_tkn = random.choice(target_tkns)
target_tkn = target_tkn.upper()

from_address = agent.get_address()
if not environment.get_client().is_checksum_address(from_address):
from_address = environment.get_client().to_checksum_address(from_address)
source_token_address = get_token_address(environment, non_usdt_token)
if not environment.get_client().is_checksum_address(source_token_address):
source_token_address = environment.get_client().to_checksum_address(source_token_address)
target_token_address = get_token_address(environment, target_tkn)
if not environment.get_client().is_checksum_address(target_token_address):
target_token_address = environment.get_client().to_checksum_address(target_token_address)

try:
scaled_quantity = int(agent.get_wallet().get_token(non_usdt_token).get_quantity() * quantity)
if scaled_quantity <= 0:
agent.set_latest_action('nothing')
else:
min_return_amount = 1 # Accept any amount returned by the trade, cannot be 0
deadline = int(time.time()) + 3600

trade_by_source_amount(
environment=environment,
from_address=from_address,
source_token=source_token_address,
target_token=target_token_address,
source_amount=scaled_quantity,
min_return_amount=min_return_amount,
deadline=deadline,
beneficiary=from_address
)

swap_fee = environment.get_swap_fee(non_usdt_token)
environment.add_revenue(environment.get_client().get_chain().get_token(non_usdt_token, native_token_name='bancor').get_token_quantity_as_decimal(scaled_quantity) * swap_fee)

agent.add_affected_token(non_usdt_token)
agent.add_affected_token(target_tkn)
except KeyError:
agent.set_latest_action('nothing')
except ContractLogicError as e:
print(f'{from_address}: Trader ContractLogicError, {e}')
agent.set_latest_action('nothing')

custom_agent_class_step(a, b, c, metric_collector)
agentPostStep: |
def custom_agent_class_post_step(agent, environment, metric_collector):
pass

custom_agent_class_post_step(a, b, metric_collector)
agentTeardown: |
def agent_teardown(_agent: AgentWrapper, _environment: EnvironmentWrapper, _metric_collector: MetricCollectorWrapper):
pass

agent_teardown(a, b, metric_collector)
agents:
- class: "lp"
address: "0x6429FEe053768Ffa90a59cAfb98Ca9E8F6471211"
holdings:
- token: "bnWBTC"
amount: 4338109590
- token: "ETH"
amount: 2847843290371928722
- token: "DAI"
amount: 2847843290371928722
settings:
deposit: 1002
pool1:
token0: "WETH"
token1: "USDT"
fee: 5000
- class: "lp"
address: "0xaE8E931EEd550031EdA61FC4410521d81F2BfBdd"
holdings:
- token: "ETH"
amount: 38149448412523823
- token: "bnETH"
amount: 293109236868274071
settings:
deposit: 1003
- class: "lp"
address: "0xB494096548aA049C066289A083204E923cBf4413"
holdings:
- token: "ETH"
amount: 200452552214377241
- token: "bnDAI"
amount: 424551004385920620748341
- token: "bnLINK"
amount: 9258283976382964422773
settings:
deposit: 1005
- class: "arb"
address: "0x0000000000590B74eb97457BF7b3Ff6D63C6Fde2"
holdings:
- token: "wBTC"
amount: 597549
- token: "DAI"
amount: 2092528816071425678876
- class: "arb"
address: "0x000000000035B5e5ad9019092C665357240f594e"
holdings:
- token: "ETH"
amount: 53446560947305007281
- token: "DAI"
amount: 85286644566652253
- token: "LINK"
amount: 122
- token: "wBTC"
amount: 4182
- class: "trader"
address: "0xd95bC5313DE0212B7f25c2ed3D469B38D2764655"
holdings:
- token: "LINK"
amount: 390865361756729618963
- token: "ETH"
amount: 340240061250874112
- class: "trader"
address: "0x0F1EB8D77df90657AAE638e32C152A6Ec36eF4ff"
holdings:
- token: "ETH"
amount: 461946969788171194
- class: "trader"
address: "0x31F9f469b73DaA49E50d0111058172763F799302"
holdings:
- token: "ETH"
amount: 2050707098293847511
- token: "DAI"
amount: 2035647517044695744350
- class: "trader"
address: "0x8558FE88F8439dDcd7453ccAd6671Dfd90657a32"
holdings:
- token: "ETH"
amount: 6906817074217000000000
- token: "wBTC"
amount: 406020100000
- class: "trader"
address: "0xD9b17f6eFE0b4a973e67146D17c43017BBcF7bB8"
holdings:
- token: "ETH"
amount: 11000000000000000000
mint: true
- token: "BNT"
amount: 8293000000000000000000
mint: true
models:
- alias: "bancor_lp_action"
wandb_artifact: "almanak/uncategorized/action_user.onnx:latest"
- alias: "bancor_lp_volume"
wandb_artifact: "almanak/uncategorized/amount_user.onnx:latest"
- alias: "bancor_trader"
wandb_artifact: "almanak/uncategorized/trader.onnx:latest"
contracts:
- abi: '[{"inputs": [], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [{"internalType": "uint256", "name": "_value", "type": "uint256"}], "name": "increment", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "number", "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], "stateMutability": "view", "type": "function"}, {"inputs": [], "name": "reset", "outputs": [], "stateMutability": "nonpayable", "type": "function"}]'
alias: "incrementer"
installable:
bytecode: "608060405234801561001057600080fd5b50600080819055506101db806100276000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80637cf5dab0146100465780638381f58a14610062578063d826f88f14610080575b600080fd5b610060600480360381019061005b91906100eb565b61008a565b005b61006a6100a1565b6040516100779190610127565b60405180910390f35b6100886100a7565b005b806000546100989190610171565b60008190555050565b60005481565b60008081905550565b600080fd5b6000819050919050565b6100c8816100b5565b81146100d357600080fd5b50565b6000813590506100e5816100bf565b92915050565b600060208284031215610101576101006100b0565b5b600061010f848285016100d6565b91505092915050565b610121816100b5565b82525050565b600060208201905061013c6000830184610118565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061017c826100b5565b9150610187836100b5565b925082820190508082111561019f5761019e610142565b5b9291505056fea264697066735822122072e7fdd0a3a63d596b9da980049bd6c53b405daff56912d3871ff9e9f4007e7664736f6c63430008120033"
- abi: "file://./abi/bancor_network.json"
address: "0xeEF417e1D5CC832e619ae18D2F140De2999dD4fB"
alias: "bancor_network"
- abi: "file://./abi/bancor_network_info.json"
address: "0x8E303D296851B320e6a697bAcB979d13c9D6E760"
alias: "bancor_network_info"
- abi: "file://./abi/bancor_network_settings.json"
address: "0x83E1814ba31F7ea95D216204BB45FE75Ce09b14F"
alias: "bancor_network_settings"
- abi: "file://./abi/bancor_pool_collection.json"
address: ""
alias: "bancor_pool_collection"
- abi: "file://./abi/bancor_pool_token.json"
address: ""
alias: "bancor_pool_token"
code:
environmentInitialization: "file://./code/environmentInitialization.py"
agentInitialization: "file://./code/agentInitialization.py"
environmentPreStep: "file://./code/environmentPreStep.py"
agentPreStep: "file://./code/agentPreStep.py"
agentFeatureVector: "file://./code/agentFeatureVector.py"
agentStep: "file://./code/agentStep.py"
agentPostStep: "file://./code/agentPostStep.py"
environmentPostStep: "file://./code/environmentPostStep.py"
agentTeardown: "file://./code/agentTeardown.py"
environmentTeardown: "file://./code/environmentTeardown.py"
reward: "file://./code/reward.py"
environmentMisc: "file://./code/environmentMisc.py"
agentMisc: "file://./code/agentMisc.py"
imports:
- name: "bancor"
source: "file://./imports/bancor.py"
type: "sdk_class"
metrics:
prebuild:
balance:
enabled: true
runsOn: ["agentPreStep"]
step_action:
enabled: true
runsOn: ["agentStep"]
transactions:
enabled: true