May 25, 2022
We are excited to announce the integration of Aave into Dojo, our cutting-edge on-premises simulation and optimization platform for decentralised finance.
Compass Labs partnered with Aave on the Aave-Dojo integration, to empower users and web3 developers to access on-chain protocol data and simulate and optimize on-chain strategies and smart contracts in robust real worlds scenarios.
With dojo, you can interact seamlessly with Aave. We abstract the complexities introduced by Solidity away, and open up a simple Python interface to simulate and optimize an the EVM level.
In this article we’ll dive into:
Aave is a lending protocol. You can supply tokens as collateral and borrow a list of other tokens, secured via your collateral.
The health of your positions in Aave is characterized by the health factor. Should it ever drop below 1.0, Aave sells some of your collateral in exchange for the borrowed token. While this does not sound very exciting at first, it opens up a few opportunies. Firstly, you might get a different price for the borrowed token on Aave than e.g. on Uniswap, thus opening up arbitrage opportunities. Moreover, you can resupply a borrowed token and then borrow against it again, to effectivly create a leveraged position. See here.
Another major feature of Aave are flash loans. These are uncollateralized loans you’re allowed to take, as long as you pay them back in the same transaction.
With dojo, we allow you to interact seamlessly with AAVE. We abstract the complexities introduced by Solidity away, and open up a simple Python interface to run agent based simulations at the individual transaction level. Check our key features here:
Dojo incorporates an agent and scenario based learning software that runs on blockchain forks to enable users to simulating strategies and monitoring funds’ flows directly on-premises.
Dojo isn’t just for investors; it’s a powerful tool for smart contract developers to stress-testing market scenarios and understanding the economic risk of the protocol.
With Dojo, you can simulate and analyze strategies & liquidation events before deploying them under different market conditions, ensuring you’re well-prepared for market eventualities.
The real-time performance tracking on the Dojo dashboard enables monitoring of agent positions and protocol statistic on Aave to gain valuable insights into market dynamics as they unfold.
With the current release we support:
Here’s how a dojo-policy for AAVE might look like:
In the picture below, you can see a screenshot of our simulation in action (via our custom dashboard). In this particular case, the day USDC depegged, borrowing to such a small health factor turned out too much, and so parts of the agents collateral got liquidated.
Here’s an example of how you’d write a dojo-policy with multiple environments: