project screenshot 1

mishap manager

A safe plugin to apply stop loss on your assets in a safe.

mishap manager

Created At

ETHIndia 2023

Winner of

Safe - SAFE{CORE} PROTOCOL

Project Description

Currently, safe holds the most value as a treasury management tool, and some of these users like to deploy a part of this treasury on staking or into tokens they hope to gain from. Imagine you won't have to think of your funds losing value and just with the plugin and hosting a bot you could reverse bad judgment calls of investments if the stop loss limit is reached.

Steps to use stop-loss on given assets.

  1. Enable stop-loss plugin for your safe.
  2. Add stop loss for the token address you fear for and the contract address to perform the transaction on.
  3. The stop-loss limit under which you would like to trigger the transaction, this would emit an Event AddStopLoss.
  4. Catch this event through an event listener to create a cron to check the pricefeed of the select token on each block.
  5. When the stop loss limit is reached execute a transaction from the plugin to unstake/swap tokens for stable coins.
  6. If you receive an error from the transaction, reform the safeTx and rerun the cron.
  7. Catch the RemoveStopLoss event for success and remove the cron.

Future Additions,

  1. Add gelato support to directly create bots from the plugin.
  2. check the token address in the safeTx.
  3. Add zodiac's role access modifier to add roles to restrict transactions to certain trusted addresses and function selectors on these addresses.

How it's Made

Was trying to employ the zodiac module on top of this module which dosn't seem possible with the current state of the projects.

background image mobile

Join the mailing list

Get the latest news and updates