M

mishap manager

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

M

mishap manager

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

The problem mishap manager solves

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.

Challenges I ran into

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

Tracks Applied (1)

Safe Track

Leverages the safe core protocol to define an infra to setup stop-loss on a particular token and defines the expectation...Read More

safe

Technologies used

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion