Skip to content

simtopia/verbs-morpho-blue

Repository files navigation

Morpho Blue simulation with VERBS

Simulation implemented using VERBS

Installation & Running

This repo uses hatch for dependency management. The simulation can be run using

hatch run examples:morpho <ALCHEMY-KEY>

where <ALCHEMY-KEY> is a API key for Alchemy.

You can also use the --help argument to see additional arguments to the scripts.

Simulation

The script lltv_recommender.py runs the following simulation:

  • Fork mainnet at block 19163600.
  • Create a market on Morpho Blue with
    • LLTV = 0.9
    • Collateral asset: WETH
    • Borrow asset: DAI
    • Oracle: price feed is retrieved from Uniswap pool. Oracle implemented here
  • A liquidity provider provides DAI to the above market.
  • Borrowers borrow from the market.
  • A trader trades in Uniswap so that the price from Uniswap follows a Geometric Brownian motion.
  • A liquidator liquidates unhealthy positions.

Note

The above simulation runs from a pre-generated cache of the EVM forked at block 19163600 (see the documentation). In order to generate a simulation starting from a different block, the function init_cache(...) initialises the cache at the specified block.

Simulation results are saved in results/.

About

Morpho Blue simulation with VERBS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published