verbs_examples.aave.sim.init_cache#

init_cache(key: str, block_number: int, seed: int, n_steps: int, n_borrow_agents: int, mu: float = 0.1, sigma: float = 0.6) Tuple[int, int, List[Tuple[bytes, Tuple[bytes, int, bytes, bytes]]], List[Tuple[bytes, bytes, bytes]]][source]#

Generate a simulation request cache

Run a simulation from a fork and store a cache of data request for use in other simulations.

Parameters:
  • key (str) – Alchemy API key

  • block_number (int) – Block number to fork from

  • seed (int) – Random seed

  • n_steps (int) – Number of simulation steps

  • n_borrow_agents (int) – Number of simulated borrow agents

  • mu (float, optional) – GBM mu parameter, default 0.1

  • sigma (float, optional) – GBM sigma parameter, default 0.6

Returns:

verbs.types.Cache – Cache generated using verbs.envs.ForkEnv.export_cache().