Roadmap: Implementation of stop-loss vote (17)


  • In order to mitigate downsides of Vault exposures to Convex strategies in the event of black-swan events, Gro DAO voted to implement a 4% stop-loss for any given Curve pool (vote 017).
  • As such, the initial protocol contributors plan to implement a smart-contract-based stop loss mechanism in order to effect this DAO vote.
  • Under this mechanism, strategies would be exited upon the mark-to-market price of stablecoins falling below the stop-loss threshold for a specified period. It would be managed by gelato bots for maximum decentralization.
  • To avoid unwanted stop-loss during predictable or expected volatility:
    • enhance the whitelist selection framework in order to select quality stablecoins for farming
    • evaluate historical price of the stablecoin being farmed to determine the suggested threshold
    • continue to monitor on-going statistics to ensure these two key variables are set to appropriate values.
  • Alongside stop loss, to mitigate a repegging loss, a stablecoin that is traded at premium would also be exited with a similar mechanism.


This article contains implementation specifics on the stop-loss including:

  1. Architectural design of stop-loss
  2. Detailed stop-loss workflow (with risks and mitigations)
  3. Whitelist filter for the most stable strategies

1. Architectural Design of stop-loss

  • There would be an intermediate smart contract that defines the emergency exit logic.
  • Task on Gelato network would be set up such that the stop-loss threshold is constantly checked against.
  • Gro DAO would ensure Gelato is funded from the DAO treasury to allow a decentralized network of keepers to maintain ongoing execution.

2. Detailed Stop-loss Workflow

  1. The gelato task continuously assesses if the AMM(curve in this case) has breached our threshold
  2. if a threshold breach has been found, the intermediate contract would mark a timestamp
  3. if at any point the AMM goes back within our threshold, the timestamp is reset.
  4. if the AMM is outside the threshold for x amount of hours, a flag would be set in the intermediate contract that triggers a second gelato job
  5. the second gelato will attempt to run the stop loss, using the current total debt of the strategy as the principal amount it wants to withdraw - the stop loss job will apply a set slippage to this amount
  6. if the withdrawal fails, this second gelato job will try to brute force the stop loss by increasing the slippage amount at each retry

Risk and Mitigation of the workflow

Risk: Potential interception of step 5 (above) could be intercepted and caused to fail repeatedly. Depending on what the upper limit for BP loss is (minAmount) this could allow an adversary to exploit the stop loss.

Mitigation: These operations are difficult to intercept, as the gelato job runs against a private pool. A ceiling of the max BP loss would also be applied to cap the loss allowed.

3. Whitelist filter for the most stable strategies

By including only the most stable strategies, the stop-loss should occur rarely (if ever). This is a positive as although a stop-loss prevents extreme losses, it does this at a cost of baking in a 4% loss for the system (which is then leveraged for Vault holders).

By this logic and using the decentralized stop-loss mechanism maintained by a network of keepers, the protocol would:

  1. Automatically (in the blockchain-sense) retire a stablecoin exposure if it depegs.
  2. Mark down GVT prices as a consequence.

In order to therefore avoid an unnecessary exit (and GVT loss), there are several steps taken.
The stablecoins in the protocol should:

  1. exhibit price resilience, namely, they have NEVER reached the threshold of price depeg, for the tolerated duration (both of them would be voted by the DAO).
  2. deeply liquidated with 3CRV relative to our positions, since the stop loss is going to be a decentralized and transparent infrastructure, there is always a possibility of manipulation in order to trigger a man-made exit to profit from the discrepancy.
  3. incorporate an effective arbitrage system, which fundamentally supports a price re-peg in a short period of time.
  4. be launched for some time without any reported bug, which proves (to a large probabilistic degree) that their code is safe.

With the above aspects, the initial protocol contributors have benchmarked metrics on the existing stablecoins in the protocol.

Prevent anticipated losses from repegging of a stablecoin already priced at a premium

Alongside stop loss, a stablecoin that is traded at premium would also be exited with a similar mechanism.

This prevents a loss when a stablecoin which has gone significantly off-peg then returns to $1 (as designed). If the stablecoin never returns to $1 the stablecoin is considered to be not working as intended, so in any event it is sensible to exit the strategy from a risk management perspective.

This implementation proposal would use the same threshold as already voted on by the DAO for stop-loss (4%). At this point the strategy would be exited automatically (utilizing gelato bots).

Next steps

  1. Audit and Implementation of the stop-loss smart contracts
  2. Continue to enhance the framework for evaluating whitelist to maintain a quality farming portfolio
  3. On-going monitoring and update of the stop-loss threshold and duration based on historical analysis

Appendix: Historical Price Behavior

Key Findings:

In terms of downward slippages,

  • Frax, oUSD, mUSD, GUSD and TUSD have NOT touched 1%. This validates our farming strategy to provide a good risk-adjusted yield.

  • LUSD has reached 1%+ for 11945 blocks with its worst at 6%. If we draw the line at 2%, the longest duration is 4298 blocks. It is still a high quality yield source and trades at premium sometimes, but not as price stable as the above 4 stablecoin statistically.

  • BUSD has briefly touched 2% for 1287 blocks.

  • alUSD has reached 1%+ for 20278 blocks, with its worst at 4%.

  • alUSD has reached 1.5%+ for 5729 blocks. alUSD has reached 2%+ for 2598 blocks.

  • While we still think alUSD has a decent arbitrage mechanism, its price action shows a more volatile behavior. That was the primary reason we reduced exposure.

  • MIM has 80%+ slippage at its worst, due to the fact that it has 800k 3CRV at its worst depegging. It has been above 1%+ for 22019 blocks. It supported our decision earlier to reject it being whitelisted.
    Vote 015: Gro protocol strategy selection whitelist

** For Detailed Analysis you may refer to google colab.

The above statistics serve the below purposes :

  1. Supports our previous decision of using 4% of the stop loss threshold which covers most stablecoins in their volatile period.

  2. Serves as the ground to validate and update the right duration to execute the stop-loss on an-ongoing basis

  3. Serves as an evidence to exercise tighter stop-loss threshold and bigger exposure have the stablecoin(s) exhibit better risk-adjusted yield. For example Frax has demonstrated such stronger price stability.









MIM (removed from whitelist)

1 Like