Skip to content

Instantly share code, notes, and snippets.

@yurenju
Created December 15, 2019 03:58
Show Gist options
  • Save yurenju/10a42d424e563817832acca03dbc8acd to your computer and use it in GitHub Desktop.
Save yurenju/10a42d424e563817832acca03dbc8acd to your computer and use it in GitHub Desktop.
if __name__ == '__main__':
num_traders = 100
num_arbitrageurs = 10
trader_dai = 10000
trader_eth = 1000
uniswap_dai = 1000000
uniswap_eth = 10000
model = UniswapModel(num_traders, num_arbitrageurs, trader_dai, trader_eth, uniswap_dai, uniswap_eth)
for i in range(100):
model.step()
df = model.datacollector.get_model_vars_dataframe()
df.plot()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment