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:
- Version
- Block
- Steps
- Paramaters
- Optimizer
- Tokens
- Prices
- Price Simulator
- Agent Classes
- Agents
- Models
- Contracts
- Code
- Metrics
Each of these fields has it's own page explaining what the field means and the possible options that you can use.
Example
Below you can see a working example for the current version. Please note that this simulation is for Bancor.
# yaml-language-server: $schema=validation.json
simulatorVersion: "dev"
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: [ 1308.02, 1308.8, 1311.92, 1310.16, 1317.25, 1322.77, 1318.27, 1319.88, 1319.57, 1326.06, 1335.68, 1337.9, 1341.56, 1334.99, 1330.12, 1321.53, 1318.61, 1320.92, 1320.39, 1327.42, 1324.64, 1321.26, 1324.71, 1328.15, 1327.15, 1324.91, 1323.23, 1328.31, 1329.89, 1333.77, 1329.32, 1325.63, 1328.28, 1332.12, 1333.97, 1330.27, 1331.95, 1341.08, 1339.48, 1341.98, 1339.01, 1334.46, 1335.62, 1337.75, 1337.92, 1330.2, 1331.07, 1330.56, 1330.87, 1333.51, 1335.52, 1334.67, 1335.13, 1336.13, 1336.45, 1332.47, 1333.26, 1332.51, 1323.04, 1325.01, 1327.57, 1337.72, 1342.92, 1341.56, 1342.63, 1349.32, 1389.39, 1415.23, 1401.46, 1399.59, 1400.99, 1403.48, 1395.14, 1398.93, 1398.45, 1400.33, 1400.03, 1399.83, 1397.78, 1397.78, 1256.29, 1259.61, 1257.04, 1262.56, 1260.08, 1257.5, 1257.03, 1258.41, 1257.3, 1258.06, 1254.94, 1257.08, 1254.53, 1259.55, 1259.83, 1259.38, 1268.95, 1273.24, 1278.5, 1277.58, 1276.54, 1275.59, 1279.41, 1288.75, 1290.7, 1292.15, 1290.85, 1300.64, 1297.31, 1295.79, 1297.08, 1301.64, 1294.3, 1296.01, 1295.13, 1290.31, 1285.83, 1285.11, 1266.59, 1259.74, 1264.73, 1262.31, 1253.67, 1256.51, 1259.65, 1259.1, 1259.41, 1266.6, 1263.56, 1265.51, 1261.82, 1261.33, 1256.76, 1260.68, 1260.39, 1262.71, 1255.77, 1252.36, 1256.08, 1257.79, 1253.96, 1251.27, 1254.4, 1255.02, 1251.7, 1249.23, 1250.13, 1253.02, 1255.81, 1252.88, 1271.32, 1268.8, 1265.13, 1265.58, 1262.27, 1263.31, 1260.28, 1250.22, 1224.63, 1228.95, 1230.79, 1229.97, 1224.97, 1224.34, 1232.75, 1233.41, 1233.85, 1229.35, 1231.09, 1229.04, 1232.11, 1231.75, 1232.36, 1230.39, 1231.18, 1227.17, 1227.13, 1232.91, 1231.86, 1228.09, 1228.84, 1228.81, 1232.73, 1233.71, 1229.98, 1233.27, 1240.4, 1239.18, 1244.69, 1247.55, 1249.91, 1251.1, 1254.52, 1287.3, 1283.9, 1278.95, 1278.42, 1284.3, 1280.18, 1277.02, 1281.51, 1281.06, 1283.98, 1283.57, 1280.96, 1279.71, 1282.43, 1280.18, 1285.01, 1284.9, 1287.83, 1286.05, 1275.03, 1272.96, 1277.6, 1275.31, 1274.11, 1268.85, 1269.05, 1262.37, 1260.02, 1264.13, 1263.1, 1264.3, 1265.55, 1263.53, 1265.2, 1264.23, 1263.09, 1265.18, 1264.57, 1263.31, 1265.18, 1265.43, 1266.18, 1266.64, 1268.04, 1271.69, 1278.26, 1274.21, 1267.49, 1272.25, 1272.2, 1273.16, 1267.94, 1269.12, 1266.35, 1268.36, 1271.24, 1269.99, 1272.68, 1273.47, 1275.68, 1273.8, 1276.49, 1274.16, 1271.99, 1272.79, 1273.45, 1274.52, 1272.67, 1272.58, 1273.38, 1273.83, 1274.27, 1279.49, 1274.39, 1265.57, 1264.99, 1262.31, 1263.01, 1254.08, 1257.15, 1244.77, 1243.83, 1246.54, 1247.5, 1246.72, 1246.46, 1247.97, 1252.41, 1255.3, 1254.4, 1247.99, 1247.2, 1251.21, 1249.35, 1251.27, 1253.8, 1254.66, 1254.58, 1266.68, 1275.02, 1272.45, 1275.4, 1270.38, 1267.53, 1271.12, 1269.65, 1272.42, 1272.31, 1267.54, 1266.41, 1265.16, 1278.04, 1279.48, 1286.93, 1290.18, 1337.88, 1332.51, 1323.78, 1321.62, 1307.91, 1316.39, 1316.41, 1317.89, 1319.58, 1319.83, 1320.69, 1325.05, 1321.01, 1319.47, 1319.79, 1318.72, 1320.88, 1322.05, 1322.5, 1324.13, 1321.73, 1323.47, 1326.49, 1332.66, 1327.84, 1340.79, 1338.32, 1336.25, 1335.08, 1332.73, 1307.54, 1308.51, 1310.94, 1311.79, 1307.44, 1304.8, 1286.01, 1291.42, 1292.04, 1291.95, 1290.32, 1289.56, 1287.27, 1283.79, 1288.26, 1286.73, 1291.27, 1286.66, 1275.5, 1269.98, 1270.32, 1270.02, 1270.08, 1272.21, 1275.04, 1271.32, 1264.44, 1263.39, 1266.54, 1273.41, 1268.05, 1269.87, 1271.79, 1269.68, 1271.04, 1271.13, 1277.77, 1244.62, 1212.89, 1209.35, 1212.83, 1213.62, 1207.91, 1214.56, 1203.63, 1188.63, 1193.66, 1195.81, 1202.5, 1204.51, 1194.93, 1178.72, 1166.83, 1172.69, 1169.34, 1173.85, 1175.3, 1180.23, 1177.21, 1180.71, 1183.72, 1180.27, 1176.77, 1184.07, 1180.05, 1179.45, 1177.63, 1177.09, 1180.09, 1178.42, 1174.29, 1177.17, 1176.79, 1177.66, 1178.59, 1185.84, 1187.16, 1184.93, 1182.01, 1186.58, 1187.54, 1191.29, 1187.2, 1185.69, 1186.89, 1187.43, 1177.8, 1180.2, 1182.28, 1181.17, 1178.67, 1174.82, 1174.39, 1177.62, 1178.32, 1179.93, 1183.56, 1185.62, 1182.45, 1187.57, 1183.06, 1189.25, 1190.3, 1183.77, 1179.27, 1182.11, 1178.97, 1182.07, 1179.86, 1183.81, 1184.3, 1186.53, 1183.28, 1186.54, 1182.66, 1186.43, 1179.79, 1175.93, 1173.56, 1168.77, 1170.8, 1176.26, 1175.99, 1162.52, 1167.82, 1172.17, 1185.82, 1193.06, 1192.57, 1208.35, 1208.44, 1212.77, 1208.31, 1211.1, 1210.84, 1208.23, 1212.31, 1213.54, 1210.65, 1218.13, 1217.04, 1211.78, 1212.49, 1214.68, 1216.78, 1212.98, 1216.16, 1215.49, 1216.94, 1208.94, 1212.45, 1210.52, 1210.53, 1206.83, 1210.75, 1211.7, 1210.93, 1215.34, 1215.26, 1216.77, 1216.61, 1213.24, 1214.99, 1211.1, 1215.6, 1208.68, 1211.59, 1209.9, 1208.58, 1209.72, 1211.91, 1209.67, 1213.78, 1217.64, 1212.77, 1214.59, 1214.81, 1211.74, 1211.13, 1211.11, 1213.86, 1215.38, 1218.68, 1217.04, 1217.49, 1215.35, 1210.25, 1192.92, 1186.59, 1190.7, 1187.31, 1189.39, 1194.91, 1217.37, 1215.04, 1215.93, 1217.71, 1215.27, 1217.06, 1224.63, 1223.99, 1223.51, 1221.18, 1221.4, 1221.84, 1218.48, 1219.38, 1224.27, 1223.0, 1224.75, 1220.8, 1215.3, 1219.15, 1217.53, 1218.84, 1218.45, 1219.98, 1219.82, 1221.53, 1218.43, 1219.99, 1219.2, 1215.97, 1216.76, 1218.83, 1217.47, 1216.8, 1216.83, 1220.44, 1218.27, 1218.3, 1218.2, 1219.54, 1217.79, 1218.02, 1218.39, 1219.15, 1219.01, 1219.85, 1221.94, 1223.6, 1221.85, 1218.92, 1218.57, 1220.41, 1221.62, 1221.85, 1220.15, 1221.37, 1219.0, 1218.91, 1219.21, 1219.8, 1220.05, 1221.01, 1218.87, 1217.54, 1218.39, 1218.09, 1214.24, 1210.91, 1211.67, 1209.31, 1209.04, 1209.51, 1206.34, 1218.74, 1217.31, 1218.51, 1218.39, 1221.35, 1222.01, 1220.91, 1220.29, 1219.92, 1219.25, 1220.69, 1219.49, 1219.24, 1219.0, 1220.42, 1219.7, 1215.78, 1216.85, 1215.37, 1216.71, 1214.86, 1213.85, 1217.52, 1217.39, 1216.93, 1218.57, 1228.11, 1224.62, 1223.21, 1224.57, 1223.69, 1224.34, 1222.74, 1224.22, 1222.16, 1216.95, 1222.28, 1221.42, 1219.38, 1216.83, 1217.41, 1209.95, 1211.22, 1210.31, 1207.37, 1206.67, 1211.1, 1209.45, 1211.46, 1211.2, 1211.55, 1208.44, 1209.36, 1206.12, 1197.72, 1197.46, 1191.31, 1194.21, 1194.59, 1194.74, 1196.01, 1196.51, 1196.3, 1194.05, 1194.92, 1204.58, 1189.24, 1193.08, 1196.58, 1196.63, 1193.04, 1194.44, 1187.54, 1185.71, 1190.15, 1194.0, 1191.57, 1191.69, 1194.95, 1195.66, 1195.33, 1193.9, 1194.97, 1192.09, 1199.2, 1199.59, 1198.84, 1199.24, 1200.49, 1202.06, 1201.17, 1200.93, 1197.87, 1200.35, 1198.44, 1196.38, 1195.1, 1197.81, 1200.49, 1200.03, 1195.99, 1197.68, 1197.59, 1197.9, 1193.98, 1193.86, 1188.26, 1191.07, 1192.7, 1190.94, 1190.7, 1192.18, 1190.66, 1189.32, 1195.07, 1195.52, 1195.55, 1197.65, 1194.89, 1197.41, 1198.27, 1198.2, 1199.99, 1197.41, 1196.35, 1196.38, 1194.42, 1195.41, 1193.53, 1195.2, 1196.84, 1196.06, 1196.4, 1198.46, 1197.2, 1197.58, 1201.1, 1203.44, 1202.86, 1202.79, 1200.78, 1199.6, 1202.65, 1202.34, 1200.1, 1196.19, 1196.13, 1194.09, 1196.02, 1195.4, 1194.04, 1192.92, 1194.54, 1194.81, 1195.06, 1194.28, 1196.48, 1197.14, 1196.34, 1197.17, 1195.26, 1194.5, 1196.81, 1197.34, 1200.68, 1200.92, 1201.78, 1201.4, 1202.85, 1201.03, 1200.34, 1198.16, 1195.16, 1196.79, 1201.94, 1201.85, 1202.35, 1201.58, 1213.09, 1215.94, 1217.18, 1217.75, 1217.35, 1216.62, 1214.95, 1216.78, 1219.0, 1216.51, 1217.08, 1218.03, 1218.87, 1218.4, 1219.79, 1215.11, 1214.0, 1215.55, 1214.14, 1214.22, 1215.59, 1213.54, 1217.86, 1216.8, 1216.61, 1215.63, 1217.48, 1215.73, 1214.98, 1215.35, 1216.4, 1210.33, 1211.76, 1207.71, 1208.75, 1207.88, 1209.5, 1211.0, 1211.48, 1212.69, 1214.55, 1213.53, 1224.1, 1231.6, 1250.74, 1250.35, 1248.02, 1250.51, 1252.0, 1250.74, 1249.68, 1249.82, 1251.58, 1250.99, 1253.72, 1250.94, 1255.88, 1254.02, 1260.49, 1261.87, 1254.38, 1251.27, 1252.66, 1253.31, 1256.9, 1253.97, 1254.29, 1254.02, 1252.77, 1253.19, 1253.46, 1250.97, 1251.03, 1250.74, 1248.71, 1251.51, 1255.91, 1252.92, 1247.5, 1248.21, 1249.11, 1248.64, 1247.34, 1251.32, 1253.62, 1253.73, 1252.49, 1250.75, 1251.24, 1255.67, 1251.36, 1251.98, 1251.02, 1251.09, 1249.41, 1247.78, 1247.7, 1249.39, 1248.3, 1245.38, 1243.4, 1243.9, 1250.42, 1248.33, 1263.01, 1264.19, 1263.57, 1266.74, 1273.13, 1265.88, 1266.27, 1269.68, 1269.14, 1270.95, 1268.71, 1266.45, 1266.54, 1264.51, 1264.51, 1264.83, 1266.8, 1264.68, 1265.1, 1264.25, 1263.79, 1263.56, 1262.91, 1265.34, 1265.07, 1262.49, 1262.42, 1263.95, 1265.38, 1264.27, 1264.47, 1263.11, 1264.07, 1260.99, 1261.99, 1261.58, 1262.84, 1262.34, 1263.7, 1264.31, 1263.64, 1263.28, 1263.29, 1263.16, 1261.67, 1262.07, 1263.47, 1266.33, 1274.25, 1264.02, 1264.6, 1265.43, 1265.09, 1270.7, 1269.93, 1269.49, 1290.16, 1294.86, 1294.02, 1306.16, 1310.37, 1310.86, 1308.02, 1308.8, 1311.92, 1310.16, 1317.25, 1322.77, 1318.27, 1319.88, 1319.57, 1326.06, 1335.68, 1337.9, 1341.56, 1334.99, 1330.12, 1321.53, 1318.61, 1320.92, 1320.39, 1327.42, 1324.64, 1321.26, 1324.71, 1328.15, 1327.15, 1324.91, 1323.23, 1328.31, 1329.89, 1333.77, 1329.32, 1325.63, 1328.28, 1332.12, 1333.97, 1330.27, 1331.95, 1341.08, 1339.48, 1341.98, 1339.01, 1334.46, 1335.62, 1337.75, 1337.92, 1330.2, 1331.07, 1330.56, 1330.87, 1333.51, 1335.52, 1334.67, 1335.13, 1336.13, 1336.45, 1332.47, 1333.26, 1332.51, 1323.04, 1325.01, 1327.57, 1337.72, 1342.92, 1341.56, 1342.63, 1349.32, 1389.39, 1415.23, 1401.46, 1399.59, 1400.99, 1403.48, 1395.14, 1398.93, 1398.45, 1400.33, 1400.03, 1399.83, 1397.78, 1399.45, 1405.15, 1381.0, 1386.07, 1386.88, 1428.72, 1421.26, 1425.86, 1433.42, 1426.14, 1422.54, 1415.92, 1415.5, 1254.53, 1259.55, 1259.83, 1259.38, 1268.95, 1273.24, 1278.5, 1277.58, 1276.54, 1275.59, 1279.41, 1288.75, 1290.7, 1292.15, 1290.85, 1300.64, 1297.31, 1295.79, 1297.08, 1301.64, 1294.3, 1296.01, 1295.13, 1290.31, 1285.83, 1285.11, 1266.59, 1259.74, 1264.73, 1262.31, 1253.67, 1256.51, 1259.65, 1259.1, 1259.41, 1266.6, 1263.56, 1265.51, 1261.82, 1261.33, 1256.76, 1260.68, 1260.39, 1262.71, 1255.77, 1252.36, 1256.08, 1257.79, 1253.96, 1251.27, 1254.4, 1255.02, 1251.7, 1249.23, 1250.13, 1253.02, 1255.81, 1252.88, 1271.32, 1268.8, 1265.13, 1265.58, 1262.27, 1263.31, 1260.28, 1250.22, 1224.63, 1228.95, 1230.79, 1229.97, 1224.97, 1224.34, 1232.75, 1233.41, 1233.85, 1229.35, 1231.09, 1229.04, 1232.11, 1231.75, 1232.36, 1230.39, 1231.18, 1227.17, 1227.13, 1232.91, 1231.86, 1228.09, 1228.84, 1228.81, 1232.73, 1233.71, 1229.98, 1233.27, 1240.4, 1239.18, 1244.69, 1247.55, 1249.91, 1251.1, 1254.52, 1287.3, 1283.9, 1278.95, 1278.42, 1284.3, 1280.18, 1277.02, 1281.51, 1281.06, 1283.98, 1283.57, 1280.96, 1279.71, 1282.43, 1280.18, 1285.01, 1284.9, 1287.83, 1286.05, 1275.03, 1272.96, 1277.6, 1275.31, 1274.11, 1268.85, 1269.05, 1262.37, 1260.02, 1264.13, 1263.1, 1264.3, 1265.55, 1263.53, 1265.2, 1264.23, 1263.09, 1265.18, 1264.57, 1263.31, 1265.18, 1265.43, 1266.18, 1266.64, 1268.04, 1271.69, 1278.26, 1274.21, 1267.49, 1272.25, 1272.2, 1273.16, 1267.94, 1269.12, 1266.35, 1268.36, 1271.24, 1269.99, 1272.68, 1273.47, 1275.68, 1273.8, 1276.49, 1274.16, 1271.99, 1272.79, 1273.45, 1274.52, 1272.67, 1272.58, 1273.38, 1273.83, 1274.27, 1279.49, 1274.39, 1265.57, 1264.99, 1262.31, 1263.01, 1254.08, 1257.15, 1244.77, 1243.83, 1246.54, 1247.5, 1246.72, 1246.46, 1247.97, 1252.41, 1255.3, 1254.4, 1247.99, 1247.2, 1251.21, 1249.35, 1251.27, 1253.8, 1254.66, 1254.58, 1266.68, 1275.02, 1272.45, 1275.4, 1270.38, 1267.53, 1271.12, 1269.65, 1272.42, 1272.31, 1267.54, 1266.41, 1265.16, 1278.04, 1279.48, 1286.93, 1290.18, 1337.88, 1332.51, 1323.78, 1321.62, 1307.91, 1316.39, 1316.41, 1317.89, 1319.58, 1319.83, 1320.69, 1325.05, 1321.01, 1319.47, 1319.79, 1318.72, 1320.88, 1322.05, 1322.5, 1324.13, 1321.73, 1323.47, 1326.49, 1332.66, 1327.84, 1340.79, 1338.32, 1336.25, 1335.08, 1332.73, 1307.54, 1308.51, 1310.94, 1311.79, 1307.44, 1304.8, 1286.01, 1291.42, 1292.04, 1291.95, 1290.32, 1289.56, 1287.27, 1283.79, 1288.26, 1286.73, 1291.27, 1286.66, 1275.5, 1269.98, 1270.32, 1270.02, 1270.08, 1272.21, 1275.04, 1271.32, 1264.44, 1263.39, 1266.54, 1273.41, 1268.05, 1269.87, 1271.79, 1269.68, 1271.04, 1271.13, 1277.77, 1244.62, 1212.89, 1209.35, 1212.83, 1213.62, 1207.91, 1214.56, 1203.63, 1188.63, 1193.66, 1195.81, 1202.5, 1204.51, 1194.93, 1178.72, 1166.83, 1172.69, 1169.34, 1173.85, 1175.3, 1180.23, 1177.21, 1180.71, 1183.72, 1180.27, 1176.77, 1184.07, 1180.05, 1179.45, 1177.63, 1177.09, 1180.09, 1178.42, 1174.29, 1177.17, 1176.79, 1177.66, 1178.59, 1185.84, 1187.16, 1184.93, 1182.01, 1186.58, 1187.54, 1191.29, 1187.2, 1185.69, 1186.89, 1187.43, 1177.8, 1180.2, 1182.28, 1181.17, 1178.67, 1174.82, 1174.39, 1177.62, 1178.32, 1179.93, 1183.56, 1185.62, 1182.45, 1187.57, 1183.06, 1189.25, 1190.3, 1183.77, 1179.27, 1182.11, 1178.97, 1182.07, 1179.86, 1183.81, 1184.3, 1186.53, 1183.28, 1186.54, 1182.66, 1186.43, 1179.79, 1175.93, 1173.56, 1168.77, 1170.8, 1176.26, 1175.99, 1162.52, 1167.82, 1172.17, 1185.82, 1193.06, 1192.57, 1208.35, 1208.44, 1212.77, 1208.31, 1211.1, 1210.84, 1208.23, 1212.31, 1213.54, 1210.65, 1218.13, 1217.04, 1211.78, 1212.49, 1214.68, 1216.78, 1212.98, 1216.16, 1215.49, 1216.94, 1208.94, 1212.45, 1210.52, 1210.53, 1206.83, 1210.75, 1211.7, 1210.93, 1215.34, 1215.26, 1216.77, 1216.61, 1213.24, 1214.99, 1211.1, 1215.6, 1208.68, 1211.59, 1209.9, 1208.58, 1209.72, 1211.91, 1209.67, 1213.78, 1217.64, 1212.77, 1214.59, 1214.81, 1211.74, 1211.13, 1211.11, 1213.86, 1215.38, 1218.68, 1217.04, 1217.49, 1215.35, 1210.25, 1192.92, 1186.59, 1190.7, 1187.31, 1189.39, 1194.91, 1217.37, 1215.04, 1215.93, 1217.71, 1215.27, 1217.06, 1224.63, 1223.99, 1223.51, 1221.18, 1221.4, 1221.84, 1218.48, 1219.38, 1224.27, 1223.0, 1224.75, 1220.8, 1215.3, 1219.15, 1217.53, 1218.84, 1218.45, 1219.98, 1219.82, 1221.53, 1218.43, 1219.99, 1219.2, 1215.97, 1216.76, 1218.83, 1217.47, 1216.8, 1216.83, 1220.44, 1218.27, 1218.3, 1218.2, 1219.54, 1217.79, 1218.02, 1218.39, 1219.15, 1219.01, 1219.85, 1221.94, 1223.6, 1221.85, 1218.92, 1218.57, 1220.41, 1221.62, 1221.85, 1220.15, 1221.37, 1219.0, 1218.91, 1219.21, 1219.8, 1220.05, 1221.01, 1218.87, 1217.54, 1218.39, 1218.09, 1214.24, 1210.91, 1211.67, 1209.31, 1209.04, 1209.51, 1206.34, 1218.74, 1217.31, 1218.51, 1218.39, 1221.35, 1222.01, 1220.91, 1220.29, 1219.92, 1219.25, 1220.69, 1219.49, 1219.24, 1219.0, 1220.42, 1219.7, 1215.78, 1216.85, 1215.37, 1216.71, 1214.86, 1213.85, 1217.52, 1217.39, 1216.93, 1218.57, 1228.11, 1224.62, 1223.21, 1224.57, 1223.69, 1224.34, 1222.74, 1224.22, 1222.16, 1216.95, 1222.28, 1221.42, 1219.38, 1216.83, 1217.41, 1209.95, 1211.22, 1210.31, 1207.37, 1206.67, 1211.1, 1209.45, 1211.46, 1211.2, 1211.55, 1208.44, 1209.36, 1206.12, 1197.72, 1197.46, 1191.31, 1194.21, 1194.59, 1194.74, 1196.01, 1196.51, 1196.3, 1194.05, 1194.92, 1204.58, 1189.24, 1193.08, 1196.58, 1196.63, 1193.04, 1194.44, 1187.54, 1185.71, 1190.15, 1194.0, 1191.57, 1191.69, 1194.95, 1195.66, 1195.33, 1193.9, 1194.97, 1192.09, 1199.2, 1199.59, 1198.84, 1199.24, 1200.49, 1202.06, 1201.17, 1200.93, 1197.87, 1200.35, 1198.44, 1196.38, 1195.1, 1197.81, 1200.49, 1200.03, 1195.99, 1197.68, 1197.59, 1197.9, 1193.98, 1193.86, 1188.26, 1191.07, 1192.7, 1190.94, 1190.7, 1192.18, 1190.66, 1189.32, 1195.07, 1195.52, 1195.55, 1197.65, 1194.89, 1197.41, 1198.27, 1198.2, 1199.99, 1197.41, 1196.35, 1196.38, 1194.42, 1195.41, 1193.53, 1195.2, 1196.84, 1196.06, 1196.4, 1198.46, 1197.2, 1197.58, 1201.1, 1203.44, 1202.86, 1202.79, 1200.78, 1199.6, 1202.65, 1202.34, 1200.1, 1196.19, 1196.13, 1194.09, 1196.02, 1195.4, 1194.04, 1192.92, 1194.54, 1194.81, 1195.06, 1194.28, 1196.48, 1197.14, 1196.34, 1197.17, 1195.26, 1194.5, 1196.81, 1197.34, 1200.68, 1200.92, 1201.78, 1201.4, 1202.85, 1201.03, 1200.34, 1198.16, 1195.16, 1196.79, 1201.94, 1201.85, 1202.35, 1201.58, 1213.09, 1215.94, 1217.18, 1217.75, 1217.35, 1216.62, 1214.95, 1216.78, 1219.0, 1216.51, 1217.08, 1218.03, 1218.87, 1218.4, 1219.79, 1215.11, 1214.0, 1215.55, 1214.14, 1214.22, 1215.59, 1213.54, 1217.86, 1216.8, 1216.61, 1215.63, 1217.48, 1215.73, 1214.98, 1215.35, 1216.4, 1210.33, 1211.76, 1207.71, 1208.75, 1207.88, 1209.5, 1211.0, 1211.48, 1212.69, 1214.55, 1213.53, 1224.1, 1231.6, 1250.74, 1250.35, 1248.02, 1250.51, 1252.0, 1250.74, 1249.68, 1249.82, 1251.58, 1250.99, 1253.72, 1250.94, 1255.88, 1254.02, 1260.49, 1261.87, 1254.38, 1251.27, 1252.66, 1253.31, 1256.9, 1253.97, 1254.29, 1254.02, 1252.77, 1253.19, 1253.46, 1250.97, 1251.03, 1250.74, 1248.71, 1251.51, 1255.91, 1252.92, 1247.5, 1248.21, 1249.11, 1248.64, 1247.34, 1251.32, 1253.62, 1253.73, 1252.49, 1250.75, 1251.24, 1255.67, 1251.36, 1251.98, 1251.02, 1251.09, 1249.41, 1247.78, 1247.7, 1249.39, 1248.3, 1245.38, 1243.4, 1243.9, 1250.42, 1248.33, 1263.01, 1264.19, 1263.57, 1266.74, 1273.13, 1265.88, 1266.27, 1269.68, 1269.14, 1270.95, 1268.71, 1266.45, 1266.54, 1264.51, 1264.51, 1264.83, 1266.8, 1264.68, 1265.1, 1264.25, 1263.79, 1263.56, 1262.91, 1265.34, 1265.07, 1262.49, 1262.42, 1263.95, 1265.38, 1264.27, 1264.47, 1263.11, 1264.07, 1260.99, 1261.99, 1261.58, 1262.84, 1262.34, 1263.7, 1264.31, 1263.64, 1263.28, 1263.29, 1263.16, 1261.67, 1262.07, 1263.47, 1266.33, 1274.25, 1264.02, 1264.6, 1265.43, 1265.09, 1270.7, 1269.93, 1269.49, 1290.16, 1294.86, 1294.02, 1306.16, 1310.37, 1310.86, 1308.02, 1308.8, 1311.92, 1310.16, 1317.25, 1322.77, 1318.27, 1319.88, 1319.57, 1326.06, 1335.68, 1337.9, 1341.56, 1334.99, 1330.12, 1321.53, 1318.61, 1320.92, 1320.39, 1327.42, 1324.64, 1321.26, 1324.71, 1328.15, 1327.15, 1324.91, 1323.23, 1328.31, 1329.89, 1333.77, 1329.32, 1325.63, 1328.28, 1332.12, 1333.97, 1330.27, 1331.95, 1341.08, 1339.48, 1341.98, 1339.01, 1334.46, 1335.62, 1337.75, 1337.92, 1330.2, 1331.07, 1330.56, 1330.87, 1333.51, 1335.52, 1334.67, 1335.13, 1336.13, 1336.45, 1332.47, 1333.26, 1332.51, 1323.04, 1325.01, 1327.57, 1337.72, 1342.92, 1341.56, 1342.63, 1349.32, 1389.39, 1415.23, 1401.46, 1399.59, 1400.99, 1403.48, 1395.14, 1398.93, 1398.45, 1400.33, 1400.03, 1399.83, 1397.78, 1399.45, 1405.15, 1381.0, 1386.07, 1386.88, 1428.72, 1421.26, 1425.86, 1433.42, 1426.14, 1422.54, 1415.92, 1406.04, 1407.18, 1409.07, 1415.01, 1410.9, 1406.77, 1411.14, 1408.12, 1408.74, 1410.0, 1416.51, 1409.71, 1408.56 ]
- tokenPair: ["BNT", "USDT"]
historical: [ 0.325, 0.324, 0.324, 0.324, 0.325, 0.324, 0.325, 0.326, 0.324, 0.325, 0.325, 0.325, 0.323, 0.323, 0.324, 0.324, 0.325, 0.326, 0.327, 0.33, 0.333, 0.333, 0.334, 0.334, 0.332, 0.351, 0.342, 0.342, 0.353, 0.346, 0.35, 0.363, 0.377, 0.367, 0.363, 0.361, 0.363, 0.363, 0.362, 0.359, 0.358, 0.357, 0.357, 0.355, 0.352, 0.354, 0.358, 0.364, 0.38, 0.385, 0.372, 0.369, 0.367, 0.367, 0.364, 0.362, 0.364, 0.361, 0.361, 0.36, 0.358, 0.356, 0.359, 0.358, 0.357, 0.356, 0.354, 0.358, 0.353, 0.354, 0.356, 0.358, 0.359, 0.36, 0.357, 0.357, 0.358, 0.355, 0.354, 0.354, 0.363, 0.361, 0.364, 0.364, 0.366, 0.375, 0.367, 0.363, 0.363, 0.364, 0.365, 0.363, 0.362, 0.36, 0.361, 0.359, 0.359, 0.36, 0.362, 0.362, 0.363, 0.364, 0.366, 0.366, 0.367, 0.368, 0.368, 0.366, 0.368, 0.368, 0.368, 0.367, 0.367, 0.368, 0.367, 0.37, 0.373, 0.372, 0.37, 0.369, 0.371, 0.372, 0.374, 0.374, 0.372, 0.373, 0.374, 0.375, 0.374, 0.372, 0.372, 0.373, 0.373, 0.372, 0.373, 0.373, 0.371, 0.37, 0.372, 0.374, 0.375, 0.376, 0.378, 0.379, 0.377, 0.378, 0.379, 0.378, 0.377, 0.375, 0.377, 0.377, 0.377, 0.374, 0.376, 0.376, 0.377, 0.377, 0.376, 0.375, 0.376, 0.375, 0.367, 0.367, 0.354, 0.355, 0.356, 0.359, 0.357, 0.358, 0.36, 0.361, 0.36, 0.359, 0.36, 0.358, 0.36, 0.364, 0.358, 0.365, 0.363, 0.362, 0.364, 0.366, 0.364, 0.364, 0.365, 0.365, 0.368, 0.369, 0.369, 0.372, 0.374, 0.373, 0.373, 0.375, 0.374, 0.375, 0.376, 0.376, 0.372, 0.372, 0.376, 0.373, 0.371, 0.373, 0.373, 0.375, 0.375, 0.375, 0.375, 0.386, 0.383, 0.383, 0.38, 0.38, 0.383, 0.382, 0.384, 0.383, 0.382, 0.385, 0.388, 0.386, 0.385, 0.385, 0.385, 0.381, 0.378, 0.382, 0.382, 0.384, 0.388, 0.388, 0.389, 0.388, 0.387, 0.386, 0.387, 0.386, 0.385, 0.385, 0.385, 0.386, 0.386, 0.385, 0.385, 0.391, 0.387, 0.387, 0.383, 0.382, 0.381, 0.381, 0.381, 0.381, 0.381, 0.381, 0.38, 0.383, 0.381, 0.379, 0.379, 0.38, 0.382, 0.382, 0.382, 0.382, 0.382, 0.382, 0.384, 0.383, 0.38, 0.381, 0.382, 0.38, 0.381, 0.381, 0.382, 0.383, 0.384, 0.385, 0.386, 0.386, 0.386, 0.385, 0.385, 0.385, 0.385, 0.382, 0.381, 0.38, 0.38, 0.381, 0.381, 0.381, 0.381, 0.38, 0.382, 0.381, 0.382, 0.381, 0.38, 0.38, 0.378, 0.376, 0.376, 0.378, 0.379, 0.38, 0.379, 0.382, 0.382, 0.382, 0.381, 0.38, 0.379, 0.379, 0.378, 0.379, 0.378, 0.38, 0.382, 0.383, 0.382, 0.383, 0.383, 0.383, 0.383, 0.382, 0.383, 0.383, 0.384, 0.385, 0.385, 0.386, 0.386, 0.385, 0.386, 0.387, 0.385, 0.387, 0.386, 0.384, 0.385, 0.388, 0.384, 0.382, 0.383, 0.384, 0.378, 0.378, 0.379, 0.38, 0.381, 0.381, 0.38, 0.381, 0.38, 0.379, 0.378, 0.378, 0.379, 0.38, 0.378, 0.377, 0.38, 0.381, 0.38, 0.38, 0.382, 0.382, 0.381, 0.381, 0.38, 0.38, 0.381, 0.381, 0.384, 0.384, 0.383, 0.383, 0.383, 0.384, 0.382, 0.378, 0.368, 0.37, 0.372, 0.374, 0.373, 0.371, 0.372, 0.373, 0.371, 0.371, 0.37, 0.37, 0.37, 0.369, 0.369, 0.369, 0.37, 0.368, 0.367, 0.37, 0.369, 0.368, 0.367, 0.368, 0.369, 0.368, 0.368, 0.369, 0.368, 0.368, 0.37, 0.369, 0.371, 0.371, 0.372, 0.376, 0.379, 0.377, 0.378, 0.378, 0.378, 0.376, 0.379, 0.38, 0.379, 0.381, 0.382, 0.382, 0.383, 0.383, 0.385, 0.385, 0.385, 0.383, 0.38, 0.379, 0.38, 0.381, 0.381, 0.38, 0.379, 0.379, 0.375, 0.376, 0.377, 0.377, 0.38, 0.377, 0.377, 0.378, 0.378, 0.378, 0.379, 0.378, 0.377, 0.377, 0.38, 0.377, 0.379, 0.378, 0.378, 0.378, 0.377, 0.378, 0.376, 0.379, 0.378, 0.375, 0.378, 0.38, 0.379, 0.38, 0.38, 0.381, 0.381, 0.382, 0.383, 0.383, 0.38, 0.381, 0.389, 0.387, 0.383, 0.383, 0.382, 0.385, 0.383, 0.384, 0.387, 0.38, 0.38, 0.378, 0.377, 0.373, 0.373, 0.367, 0.367, 0.369, 0.37, 0.369, 0.368, 0.366, 0.367, 0.368, 0.368, 0.366, 0.365, 0.368, 0.366, 0.369, 0.368, 0.369, 0.368, 0.37, 0.372, 0.372, 0.372, 0.371, 0.37, 0.369, 0.368, 0.369, 0.369, 0.367, 0.364, 0.364, 0.368, 0.37, 0.369, 0.369, 0.382, 0.379, 0.375, 0.376, 0.372, 0.374, 0.374, 0.373, 0.375, 0.374, 0.375, 0.376, 0.375, 0.373, 0.375, 0.374, 0.375, 0.374, 0.375, 0.376, 0.375, 0.376, 0.376, 0.379, 0.377, 0.379, 0.379, 0.379, 0.377, 0.375, 0.371, 0.37, 0.37, 0.371, 0.37, 0.369, 0.365, 0.369, 0.371, 0.371, 0.37, 0.369, 0.37, 0.37, 0.37, 0.368, 0.37, 0.368, 0.366, 0.365, 0.365, 0.365, 0.364, 0.362, 0.363, 0.363, 0.361, 0.36, 0.361, 0.362, 0.362, 0.362, 0.362, 0.363, 0.362, 0.363, 0.364, 0.358, 0.351, 0.349, 0.35, 0.352, 0.352, 0.354, 0.352, 0.35, 0.351, 0.351, 0.351, 0.354, 0.35, 0.339, 0.336, 0.336, 0.334, 0.335, 0.334, 0.335, 0.335, 0.337, 0.339, 0.34, 0.347, 0.349, 0.347, 0.343, 0.342, 0.342, 0.343, 0.341, 0.34, 0.339, 0.34, 0.34, 0.34, 0.342, 0.344, 0.345, 0.341, 0.343, 0.343, 0.346, 0.346, 0.345, 0.349, 0.351, 0.348, 0.347, 0.346, 0.347, 0.346, 0.344, 0.345, 0.344, 0.345, 0.346, 0.346, 0.35, 0.347, 0.348, 0.346, 0.348, 0.347, 0.345, 0.344, 0.346, 0.345, 0.346, 0.346, 0.349, 0.349, 0.35, 0.349, 0.351, 0.351, 0.349, 0.349, 0.345, 0.344, 0.339, 0.34, 0.344, 0.341, 0.333, 0.337, 0.34, 0.342, 0.345, 0.347, 0.348, 0.348, 0.351, 0.351, 0.351, 0.35, 0.351, 0.351, 0.35, 0.349, 0.351, 0.352, 0.35, 0.349, 0.349, 0.35, 0.349, 0.349, 0.349, 0.35, 0.345, 0.346, 0.346, 0.344, 0.344, 0.345, 0.344, 0.345, 0.346, 0.345, 0.346, 0.346, 0.346, 0.346, 0.345, 0.346, 0.345, 0.346, 0.345, 0.342, 0.343, 0.343, 0.343, 0.344, 0.345, 0.343, 0.343, 0.343, 0.343, 0.344, 0.343, 0.343, 0.344, 0.344, 0.344, 0.345, 0.345, 0.344, 0.34, 0.338, 0.34, 0.339, 0.338, 0.339, 0.345, 0.345, 0.346, 0.347, 0.347, 0.348, 0.349, 0.349, 0.349, 0.349, 0.348, 0.349, 0.348, 0.348, 0.349, 0.348, 0.349, 0.347, 0.346, 0.348, 0.347, 0.348, 0.346, 0.347, 0.346, 0.345, 0.344, 0.344, 0.345, 0.345, 0.344, 0.344, 0.344, 0.344, 0.344, 0.343, 0.342, 0.343, 0.343, 0.343, 0.342, 0.342, 0.344, 0.343, 0.343, 0.344, 0.343, 0.344, 0.343, 0.343, 0.343, 0.343, 0.343, 0.343, 0.344, 0.344, 0.343, 0.343, 0.343, 0.345, 0.344, 0.344, 0.343, 0.343, 0.344, 0.343, 0.341, 0.34, 0.34, 0.339, 0.338, 0.339, 0.338, 0.34, 0.338, 0.34, 0.343, 0.343, 0.344, 0.343, 0.342, 0.343, 0.341, 0.343, 0.342, 0.341, 0.343, 0.344, 0.345, 0.344, 0.344, 0.343, 0.342, 0.343, 0.343, 0.343, 0.341, 0.341, 0.341, 0.343, 0.342, 0.342, 0.342, 0.343, 0.342, 0.343, 0.344, 0.343, 0.342, 0.343, 0.342, 0.342, 0.343, 0.342, 0.34, 0.34, 0.339, 0.338, 0.337, 0.337, 0.337, 0.338, 0.337, 0.339, 0.337, 0.337, 0.335, 0.334, 0.334, 0.33, 0.33, 0.332, 0.331, 0.331, 0.331, 0.332, 0.332, 0.333, 0.336, 0.332, 0.333, 0.333, 0.333, 0.332, 0.333, 0.33, 0.328, 0.329, 0.329, 0.328, 0.328, 0.33, 0.331, 0.332, 0.331, 0.332, 0.33, 0.331, 0.331, 0.33, 0.33, 0.331, 0.331, 0.332, 0.331, 0.331, 0.331, 0.331, 0.327, 0.327, 0.328, 0.33, 0.33, 0.328, 0.328, 0.329, 0.328, 0.327, 0.327, 0.325, 0.323, 0.325, 0.323, 0.323, 0.324, 0.323, 0.322, 0.325, 0.324, 0.325, 0.324, 0.324, 0.324, 0.325, 0.324, 0.325, 0.326, 0.324, 0.325, 0.325, 0.325, 0.323, 0.323, 0.324, 0.324, 0.325, 0.326, 0.327, 0.33, 0.333, 0.333, 0.334, 0.334, 0.332, 0.351, 0.342, 0.342, 0.353, 0.346, 0.35, 0.363, 0.377, 0.367, 0.363, 0.361, 0.363, 0.363, 0.362, 0.359, 0.358, 0.357, 0.357, 0.355, 0.352, 0.354, 0.358, 0.364, 0.38, 0.385, 0.372, 0.369, 0.367, 0.367, 0.364, 0.362, 0.364, 0.361, 0.361, 0.36, 0.358, 0.356, 0.359, 0.358, 0.357, 0.356, 0.354, 0.358, 0.353, 0.354, 0.356, 0.358, 0.359, 0.36, 0.357, 0.357, 0.358, 0.355, 0.354, 0.352, 0.35, 0.352, 0.351, 0.353, 0.353, 0.354, 0.354, 0.351, 0.352, 0.35, 0.35, 0.35, 0.367, 0.368, 0.368, 0.366, 0.368, 0.368, 0.368, 0.367, 0.367, 0.368, 0.367, 0.37, 0.373, 0.372, 0.37, 0.369, 0.371, 0.372, 0.374, 0.374, 0.372, 0.373, 0.374, 0.375, 0.374, 0.372, 0.372, 0.373, 0.373, 0.372, 0.373, 0.373, 0.371, 0.37, 0.372, 0.374, 0.375, 0.376, 0.378, 0.379, 0.377, 0.378, 0.379, 0.378, 0.377, 0.375, 0.377, 0.377, 0.377, 0.374, 0.376, 0.376, 0.377, 0.377, 0.376, 0.375, 0.376, 0.375, 0.367, 0.367, 0.354, 0.355, 0.356, 0.359, 0.357, 0.358, 0.36, 0.361, 0.36, 0.359, 0.36, 0.358, 0.36, 0.364, 0.358, 0.365, 0.363, 0.362, 0.364, 0.366, 0.364, 0.364, 0.365, 0.365, 0.368, 0.369, 0.369, 0.372, 0.374, 0.373, 0.373, 0.375, 0.374, 0.375, 0.376, 0.376, 0.372, 0.372, 0.376, 0.373, 0.371, 0.373, 0.373, 0.375, 0.375, 0.375, 0.375, 0.386, 0.383, 0.383, 0.38, 0.38, 0.383, 0.382, 0.384, 0.383, 0.382, 0.385, 0.388, 0.386, 0.385, 0.385, 0.385, 0.381, 0.378, 0.382, 0.382, 0.384, 0.388, 0.388, 0.389, 0.388, 0.387, 0.386, 0.387, 0.386, 0.385, 0.385, 0.385, 0.386, 0.386, 0.385, 0.385, 0.391, 0.387, 0.387, 0.383, 0.382, 0.381, 0.381, 0.381, 0.381, 0.381, 0.381, 0.38, 0.383, 0.381, 0.379, 0.379, 0.38, 0.382, 0.382, 0.382, 0.382, 0.382, 0.382, 0.384, 0.383, 0.38, 0.381, 0.382, 0.38, 0.381, 0.381, 0.382, 0.383, 0.384, 0.385, 0.386, 0.386, 0.386, 0.385, 0.385, 0.385, 0.385, 0.382, 0.381, 0.38, 0.38, 0.381, 0.381, 0.381, 0.381, 0.38, 0.382, 0.381, 0.382, 0.381, 0.38, 0.38, 0.378, 0.376, 0.376, 0.378, 0.379, 0.38, 0.379, 0.382, 0.382, 0.382, 0.381, 0.38, 0.379, 0.379, 0.378, 0.379, 0.378, 0.38, 0.382, 0.383, 0.382, 0.383, 0.383, 0.383, 0.383, 0.382, 0.383, 0.383, 0.384, 0.385, 0.385, 0.386, 0.386, 0.385, 0.386, 0.387, 0.385, 0.387, 0.386, 0.384, 0.385, 0.388, 0.384, 0.382, 0.383, 0.384, 0.378, 0.378, 0.379, 0.38, 0.381, 0.381, 0.38, 0.381, 0.38, 0.379, 0.378, 0.378, 0.379, 0.38, 0.378, 0.377, 0.38, 0.381, 0.38, 0.38, 0.382, 0.382, 0.381, 0.381, 0.38, 0.38, 0.381, 0.381, 0.384, 0.384, 0.383, 0.383, 0.383, 0.384, 0.382, 0.378, 0.368, 0.37, 0.372, 0.374, 0.373, 0.371, 0.372, 0.373, 0.371, 0.371, 0.37, 0.37, 0.37, 0.369, 0.369, 0.369, 0.37, 0.368, 0.367, 0.37, 0.369, 0.368, 0.367, 0.368, 0.369, 0.368, 0.368, 0.369, 0.368, 0.368, 0.37, 0.369, 0.371, 0.371, 0.372, 0.376, 0.379, 0.377, 0.378, 0.378, 0.378, 0.376, 0.379, 0.38, 0.379, 0.381, 0.382, 0.382, 0.383, 0.383, 0.385, 0.385, 0.385, 0.383, 0.38, 0.379, 0.38, 0.381, 0.381, 0.38, 0.379, 0.379, 0.375, 0.376, 0.377, 0.377, 0.38, 0.377, 0.377, 0.378, 0.378, 0.378, 0.379, 0.378, 0.377, 0.377, 0.38, 0.377, 0.379, 0.378, 0.378, 0.378, 0.377, 0.378, 0.376, 0.379, 0.378, 0.375, 0.378, 0.38, 0.379, 0.38, 0.38, 0.381, 0.381, 0.382, 0.383, 0.383, 0.38, 0.381, 0.389, 0.387, 0.383, 0.383, 0.382, 0.385, 0.383, 0.384, 0.387, 0.38, 0.38, 0.378, 0.377, 0.373, 0.373, 0.367, 0.367, 0.369, 0.37, 0.369, 0.368, 0.366, 0.367, 0.368, 0.368, 0.366, 0.365, 0.368, 0.366, 0.369, 0.368, 0.369, 0.368, 0.37, 0.372, 0.372, 0.372, 0.371, 0.37, 0.369, 0.368, 0.369, 0.369, 0.367, 0.364, 0.364, 0.368, 0.37, 0.369, 0.369, 0.382, 0.379, 0.375, 0.376, 0.372, 0.374, 0.374, 0.373, 0.375, 0.374, 0.375, 0.376, 0.375, 0.373, 0.375, 0.374, 0.375, 0.374, 0.375, 0.376, 0.375, 0.376, 0.376, 0.379, 0.377, 0.379, 0.379, 0.379, 0.377, 0.375, 0.371, 0.37, 0.37, 0.371, 0.37, 0.369, 0.365, 0.369, 0.371, 0.371, 0.37, 0.369, 0.37, 0.37, 0.37, 0.368, 0.37, 0.368, 0.366, 0.365, 0.365, 0.365, 0.364, 0.362, 0.363, 0.363, 0.361, 0.36, 0.361, 0.362, 0.362, 0.362, 0.362, 0.363, 0.362, 0.363, 0.364, 0.358, 0.351, 0.349, 0.35, 0.352, 0.352, 0.354, 0.352, 0.35, 0.351, 0.351, 0.351, 0.354, 0.35, 0.339, 0.336, 0.336, 0.334, 0.335, 0.334, 0.335, 0.335, 0.337, 0.339, 0.34, 0.347, 0.349, 0.347, 0.343, 0.342, 0.342, 0.343, 0.341, 0.34, 0.339, 0.34, 0.34, 0.34, 0.342, 0.344, 0.345, 0.341, 0.343, 0.343, 0.346, 0.346, 0.345, 0.349, 0.351, 0.348, 0.347, 0.346, 0.347, 0.346, 0.344, 0.345, 0.344, 0.345, 0.346, 0.346, 0.35, 0.347, 0.348, 0.346, 0.348, 0.347, 0.345, 0.344, 0.346, 0.345, 0.346, 0.346, 0.349, 0.349, 0.35, 0.349, 0.351, 0.351, 0.349, 0.349, 0.345, 0.344, 0.339, 0.34, 0.344, 0.341, 0.333, 0.337, 0.34, 0.342, 0.345, 0.347, 0.348, 0.348, 0.351, 0.351, 0.351, 0.35, 0.351, 0.351, 0.35, 0.349, 0.351, 0.352, 0.35, 0.349, 0.349, 0.35, 0.349, 0.349, 0.349, 0.35, 0.345, 0.346, 0.346, 0.344, 0.344, 0.345, 0.344, 0.345, 0.346, 0.345, 0.346, 0.346, 0.346, 0.346, 0.345, 0.346, 0.345, 0.346, 0.345, 0.342, 0.343, 0.343, 0.343, 0.344, 0.345, 0.343, 0.343, 0.343, 0.343, 0.344, 0.343, 0.343, 0.344, 0.344, 0.344, 0.345, 0.345, 0.344, 0.34, 0.338, 0.34, 0.339, 0.338, 0.339, 0.345, 0.345, 0.346, 0.347, 0.347, 0.348, 0.349, 0.349, 0.349, 0.349, 0.348, 0.349, 0.348, 0.348, 0.349, 0.348, 0.349, 0.347, 0.346, 0.348, 0.347, 0.348, 0.346, 0.347, 0.346, 0.345, 0.344, 0.344, 0.345, 0.345, 0.344, 0.344, 0.344, 0.344, 0.344, 0.343, 0.342, 0.343, 0.343, 0.343, 0.342, 0.342, 0.344, 0.343, 0.343, 0.344, 0.343, 0.344, 0.343, 0.343, 0.343, 0.343, 0.343, 0.343, 0.344, 0.344, 0.343, 0.343, 0.343, 0.345, 0.344, 0.344, 0.343, 0.343, 0.344, 0.343, 0.341, 0.34, 0.34, 0.339, 0.338, 0.339, 0.338, 0.34, 0.338, 0.34, 0.343, 0.343, 0.344, 0.343, 0.342, 0.343, 0.341, 0.343, 0.342, 0.341, 0.343, 0.344, 0.345, 0.344, 0.344, 0.343, 0.342, 0.343, 0.343, 0.343, 0.341, 0.341, 0.341, 0.343, 0.342, 0.342, 0.342, 0.343, 0.342, 0.343, 0.344, 0.343, 0.342, 0.343, 0.342, 0.342, 0.343, 0.342, 0.34, 0.34, 0.339, 0.338, 0.337, 0.337, 0.337, 0.338, 0.337, 0.339, 0.337, 0.337, 0.335, 0.334, 0.334, 0.33, 0.33, 0.332, 0.331, 0.331, 0.331, 0.332, 0.332, 0.333, 0.336, 0.332, 0.333, 0.333, 0.333, 0.332, 0.333, 0.33, 0.328, 0.329, 0.329, 0.328, 0.328, 0.33, 0.331, 0.332, 0.331, 0.332, 0.33, 0.331, 0.331, 0.33, 0.33, 0.331, 0.331, 0.332, 0.331, 0.331, 0.331, 0.331, 0.327, 0.327, 0.328, 0.33, 0.33, 0.328, 0.328, 0.329, 0.328, 0.327, 0.327, 0.325, 0.323, 0.325, 0.323, 0.323, 0.324, 0.323, 0.322, 0.325, 0.324, 0.325, 0.324, 0.324, 0.324, 0.325, 0.324, 0.325, 0.326, 0.324, 0.325, 0.325, 0.325, 0.323, 0.323, 0.324, 0.324, 0.325, 0.326, 0.327, 0.33, 0.333, 0.333, 0.334, 0.334, 0.332, 0.351, 0.342, 0.342, 0.353, 0.346, 0.35, 0.363, 0.377, 0.367, 0.363, 0.361, 0.363, 0.363, 0.362, 0.359, 0.358, 0.357, 0.357, 0.355, 0.352, 0.354, 0.358, 0.364, 0.38, 0.385, 0.372, 0.369, 0.367, 0.367, 0.364, 0.362, 0.364, 0.361, 0.361, 0.36, 0.358, 0.356, 0.359, 0.358, 0.357, 0.356, 0.354, 0.358, 0.353, 0.354, 0.356, 0.358, 0.359, 0.36, 0.357, 0.357, 0.358, 0.355, 0.354, 0.352, 0.35, 0.352, 0.351, 0.353, 0.353, 0.354, 0.354, 0.351, 0.352, 0.35, 0.35, 0.349, 0.348, 0.348, 0.346, 0.344, 0.345, 0.347, 0.346, 0.346, 0.346, 0.347, 0.349, 0.348, 0.349, 0.352, 0.354, 0.353, 0.351, 0.353, 0.353, 0.353, 0.352, 0.351, 0.352, 0.352 ]
- tokenPair: ["USDT", "DAI"]
historical: [ 0.9999, 0.9999, 1.0, 0.9999, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 0.9998, 0.9998, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9997, 0.9998, 0.9998, 0.9998, 0.9996, 0.9997, 0.9997, 0.9997, 0.9998, 1.0, 0.9998, 0.9989, 0.9995, 0.9995, 0.9995, 0.9996, 0.9996, 0.9997, 0.9998, 0.9999, 0.9997, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9997, 0.9997, 0.9998, 0.9998, 0.9999, 1.0, 1.0, 1.0, 1.0, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0002, 1.0002, 0.9992, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9992, 0.9991, 0.9991, 0.9992, 0.9992, 0.9991, 0.9994, 0.9994, 0.9994, 0.9995, 0.9995, 0.9996, 0.9996, 0.9995, 0.9996, 0.9993, 0.9993, 0.9994, 0.9993, 0.9994, 0.9994, 0.9994, 0.9995, 0.9995, 0.9996, 0.9995, 0.9995, 0.9995, 0.9995, 0.9996, 0.9997, 0.9996, 0.9996, 0.9994, 0.9993, 0.9994, 0.9994, 0.9994, 0.9994, 0.9994, 0.9995, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9996, 0.9994, 0.9995, 0.9994, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9997, 0.9997, 0.9997, 0.9996, 0.9996, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9997, 0.9998, 0.9998, 0.9999, 0.9998, 0.9999, 0.9999, 0.9999, 0.9998, 0.9997, 0.9997, 0.9998, 0.9996, 0.9995, 0.9995, 0.9997, 0.9997, 0.9998, 0.9997, 0.9997, 0.9995, 0.9995, 0.9997, 0.9997, 0.9998, 0.9996, 0.9994, 1.0, 1.0002, 1.0002, 1.0003, 1.0002, 1.0004, 1.0, 1.0, 1.0, 0.9999, 1.0002, 0.9998, 0.9999, 1.0, 1.0, 0.9998, 0.9997, 1.0001, 1.0003, 1.0002, 1.0001, 1.0001, 1.0001, 1.0002, 1.0001, 1.0003, 1.0002, 1.0003, 1.0005, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0002, 1.0005, 1.0003, 1.0003, 1.0004, 1.0003, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0002, 1.0003, 1.0003, 1.0003, 1.0002, 1.0001, 1.0001, 1.0002, 1.0003, 1.0003, 1.0004, 1.0005, 1.0002, 1.0001, 1.0002, 1.0002, 1.0001, 1.0, 1.0, 0.9999, 1.0001, 1.0001, 1.0, 1.0, 1.0001, 1.0, 1.0004, 1.0003, 1.0003, 1.0002, 1.0, 1.0002, 1.0002, 1.0003, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0005, 1.0004, 1.0005, 1.0004, 1.0005, 1.0005, 1.0005, 1.0005, 1.0003, 1.0003, 1.0005, 1.0004, 1.0003, 1.0004, 1.0003, 1.0003, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0004, 1.0003, 1.0003, 1.0004, 1.0004, 1.0003, 1.0001, 1.0001, 1.0001, 1.0001, 1.0002, 1.0003, 1.0003, 1.0002, 1.0002, 1.0001, 1.0, 1.0, 1.0001, 1.0, 1.0001, 1.0001, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0002, 1.0003, 1.0003, 1.0003, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0001, 1.0002, 1.0002, 1.0001, 1.0001, 1.0004, 1.0006, 1.0004, 1.0005, 1.0005, 1.0005, 1.0005, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0002, 1.0003, 1.0003, 1.0003, 1.0002, 1.0001, 1.0002, 1.0002, 1.0002, 1.0004, 1.0003, 1.0003, 1.0004, 1.0004, 1.0005, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0004, 1.0004, 1.0003, 1.0005, 1.0004, 1.0004, 1.0006, 1.0003, 1.0004, 1.0005, 1.0002, 1.0003, 1.0002, 1.0004, 1.0003, 1.0003, 1.0005, 1.0003, 1.0002, 1.0002, 1.0006, 1.0004, 1.0003, 1.0004, 1.0003, 1.0002, 1.0002, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0005, 1.0005, 1.0004, 1.0004, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0002, 1.0001, 1.0, 0.9999, 1.0, 1.0001, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 1.0, 1.0001, 1.0001, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0002, 1.0003, 1.0003, 1.0002, 1.0003, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0004, 1.0003, 1.0002, 1.0004, 1.0004, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0002, 1.0003, 1.0002, 1.0001, 1.0001, 1.0003, 1.0003, 1.0002, 1.0004, 1.0002, 1.0003, 1.0003, 1.0003, 1.0002, 1.0003, 1.0004, 1.0002, 1.0004, 1.0001, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 0.9999, 1.0, 1.0, 1.0001, 1.0, 0.9999, 1.0, 1.0, 1.0, 1.0001, 0.9999, 1.0002, 1.0002, 1.0, 1.0001, 1.0007, 1.0007, 1.0006, 1.0008, 1.0004, 1.0002, 0.9994, 0.9994, 0.9996, 0.9996, 0.9997, 0.9996, 0.9998, 0.9999, 1.0004, 1.0005, 1.0006, 1.0006, 1.0004, 1.0003, 1.0001, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0003, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 0.9999, 1.0001, 1.0, 1.0, 1.0001, 1.0001, 1.0001, 1.0002, 1.0003, 1.0003, 1.0005, 1.0004, 1.0004, 1.0003, 1.0004, 1.0005, 1.0005, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0004, 1.0001, 1.0, 1.0005, 1.0005, 1.0003, 1.0004, 1.0003, 1.0004, 1.0004, 1.0005, 1.0004, 1.0003, 0.9998, 0.9999, 0.9998, 0.9999, 1.0001, 1.0001, 1.0001, 1.0, 1.0, 1.0001, 1.0001, 1.0001, 1.0001, 1.0, 1.0, 1.0002, 1.0001, 1.0002, 0.9998, 0.9999, 0.9999, 0.9998, 0.9999, 0.9999, 1.0, 1.0, 1.0, 0.9999, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 1.0001, 0.9998, 0.9999, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 1.0, 1.0002, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0003, 1.0003, 1.0004, 1.0005, 1.0006, 1.0005, 1.0002, 1.0006, 1.0005, 1.0003, 1.0004, 1.0003, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 0.9998, 0.9997, 0.9998, 0.9995, 0.9995, 0.9996, 0.9999, 0.9999, 0.9999, 0.9997, 0.9996, 0.9995, 0.9997, 1.0, 1.0, 0.9999, 0.9999, 1.0, 0.9999, 0.9998, 1.0, 1.0001, 1.0003, 1.0003, 1.0002, 1.0, 1.0001, 1.0, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0003, 1.0004, 1.0004, 1.0004, 1.0006, 1.0005, 1.0003, 1.0004, 1.0002, 1.0004, 1.0003, 1.0003, 1.0003, 1.0002, 0.9995, 0.9997, 0.9998, 0.9999, 0.9999, 1.0001, 1.0001, 1.0001, 1.0001, 0.9998, 0.9999, 1.0004, 1.0004, 1.0004, 1.0002, 1.0001, 0.9998, 1.0, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9997, 0.9997, 0.9997, 0.9996, 0.9996, 0.9996, 0.9996, 0.9998, 0.9997, 0.9997, 1.0, 1.0, 1.0003, 1.0005, 1.0006, 1.0005, 1.0006, 1.0004, 1.0003, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0005, 1.0004, 1.0005, 1.0004, 1.0005, 1.0005, 1.0005, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0003, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0003, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0001, 1.0003, 1.0001, 1.0002, 1.0001, 1.0001, 1.0, 1.0002, 1.0002, 1.0001, 1.0001, 1.0001, 1.0, 1.0004, 1.0003, 1.0003, 1.0003, 1.0004, 1.0005, 1.0004, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0001, 1.0003, 1.0003, 1.0001, 1.0001, 1.0003, 1.0002, 1.0003, 0.9999, 1.0, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0002, 1.0002, 1.0003, 1.0003, 1.0003, 1.0001, 1.0, 1.0, 1.0001, 0.9999, 1.0, 1.0, 0.9999, 1.0, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9998, 0.9997, 0.9996, 0.9997, 0.9997, 0.9997, 0.9996, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9996, 0.9997, 1.0, 1.0002, 1.0001, 1.0002, 1.0001, 1.0001, 1.0001, 1.0001, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 1.0, 0.9999, 0.9999, 1.0, 0.9999, 1.0, 0.9999, 0.9999, 0.9997, 1.0, 1.0, 1.0001, 1.0001, 0.9999, 1.0, 0.9997, 0.9999, 0.9999, 1.0, 0.9999, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 0.9998, 0.9998, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9997, 0.9998, 0.9998, 0.9998, 0.9996, 0.9997, 0.9997, 0.9997, 0.9998, 1.0, 0.9998, 0.9989, 0.9995, 0.9995, 0.9995, 0.9996, 0.9996, 0.9997, 0.9998, 0.9999, 0.9997, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9997, 0.9997, 0.9998, 0.9998, 0.9999, 1.0, 1.0, 1.0, 1.0, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0002, 1.0001, 1.0001, 1.0001, 1.0001, 1.0, 1.0, 0.9999, 1.0, 1.0, 1.0, 1.0001, 1.0, 1.0, 0.9994, 0.9993, 0.9994, 0.9994, 0.9994, 0.9995, 0.9995, 0.9996, 0.9995, 0.9995, 0.9995, 0.9995, 0.9996, 0.9997, 0.9996, 0.9996, 0.9994, 0.9993, 0.9994, 0.9994, 0.9994, 0.9994, 0.9994, 0.9995, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9996, 0.9994, 0.9995, 0.9994, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9995, 0.9997, 0.9997, 0.9997, 0.9996, 0.9996, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9997, 0.9998, 0.9998, 0.9999, 0.9998, 0.9999, 0.9999, 0.9999, 0.9998, 0.9997, 0.9997, 0.9998, 0.9996, 0.9995, 0.9995, 0.9997, 0.9997, 0.9998, 0.9997, 0.9997, 0.9995, 0.9995, 0.9997, 0.9997, 0.9998, 0.9996, 0.9994, 1.0, 1.0002, 1.0002, 1.0003, 1.0002, 1.0004, 1.0, 1.0, 1.0, 0.9999, 1.0002, 0.9998, 0.9999, 1.0, 1.0, 0.9998, 0.9997, 1.0001, 1.0003, 1.0002, 1.0001, 1.0001, 1.0001, 1.0002, 1.0001, 1.0003, 1.0002, 1.0003, 1.0005, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0002, 1.0005, 1.0003, 1.0003, 1.0004, 1.0003, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0002, 1.0003, 1.0003, 1.0003, 1.0002, 1.0001, 1.0001, 1.0002, 1.0003, 1.0003, 1.0004, 1.0005, 1.0002, 1.0001, 1.0002, 1.0002, 1.0001, 1.0, 1.0, 0.9999, 1.0001, 1.0001, 1.0, 1.0, 1.0001, 1.0, 1.0004, 1.0003, 1.0003, 1.0002, 1.0, 1.0002, 1.0002, 1.0003, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0005, 1.0004, 1.0005, 1.0004, 1.0005, 1.0005, 1.0005, 1.0005, 1.0003, 1.0003, 1.0005, 1.0004, 1.0003, 1.0004, 1.0003, 1.0003, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0004, 1.0003, 1.0003, 1.0004, 1.0004, 1.0003, 1.0001, 1.0001, 1.0001, 1.0001, 1.0002, 1.0003, 1.0003, 1.0002, 1.0002, 1.0001, 1.0, 1.0, 1.0001, 1.0, 1.0001, 1.0001, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0002, 1.0003, 1.0003, 1.0003, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0001, 1.0002, 1.0002, 1.0001, 1.0001, 1.0004, 1.0006, 1.0004, 1.0005, 1.0005, 1.0005, 1.0005, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0002, 1.0003, 1.0003, 1.0003, 1.0002, 1.0001, 1.0002, 1.0002, 1.0002, 1.0004, 1.0003, 1.0003, 1.0004, 1.0004, 1.0005, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0004, 1.0004, 1.0003, 1.0005, 1.0004, 1.0004, 1.0006, 1.0003, 1.0004, 1.0005, 1.0002, 1.0003, 1.0002, 1.0004, 1.0003, 1.0003, 1.0005, 1.0003, 1.0002, 1.0002, 1.0006, 1.0004, 1.0003, 1.0004, 1.0003, 1.0002, 1.0002, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0005, 1.0005, 1.0004, 1.0004, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0002, 1.0001, 1.0, 0.9999, 1.0, 1.0001, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 1.0, 1.0001, 1.0001, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0002, 1.0003, 1.0003, 1.0002, 1.0003, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0004, 1.0003, 1.0002, 1.0004, 1.0004, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0002, 1.0003, 1.0002, 1.0001, 1.0001, 1.0003, 1.0003, 1.0002, 1.0004, 1.0002, 1.0003, 1.0003, 1.0003, 1.0002, 1.0003, 1.0004, 1.0002, 1.0004, 1.0001, 1.0001, 1.0001, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 0.9999, 1.0, 1.0, 1.0001, 1.0, 0.9999, 1.0, 1.0, 1.0, 1.0001, 0.9999, 1.0002, 1.0002, 1.0, 1.0001, 1.0007, 1.0007, 1.0006, 1.0008, 1.0004, 1.0002, 0.9994, 0.9994, 0.9996, 0.9996, 0.9997, 0.9996, 0.9998, 0.9999, 1.0004, 1.0005, 1.0006, 1.0006, 1.0004, 1.0003, 1.0001, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0003, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 0.9999, 1.0001, 1.0, 1.0, 1.0001, 1.0001, 1.0001, 1.0002, 1.0003, 1.0003, 1.0005, 1.0004, 1.0004, 1.0003, 1.0004, 1.0005, 1.0005, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0004, 1.0001, 1.0, 1.0005, 1.0005, 1.0003, 1.0004, 1.0003, 1.0004, 1.0004, 1.0005, 1.0004, 1.0003, 0.9998, 0.9999, 0.9998, 0.9999, 1.0001, 1.0001, 1.0001, 1.0, 1.0, 1.0001, 1.0001, 1.0001, 1.0001, 1.0, 1.0, 1.0002, 1.0001, 1.0002, 0.9998, 0.9999, 0.9999, 0.9998, 0.9999, 0.9999, 1.0, 1.0, 1.0, 0.9999, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 1.0001, 0.9998, 0.9999, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 1.0, 1.0002, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0003, 1.0003, 1.0004, 1.0005, 1.0006, 1.0005, 1.0002, 1.0006, 1.0005, 1.0003, 1.0004, 1.0003, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 0.9998, 0.9997, 0.9998, 0.9995, 0.9995, 0.9996, 0.9999, 0.9999, 0.9999, 0.9997, 0.9996, 0.9995, 0.9997, 1.0, 1.0, 0.9999, 0.9999, 1.0, 0.9999, 0.9998, 1.0, 1.0001, 1.0003, 1.0003, 1.0002, 1.0, 1.0001, 1.0, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0003, 1.0004, 1.0004, 1.0004, 1.0006, 1.0005, 1.0003, 1.0004, 1.0002, 1.0004, 1.0003, 1.0003, 1.0003, 1.0002, 0.9995, 0.9997, 0.9998, 0.9999, 0.9999, 1.0001, 1.0001, 1.0001, 1.0001, 0.9998, 0.9999, 1.0004, 1.0004, 1.0004, 1.0002, 1.0001, 0.9998, 1.0, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9996, 0.9997, 0.9997, 0.9997, 0.9996, 0.9996, 0.9996, 0.9996, 0.9998, 0.9997, 0.9997, 1.0, 1.0, 1.0003, 1.0005, 1.0006, 1.0005, 1.0006, 1.0004, 1.0003, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0005, 1.0004, 1.0005, 1.0004, 1.0005, 1.0005, 1.0005, 1.0004, 1.0004, 1.0004, 1.0004, 1.0004, 1.0003, 1.0004, 1.0003, 1.0003, 1.0003, 1.0002, 1.0002, 1.0002, 1.0003, 1.0002, 1.0003, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0003, 1.0002, 1.0002, 1.0001, 1.0003, 1.0001, 1.0002, 1.0001, 1.0001, 1.0, 1.0002, 1.0002, 1.0001, 1.0001, 1.0001, 1.0, 1.0004, 1.0003, 1.0003, 1.0003, 1.0004, 1.0005, 1.0004, 1.0003, 1.0004, 1.0004, 1.0003, 1.0003, 1.0003, 1.0001, 1.0003, 1.0003, 1.0001, 1.0001, 1.0003, 1.0002, 1.0003, 0.9999, 1.0, 1.0002, 1.0002, 1.0002, 1.0002, 1.0003, 1.0003, 1.0002, 1.0002, 1.0003, 1.0003, 1.0003, 1.0001, 1.0, 1.0, 1.0001, 0.9999, 1.0, 1.0, 0.9999, 1.0, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9998, 0.9997, 0.9996, 0.9997, 0.9997, 0.9997, 0.9996, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9996, 0.9997, 1.0, 1.0002, 1.0001, 1.0002, 1.0001, 1.0001, 1.0001, 1.0001, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 1.0, 0.9999, 0.9999, 1.0, 0.9999, 1.0, 0.9999, 0.9999, 0.9997, 1.0, 1.0, 1.0001, 1.0001, 0.9999, 1.0, 0.9997, 0.9999, 0.9999, 1.0, 0.9999, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 0.9998, 0.9998, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9997, 0.9998, 0.9998, 0.9998, 0.9996, 0.9997, 0.9997, 0.9997, 0.9998, 1.0, 0.9998, 0.9989, 0.9995, 0.9995, 0.9995, 0.9996, 0.9996, 0.9997, 0.9998, 0.9999, 0.9997, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9998, 0.9999, 0.9999, 0.9999, 0.9999, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997, 0.9997, 0.9998, 0.9998, 0.9997, 0.9997, 0.9998, 0.9998, 0.9999, 1.0, 1.0, 1.0, 1.0, 1.0002, 1.0002, 1.0002, 1.0002, 1.0002, 1.0001, 1.0001, 1.0002, 1.0001, 1.0001, 1.0001, 1.0001, 1.0, 1.0, 0.9999, 1.0, 1.0, 1.0, 1.0001, 1.0, 1.0001, 1.0002, 1.0002, 1.0001, 1.0002, 1.0001, 1.0002, 1.0002, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 1.0001, 1.0, 1.0001, 1.0, 1.0001, 1.0001, 1.0, 1.0001, 1.0002, 1.0001, 1.0002, 1.0002 ]
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
agentClasses:
- class: "lp"
models: ["bancor_lp_action", "bancor_lp_volume"]
agentPreStep:
code: |
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:
code: |
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_state().token_states[token].volatility
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:
code: |
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)
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:
code: |
def custom_agent_class_post_step(agent, environment, metric_collector):
pass
custom_agent_class_post_step(a, b, metric_collector)
- class: "arb"
agentPreStep:
code: |
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:
code: |
def agent_feature_vector(agent, step, model_alias, environment, metric_collector):
return np.array([])
agentStep:
code: |
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:
code: |
def custom_agent_class_post_step(agent, environment, metric_collector):
pass
custom_agent_class_post_step(a, b, metric_collector)
- class: "trader"
models: ["bancor_trader"]
agentPreStep:
code: |
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:
code: |
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_state().token_states[token].volatility
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:
code: |
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:
code: |
def custom_agent_class_post_step(agent, environment, metric_collector):
pass
custom_agent_class_post_step(a, b, metric_collector)
agents:
- class: "lp"
address: "0x6429FEe053768Ffa90a59cAfb98Ca9E8F6471211"
holdings:
- token: "bnWBTC"
amount: 4338109590
- token: "ETH"
amount: 2847843290371928722
- token: "DAI"
amount: 2847843290371928722
- class: "lp"
address: "0xaE8E931EEd550031EdA61FC4410521d81F2BfBdd"
holdings:
- token: "ETH"
amount: 38149448412523823
- token: "bnETH"
amount: 293109236868274071
- class: "lp"
address: "0xB494096548aA049C066289A083204E923cBf4413"
holdings:
- token: "ETH"
amount: 200452552214377241
- token: "bnDAI"
amount: 424551004385920620748341
- token: "bnLINK"
amount: 9258283976382964422773
- 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"
location: "models/action_user.onnx"
- 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: '[{"inputs":[{"internalType":"contract ITokenGovernance","name":"initBNTGovernance","type":"address"},{"internalType":"contract ITokenGovernance","name":"initVBNTGovernance","type":"address"},{"internalType":"contract INetworkSettings","name":"initNetworkSettings","type":"address"},{"internalType":"contract IMasterVault","name":"initMasterVault","type":"address"},{"internalType":"contract IExternalProtectionVault","name":"initExternalProtectionVault","type":"address"},{"internalType":"contract IPoolToken","name":"initBNTPoolToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"DeadlineExpired","type":"error"},{"inputs":[],"name":"DepositingDisabled","type":"error"},{"inputs":[],"name":"DoesNotExist","type":"error"},{"inputs":[],"name":"InsufficientFlashLoanReturn","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidPool","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"NativeTokenAmountMismatch","type":"error"},{"inputs":[],"name":"NotEmpty","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"Overflow","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"FlashLoanCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"contextId","type":"bytes32"},{"indexed":true,"internalType":"contract Token","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"availableAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"originalAmount","type":"uint256"}],"name":"FundsMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NetworkFeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":true,"internalType":"contract IPoolCollection","name":"poolCollection","type":"address"}],"name":"PoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"poolType","type":"uint16"},{"indexed":true,"internalType":"contract IPoolCollection","name":"poolCollection","type":"address"}],"name":"PoolCollectionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"poolType","type":"uint16"},{"indexed":true,"internalType":"contract IPoolCollection","name":"poolCollection","type":"address"}],"name":"PoolCollectionRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":true,"internalType":"contract IPoolCollection","name":"poolCollection","type":"address"}],"name":"PoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":true,"internalType":"contract IPoolCollection","name":"poolCollection","type":"address"}],"name":"PoolRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"contextId","type":"bytes32"},{"indexed":true,"internalType":"contract Token","name":"sourceToken","type":"address"},{"indexed":true,"internalType":"contract Token","name":"targetToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"sourceAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bntAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetFeeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bntFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"trader","type":"address"}],"name":"TokensTraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"collectionByPool","outputs":[{"internalType":"contract IPoolCollection","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token[]","name":"tokens","type":"address[]"},{"internalType":"contract IPoolCollection","name":"poolCollection","type":"address"}],"name":"createPools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"provider","type":"address"},{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"depositFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"depositingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"enableDepositing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"contract IFlashLoanRecipient","name":"recipient","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"flashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IPoolToken","name":"poolToken","type":"address"},{"internalType":"uint256","name":"poolTokenAmount","type":"uint256"}],"name":"initWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IBNTPool","name":"initBNTPool","type":"address"},{"internalType":"contract IPendingWithdrawals","name":"initPendingWithdrawals","type":"address"},{"internalType":"contract IPoolMigrator","name":"initPoolMigrator","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liquidityPools","outputs":[{"internalType":"contract Token[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"token","type":"address"},{"internalType":"address","name":"provider","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"availableAmount","type":"uint256"},{"internalType":"uint256","name":"originalAmount","type":"uint256"}],"name":"migrateLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract Token[]","name":"pools","type":"address[]"},{"internalType":"contract IPoolCollection","name":"newPoolCollection","type":"address"}],"name":"migratePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingNetworkFeeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolCollections","outputs":[{"internalType":"contract IPoolCollection[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"postUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPoolCollection","name":"newPoolCollection","type":"address"}],"name":"registerPoolCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resume","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"roleEmergencyStopper","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"roleMigrationManager","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"roleNetworkFeeManager","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"sourceAmount","type":"uint256"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"}],"name":"tradeBySourceAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"targetAmount","type":"uint256"},{"internalType":"uint256","name":"maxSourceAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"}],"name":"tradeByTargetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IPoolCollection","name":"poolCollection","type":"address"}],"name":"unregisterPoolCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawNetworkFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]'
address: "0xeEF417e1D5CC832e619ae18D2F140De2999dD4fB"
alias: "bancor_network"
- abi: '[{"inputs":[{"internalType":"contract IBancorNetwork","name":"initNetwork","type":"address"},{"internalType":"contract ITokenGovernance","name":"initBNTGovernance","type":"address"},{"internalType":"contract ITokenGovernance","name":"initVBNTGovernance","type":"address"},{"internalType":"contract INetworkSettings","name":"initNetworkSettings","type":"address"},{"internalType":"contract IMasterVault","name":"initMasterVault","type":"address"},{"internalType":"contract IExternalProtectionVault","name":"initExternalProtectionVault","type":"address"},{"internalType":"contract IExternalRewardsVault","name":"initExternalRewardsVault","type":"address"},{"internalType":"contract IBNTPool","name":"initBNTPool","type":"address"},{"internalType":"contract IPendingWithdrawals","name":"initPendingWithdrawals","type":"address"},{"internalType":"contract IPoolMigrator","name":"initPoolMigrator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidParam","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bnt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bntGovernance","outputs":[{"internalType":"contract ITokenGovernance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bntPool","outputs":[{"internalType":"contract IBNTPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"depositingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"externalProtectionVault","outputs":[{"internalType":"contract IExternalProtectionVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"externalRewardsVault","outputs":[{"internalType":"contract IExternalRewardsVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"isPoolStable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isReadyForWithdrawal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterVault","outputs":[{"internalType":"contract IMasterVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"network","outputs":[{"internalType":"contract IBancorNetwork","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"networkSettings","outputs":[{"internalType":"contract INetworkSettings","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingWithdrawals","outputs":[{"internalType":"contract IPendingWithdrawals","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolMigrator","outputs":[{"internalType":"contract IPoolMigrator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"poolToken","outputs":[{"internalType":"contract IPoolToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"poolTokenAmount","type":"uint256"}],"name":"poolTokenToUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"postUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"stakedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"targetAmount","type":"uint256"}],"name":"tradeInputByTargetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"sourceAmount","type":"uint256"}],"name":"tradeOutputBySourceAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"tradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"tradingFeePPM","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"tradingLiquidity","outputs":[{"components":[{"internalType":"uint128","name":"bntTradingLiquidity","type":"uint128"},{"internalType":"uint128","name":"baseTokenTradingLiquidity","type":"uint128"}],"internalType":"struct TradingLiquidity","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"underlyingToPoolToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vbnt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vbntGovernance","outputs":[{"internalType":"contract ITokenGovernance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"poolTokenAmount","type":"uint256"}],"name":"withdrawalAmounts","outputs":[{"components":[{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"internalType":"uint256","name":"bntAmount","type":"uint256"}],"internalType":"struct WithdrawalAmounts","name":"","type":"tuple"}],"stateMutability":"view","type":"function"}]'
address: "0x8E303D296851B320e6a697bAcB979d13c9D6E760"
alias: "bancor_network_info"
- abi: '[{"inputs":[{"internalType":"contract IERC20","name":"initBnt","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"DoesNotExist","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidExternalAddress","type":"error"},{"inputs":[],"name":"InvalidFee","type":"error"},{"inputs":[],"name":"InvalidParam","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"prevFeePPM","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newFeePPM","type":"uint32"}],"name":"DefaultFlashLoanFeePPMUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":false,"internalType":"uint32","name":"prevFeePPM","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newFeePPM","type":"uint32"}],"name":"FlashLoanFeePPMUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"prevLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"FundingLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevLiquidity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLiquidity","type":"uint256"}],"name":"MinLiquidityForTradingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"token","type":"address"}],"name":"TokenAddedToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"token","type":"address"}],"name":"TokenRemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"prevBurnRewardPPM","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newBurnRewardPPM","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"prevBurnRewardMaxAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBurnRewardMaxAmount","type":"uint256"}],"name":"VortexBurnRewardUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"prevFeePPM","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newFeePPM","type":"uint32"}],"name":"WithdrawalFeePPMUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"token","type":"address"}],"name":"addTokenToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addTokenToWhitelistWithLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token[]","name":"tokens","type":"address[]"}],"name":"addTokensToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultFlashLoanFeePPM","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"flashLoanFeePPM","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"token","type":"address"}],"name":"isTokenWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLiquidityForTrading","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"poolFundingLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"postUpgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"protectedTokenWhitelist","outputs":[{"internalType":"contract Token[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"token","type":"address"}],"name":"removeTokenFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint32","name":"newDefaultFlashLoanFeePPM","type":"uint32"}],"name":"setDefaultFlashLoanFeePPM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint32","name":"newFlashLoanFeePPM","type":"uint32"}],"name":"setFlashLoanFeePPM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setFundingLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token[]","name":"pools","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"setFundingLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinLiquidityForTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"burnRewardPPM","type":"uint32"},{"internalType":"uint256","name":"burnRewardMaxAmount","type":"uint256"}],"internalType":"struct VortexRewards","name":"rewards","type":"tuple"}],"name":"setVortexRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newWithdrawalFeePPM","type":"uint32"}],"name":"setWithdrawalFeePPM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"vortexRewards","outputs":[{"components":[{"internalType":"uint32","name":"burnRewardPPM","type":"uint32"},{"internalType":"uint256","name":"burnRewardMaxAmount","type":"uint256"}],"internalType":"struct VortexRewards","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawalFeePPM","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"}]'
address: "0x83E1814ba31F7ea95D216204BB45FE75Ce09b14F"
alias: "bancor_network_settings"
- abi: '[{"inputs":[{"internalType":"contract IBancorNetwork","name":"initNetwork","type":"address"},{"internalType":"contract IERC20","name":"initBNT","type":"address"},{"internalType":"contract INetworkSettings","name":"initNetworkSettings","type":"address"},{"internalType":"contract IMasterVault","name":"initMasterVault","type":"address"},{"internalType":"contract IBNTPool","name":"initBNTPool","type":"address"},{"internalType":"contract IExternalProtectionVault","name":"initExternalProtectionVault","type":"address"},{"internalType":"contract IPoolTokenFactory","name":"initPoolTokenFactory","type":"address"},{"internalType":"contract IPoolMigrator","name":"initPoolMigrator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"AlreadyEnabled","type":"error"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"DepositingDisabled","type":"error"},{"inputs":[],"name":"DoesNotExist","type":"error"},{"inputs":[],"name":"FundingLimitTooHigh","type":"error"},{"inputs":[],"name":"InsufficientLiquidity","type":"error"},{"inputs":[],"name":"InsufficientSourceAmount","type":"error"},{"inputs":[],"name":"InsufficientTargetAmount","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidFee","type":"error"},{"inputs":[],"name":"InvalidFraction","type":"error"},{"inputs":[],"name":"InvalidParam","type":"error"},{"inputs":[],"name":"InvalidRate","type":"error"},{"inputs":[],"name":"InvalidStakedBalance","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"Overflow","type":"error"},{"inputs":[],"name":"PoolCollectionWithdrawalInputInvalid","type":"error"},{"inputs":[],"name":"RateUnstable","type":"error"},{"inputs":[],"name":"SameOwner","type":"error"},{"inputs":[],"name":"TradingDisabled","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"prevFeePPM","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newFeePPM","type":"uint32"}],"name":"DefaultTradingFeePPMUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":true,"internalType":"bool","name":"newStatus","type":"bool"}],"name":"DepositingEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"prevFeePPM","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newFeePPM","type":"uint32"}],"name":"NetworkFeePPMUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"contextId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":true,"internalType":"contract Token","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"poolTokenAmount","type":"uint256"}],"name":"TokensDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"contextId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":true,"internalType":"contract Token","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"poolTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"externalProtectionBaseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bntAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawalFeeAmount","type":"uint256"}],"name":"TokensWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"contextId","type":"bytes32"},{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"liquidity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakedBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"poolTokenSupply","type":"uint256"}],"name":"TotalLiquidityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":true,"internalType":"bool","name":"newStatus","type":"bool"},{"indexed":true,"internalType":"uint8","name":"reason","type":"uint8"}],"name":"TradingEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":false,"internalType":"uint32","name":"prevFeePPM","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newFeePPM","type":"uint32"}],"name":"TradingFeePPMUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"contextId","type":"bytes32"},{"indexed":true,"internalType":"contract Token","name":"pool","type":"address"},{"indexed":true,"internalType":"contract Token","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"prevLiquidity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLiquidity","type":"uint256"}],"name":"TradingLiquidityUpdated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"token","type":"address"}],"name":"createPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultTradingFeePPM","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"contextId","type":"bytes32"},{"internalType":"address","name":"provider","type":"address"},{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"baseTokenAmount","type":"uint256"}],"name":"depositFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"depositingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"disableTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"enableDepositing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"enableProtection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"bntVirtualBalance","type":"uint256"},{"internalType":"uint256","name":"baseTokenVirtualBalance","type":"uint256"}],"name":"enableTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"isPoolStable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"isPoolValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"components":[{"internalType":"contract IPoolToken","name":"poolToken","type":"address"},{"internalType":"uint32","name":"tradingFeePPM","type":"uint32"},{"internalType":"bool","name":"tradingEnabled","type":"bool"},{"internalType":"bool","name":"depositingEnabled","type":"bool"},{"components":[{"internalType":"uint32","name":"blockNumber","type":"uint32"},{"components":[{"internalType":"uint112","name":"n","type":"uint112"},{"internalType":"uint112","name":"d","type":"uint112"}],"internalType":"struct Fraction112","name":"rate","type":"tuple"},{"components":[{"internalType":"uint112","name":"n","type":"uint112"},{"internalType":"uint112","name":"d","type":"uint112"}],"internalType":"struct Fraction112","name":"invRate","type":"tuple"}],"internalType":"struct AverageRates","name":"averageRates","type":"tuple"},{"components":[{"internalType":"uint128","name":"bntTradingLiquidity","type":"uint128"},{"internalType":"uint128","name":"baseTokenTradingLiquidity","type":"uint128"},{"internalType":"uint256","name":"stakedBalance","type":"uint256"}],"internalType":"struct PoolLiquidity","name":"liquidity","type":"tuple"}],"internalType":"struct Pool","name":"data","type":"tuple"}],"name":"migratePoolIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"contract IPoolCollection","name":"targetPoolCollection","type":"address"}],"name":"migratePoolOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"networkFeePPM","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"onFeesCollected","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"poolData","outputs":[{"components":[{"internalType":"contract IPoolToken","name":"poolToken","type":"address"},{"internalType":"uint32","name":"tradingFeePPM","type":"uint32"},{"internalType":"bool","name":"tradingEnabled","type":"bool"},{"internalType":"bool","name":"depositingEnabled","type":"bool"},{"components":[{"internalType":"uint32","name":"blockNumber","type":"uint32"},{"components":[{"internalType":"uint112","name":"n","type":"uint112"},{"internalType":"uint112","name":"d","type":"uint112"}],"internalType":"struct Fraction112","name":"rate","type":"tuple"},{"components":[{"internalType":"uint112","name":"n","type":"uint112"},{"internalType":"uint112","name":"d","type":"uint112"}],"internalType":"struct Fraction112","name":"invRate","type":"tuple"}],"internalType":"struct AverageRates","name":"averageRates","type":"tuple"},{"components":[{"internalType":"uint128","name":"bntTradingLiquidity","type":"uint128"},{"internalType":"uint128","name":"baseTokenTradingLiquidity","type":"uint128"},{"internalType":"uint256","name":"stakedBalance","type":"uint256"}],"internalType":"struct PoolLiquidity","name":"liquidity","type":"tuple"}],"internalType":"struct Pool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"poolLiquidity","outputs":[{"components":[{"internalType":"uint128","name":"bntTradingLiquidity","type":"uint128"},{"internalType":"uint128","name":"baseTokenTradingLiquidity","type":"uint128"},{"internalType":"uint256","name":"stakedBalance","type":"uint256"}],"internalType":"struct PoolLiquidity","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"poolToken","outputs":[{"internalType":"contract IPoolToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"baseTokenAmountToDistribute","type":"uint256"},{"internalType":"uint256","name":"protocolPoolTokenAmount","type":"uint256"}],"name":"poolTokenAmountToBurn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"poolTokenAmount","type":"uint256"}],"name":"poolTokenToUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolType","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pools","outputs":[{"internalType":"contract Token[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protectionEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"newDefaultTradingFeePPM","type":"uint32"}],"name":"setDefaultTradingFeePPM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newNetworkFeePPM","type":"uint32"}],"name":"setNetworkFeePPM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint32","name":"newTradingFeePPM","type":"uint32"}],"name":"setTradingFeePPM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"contextId","type":"bytes32"},{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"sourceAmount","type":"uint256"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"}],"name":"tradeBySourceAmount","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tradingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"networkFeeAmount","type":"uint256"}],"internalType":"struct TradeAmountAndFee","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"contextId","type":"bytes32"},{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"targetAmount","type":"uint256"},{"internalType":"uint256","name":"maxSourceAmount","type":"uint256"}],"name":"tradeByTargetAmount","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tradingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"networkFeeAmount","type":"uint256"}],"internalType":"struct TradeAmountAndFee","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"targetAmount","type":"uint256"}],"name":"tradeInputAndFeeByTargetAmount","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tradingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"networkFeeAmount","type":"uint256"}],"internalType":"struct TradeAmountAndFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"sourceToken","type":"address"},{"internalType":"contract Token","name":"targetToken","type":"address"},{"internalType":"uint256","name":"sourceAmount","type":"uint256"}],"name":"tradeOutputAndFeeBySourceAmount","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tradingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"networkFeeAmount","type":"uint256"}],"internalType":"struct TradeAmountAndFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"tradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"tradingFeePPM","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ownerCandidate","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"baseTokenAmount","type":"uint256"}],"name":"underlyingToPoolToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"}],"name":"updateTradingLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"contextId","type":"bytes32"},{"internalType":"address","name":"provider","type":"address"},{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"poolTokenAmount","type":"uint256"},{"internalType":"uint256","name":"baseTokenAmount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract Token","name":"pool","type":"address"},{"internalType":"uint256","name":"poolTokenAmount","type":"uint256"}],"name":"withdrawalAmounts","outputs":[{"components":[{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"baseTokenAmount","type":"uint256"},{"internalType":"uint256","name":"bntAmount","type":"uint256"}],"internalType":"struct WithdrawalAmounts","name":"","type":"tuple"}],"stateMutability":"view","type":"function"}]'
address: ""
alias: "bancor_pool_collection"
- abi: '[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"initDecimals","type":"uint8"},{"internalType":"contract Token","name":"initReserveToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessDenied","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidExternalAddress","type":"error"},{"inputs":[],"name":"SameOwner","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveToken","outputs":[{"internalType":"contract Token","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ownerCandidate","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"pure","type":"function"}]'
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
metrics:
prebuild:
balance:
enabled: true
runsOn: ["agentPreStep"]
step_action:
enabled: true
runsOn: ["agentStep"]
transactions:
enabled: true