[WOOF!] Sandbox Development Updates

Hello Compound residents! As the part of Compound Sandbox initiative, WOOF! would like to communicate with the community to follow up with the progress, receive feedback and gather insights. We will provide the updates on a bi-weekly basis here and on Community calls.

We are open to any feedback and suggestions.

2 Likes

To align Sandbox PID Controller with Compound risk management standards, we are asking @Gauntlet to provide inputs on the following document.

1 Like

Gauntlet is actively reviewing the request for input and will provide guidance on the methodology for parameter definition and management here on the forum for the community to consider. Our focus will be on aligning recommendations with Compound’s established risk framework while addressing the unique challenges introduced by the PID controller.

We’ll share a detailed response outlining our approach during the week of January 10th.

3 Likes

Feedback on Sandbox

We appreciate the WOOF! team for initiating this discussion to better understand the methodologies used to determine various risk parameters across the protocol. Below, we have provided responses to the questions outlined in the document.

Section 1: Determining Collateral Parameters for a Market

1. borrowCollateralFactor

  • What factors influence this parameter?

    • Gauntlet’s models evaluate how price volatility may affect collateral value. Assets with higher volatility generally warrant a lower collateral factor to protect the protocol from short-notice drawdowns.
    • Assets with deeper liquidity can handle larger liquidation volumes without incurring excessive slippage or market impact. Gauntlet’s models incorporate on-chain volumes to measure potential liquidation efficiency.
    • If the borrow asset is highly correlated with collateral assets, Gauntlet adjusts collateral factors accordingly.
    • If there are unique risks (e.g., stablecoins with depeg risk or governance tokens with concentration risks), these feed into Gauntlet’s simulations, often resulting in more conservative collateral factors.
  • How do you account for asset-specific volatility, liquidity, or other risks?

    • Market shocks, liquidity, and asset-specific risk events are tested to assess how quickly the positions might become undercollateralized.

2. liquidateCollateralFactor

  • How is this value calculated relative to the borrowCollateralFactor?
    • Typically, the liquidateCollateralFactor is set higher than the borrowCollateralFactor so that borrowers have a buffer.
    • Gauntlet’s policy often is to place the liquidateCollateralFactor at some premium above the borrowCollateralFactor. This premium is determined by liquidity conditions, historical liquidation success rates, and historical volatility.
  • What additional premiums (e.g., risk or volatility premiums) are considered?
    • If an asset is prone to sharp intraday price drops, Gauntlet’s methodology increases the delta between the borrowCollateralFactor and liquidateCollateralFactor.

3. liquidationFactor

  • What methodology is used to define the share of collateral available for liquidation?

    • Gauntlet models the cost a liquidator might incur during a sell-off. If the liquidation penalty is set too low, the liquidator in the event of large slippage might be disincentivized to liquidate. If it is too high, it provides poor UX for borrowers due to high penalties.
    • Historical liquidations, intrinsic risk profile of the asset and DEX liquidity are used to inform how much collateral typically needs to be seized to fully cover outstanding debt.
    • Furthermore, the borrowCollateralFactor and liquidateCollateralFactor are calculated downstream from liquidationFactor, refer to the formula below.
    • Screenshot 2025-01-14 at 5.04.42 AM
  • How do you account for market depth and liquidation slippage

    • Aggregated data from DEX are used to estimate price impact of large liquidations, then factored into simulation-based parameter settings. Also see our analysis that dives in deeper regarding the liquidation mechanisms

4. supplyCap

  • How do you determine the upper limit for the supply of an asset in a market

    • Assets with higher DEX slippage often have tighter supply caps to reduce the risk that the protocol becomes too reliant on a relatively illiquid collateral.
    • If a single large depositor can drastically skew the market’s risk profile (e.g., by holding 20%+ of the supply), a stricter supply cap can mitigate sudden liquidity crunches.
    • Gauntlet examines the asset’s typical usage as collateral. For example, stablecoins may have a higher capacity because of relatively stable liquidity conditions, while volatile tokens tend to have lower caps. Furthermore circulating supply for respective tokens are noted to prevent concentration risk.
  • Are there specific metrics (e.g., market capitalization, daily trading volume) that guide this value?

    • See above

Section 2: Determining Market-Specific Parameters

Interest Rate Curve Parameters

1. supplyKink and borrowKink

  • How do you determine the utilization threshold at which the interest rate curve shifts from the low slope to the high slope?
    • Kinks are primarily set at the industry standard, for example - 90% for stablecoins. Should liquidity significantly increase, there may be justification for raising the kink further. Currently, kinks are calibrated to strike a balance between offering competitive rates and mitigating liquidity crunches during periods of high demand.
    • Furthermore, Gauntlet looks at how a given market historically hovers around certain utilization ranges. The kink should align with a percentile threshold of typical utilization.
  • Are there specific metrics (e.g., average utilization rates, historical data) that guide this decision?
    • Both average utilization rates and historical utilization guide the kink values. Furthermore, trade-offs between capital efficiency and rate volatility also play crucial factor in determining the kink value.
    • Also see our analysis around IR curve recommendations to gain further insights into the rationale:

2. supplyPerYearInterestRateSlopeLow and borrowPerYearInterestRateSlopeLow

  • What factors define the slope of the interest rate curve below the kink?
    • Based on utilization - if the utilization falls under the kink, slope1 can be adjusted to recalibrate APRs below the kink.
  • How do these parameters balance incentivizing supply and borrowing?
    • The negative reserve growth should also guide setting slope1 at a level that promote supplies and borrows while not diminishing the reserves

3. supplyPerYearInterestRateSlopeHigh and borrowPerYearInterestRateSlopeHigh

  • How is the steep increase in interest rates above the kink calculated?

    • Primarily focused on establishing maximum borrow APRs to prevent liquidity crunches, even under peak utilization, while keeping them balanced to avoid excessive volatility in post-kink APRs.
    • If utilization trends above kink, the protocol must disincentivize further borrowing or strongly incentivize new supply. Gauntlet’s adjusts supplyPerYearInterestRateSlopeHigh and borrowPerYearInterestRateSlopeHigh to bring this desired outcome.
  • Are there specific risk models or stress scenarios that inform this parameter?

    • For risk management, we employ a “bounded competition” to ensure rates remain competitive enough to maintain market share while incorporating sufficient safety margins. This includes:
      • Analyzing the correlation of utilization spikes across protocols to assess systemic risks
      • Maintaining rate differentials that allow for gradual rather than sudden capital movements

4. supplyPerYearInterestRateBase and borrowPerYearInterestRateBase

  • What considerations affect the base interest rates for suppliers and borrowers?
    • Base rates determine the minimum borrower rate that is worth considering for the protocol. Base interest rates are carefully calibrated to balance reserve growth and borrowing costs. For stablecoins, a base rate of 0.015 is used to ensure reserve growth without creating undue pressure on borrowers. Lower rates lead to stronger reserve growth, while higher rates (e.g., around 0.03) result in a shallower low slope, increasing borrowing APRs at mid-level utilizations. This ensures the protocol maintains a healthy equilibrium between reserves and borrowing incentives.
    • For example, a stablecoin might have a higher base rate due to natural borrowing costs compared to WETH.
  • How are these values adjusted for different asset types or market conditions?
    • Gauntlet compares yield curves and base rates across multiple protocols and aggregates data to determine competitiveness and appropriate pay-off for the supply and borrow APR curves.

Cross-Network Differences

  • Why do the same basic assets (e.g., USDC) have different curve parameters on networks like Optimism and Polygon?
    • L2s and other chains may exhibit different liquidity depths, user behaviors, and arbitrage patterns. These differences lead to separate supply/borrow behavior.
  • Are network-specific factors such as ecosystem activity, liquidity, transaction costs, or governance policies considered?

Additional Market Parameters

1. Storefront Price Factor

  • What is the role of the Storefront Price Factor in determining market pricing?

    • Storefront price factor sets the fraction of the liquidation penalty that goes to buyers of collateral instead of the protocol. For example, if storefront price factor equals 60%, given a liquidation penalty of 5%, buyers can claim 5% * 60% = 3% discount.
  • How is this value calculated, and what data points are used (e.g., spot prices, volatility)?

    • Increase in Storefront Price Factor: Triggered when there is a noticeable increase in system risk or total value locked (TVL).
    • It can be preemptively adjusted in anticipation of higher risk, such as the setup of riskier positions or significant TVL growth without corresponding improvements in market liquidity.
    • Decrease in Storefront Price Factor: Occurs when reserves experience substantial declines, ensuring the protocol maintains sufficient buffer for insolvency protection.
    • Also see our analysis that dives in deeper regarding the liquidation mechanisms

    While the Storefront Price Factor is primarily influenced by the overall protocol loan-to-value (LTV) ratio, adjustments are deliberately conservative. This parameter applies uniformly across all collaterals, and frequent changes could have unintended system-wide effects. For example, addressing risk in a specific collateral (e.g., COMP) is more effectively managed by altering its liquidation penalty or liquidation threshold rather than the Storefront Price Factor, which affects all collaterals and the protocol’s reserve growth.

  • Does this parameter account for slippage or other factors during liquidation events?

    • Yes, it’s lower bounded by slippage

2. Target Reserves

  • What methodology is used to define the appropriate reserve level for a market?

    • Can refer the discourse and explanation here
  • Are factors such as expected liquidation volume, market utilization, or network activity used in this calculation?

    • See above
  • How does the reserve target adapt to changing market conditions, if at all?

    • See above
2 Likes

Hi, @Gauntlet Team,
Thanks for your detailed responses about parameter determination for Compound protocol markets and collateral. Your expertise is valuable for our Compound Sandbox project.
However, some aspects need clarification or further detail. We look forward to your responses to the additional questions below to better understand your methodologies.
To deliver a solid outcome, we’re also inviting https://www.chainrisk.xyz/ led by @Sudipan_Chainrisk to join us in refining calculations based on the material provided by Gauntlet above and the set of clarifying questions listed below. We appreciate your contribution.

Clarification list

Collateral Parameters:

  1. Could you provide detailed quantitative examples of how price impact thresholds influence BorrowCollateralFactor adjustments?
  2. How are historical liquidation premiums quantified for determining LiquidateCollateralFactor?
  3. Are there specific metrics or thresholds (e.g., slippage or deposit concentration) that guide SupplyCap limits?
  4. Have you ever had a situation where you increased the buffer between borrowCF and liquidateCF? Can you give an example?
  5. Does the buffer size depend on the frequency of price updates by Oracle?
  6. What limits do you know for volatile tokens in the current Compound V3? How volatile tokens can be used with each other. For the AERO market, the collateral factor for USDC is already 65%.
  7. How much does the frequency of updating oracles affect the risks? If somebody provides oracles with higher price update rates, is it possible to improve the use of collators?

Interest Rate Curve:

  1. How do kink adjustments differ across asset classes or market conditions?
  2. What stress-testing methodologies are used to validate slope adjustments?

Storefront Price Factor & Target Reserves:

  1. Could you share case studies or examples showing adjustments to the Storefront Price Factor?
  2. What is the exact framework for linking liquidation risks to reserve targets?

Your input on these areas would be immensely helpful in refining our design and ensuring robust implementation. Thank you again for your continued support and collaboration.

1 Like

[WOOF!] Sandbox Development Report

Dec 11, 2024 - Jan 17, 2025

Hello, Compound residents! In line with the Compound Sandbox initiative, WOOF! has launched the discovery phase to organize and prepare the development process.

During this phase, we explored the overall application logic and its components. The output and functionality requirements are being documented in a comprehensive document that will be presented to Compound residents in a report by the next two weeks (Jan 31).

The dedicated team created wireframes for the Sandbox Market Factory, showcasing the creation market stage and related functionalities for creators and other users such as fee and market ownership transfering. Transferring market ownership to the Compound has been defined as well.

Regarding development, we began studying the core part of the application, specifically the PID Controller — an on-chain mechanism that dynamically determines collateral parameters. These parameters can vary significantly for each market based on asset-specific characteristics. Our goal is to understand the main parameters for the calculation and the methodology behind setting collateral-related parameters for each Comet market.

In addition to collateral parameters, we are interested in understanding how market-specific parameters are determined. These include factors influencing the interest rate curve and additional parameters affecting market behavior.

To align the Sandbox PID Controller with Compound’s risk management standards, we have requested Gauntlet to provide inputs on the following document.

In the first decade of January, we received thorough and insightful responses to our inquiries. However, some aspects need clarification or further detail. To deliver a solid outcome, we are going to invite Chain Risk to join us in refining calculations based on the material provided by Gauntlet and the set of clarifying questions listed by WOOF! team.

Our focus and next steps:

  • Determine collateral and market-specific parameters.
  • Finalize the Software Requirements Specification (SRS).
  • Develop architecture for smart contracts.
  • Define the scope and tasks for each development direction:
    • Frontend.
    • Backend.
    • Smart contract.
1 Like

Thanks for inviting us to collaborate here ! We have started working on this internally and will come up with a concrete solution for PID soon.

1 Like

[WOOF!] Subtotal community report on the Compound Sandbox initiative | Jan 24, 2025

Due to the intermediate stage of the discovery phase of the Compound Sandbox initiative, the WOOF! company formed and documented the logic of the main functional parts of the application and visualized their interactions in the block diagram.

The document “SRS v0.01 for Community” includes the following main sections:

  1. Glossary: ​​Describes key terms and roles in the context of the document, such as Creator, PID Controller, Commissions, Community Pool, and others.

  2. Sandbox Community Pool: Describes the reward mechanism for Market Creators, who earn COMP tokens depending on the success of their markets.

  3. PID Controller: Manages and controls markets, storing data and market settings.

  4. Markets Factory: Creates a new market through smart contracts.

  5. Market: Covers multiple functions, including:

  • Setting the pauseGuardian address.
  • Asset borrowing capabilities.
  • Liquidation.
  • Closing the market by the creator.
  • Transfer of market ownership by the creator.
3 Likes

We appreciate WOOF!'s detailed specification for the Sandbox. This brief review identifies potential areas for improvement and includes comments and questions on topics such as the discount model, collateral addition rules, market closure assumptions, and correctness of calculations.

[SCP] Buy fees with discount in exchange for COMP tokens

  • The protocol’s fixed 5% discount model guarantees a loss when selling accrued fees, which raise the question: why would the protocol systematically accept such a loss? Given the gradual accumulation of fees over time, selling accrued fees is unlikely to cause much slippage. A more efficient approach would be to dynamically compare the slippage cost of selling tokens through a DEX aggregator (e.g., 1inch) or intent-based DEX (CoW) against the fixed 5% discount. If the slippage is below 5%, the protocol should execute the trade directly; if not, it could revert to the discounted sale. This avoids unnecessary losses and caps the unexpected high slippage.
  • The original proposal’s statement “Selling these tokens on third-party DEXs could expose the protocol to risks like impermanent loss” is inaccurate because impermanent loss impacts liquidity providers (LPs), not the sell of tokens.
  • The wording of the section’s title is confusing. Based on the description, it could mean “Users buy the protocol’s accrued fees with COMP tokens at a discount.”

[SCP] Add new collateral asset using governance proposal

  • Could you clarify whether the “Sandbox Token” is a new governance token that forked from COMP, and if so, what is the technical or functional relationship between the two?
  • The specification states that adding new collateral tokens require a governance proposal (“The proposer drafts the proposal to add a new token”), yet the [SCP] Create New Market section implies that creators can freely select collateral assets from a pre-approved list.
    • Does “add new collateral tokens” via the governance proposal simply mean adding the token to a pre-approved list of supported collateral assets? Or does it also entail adding the collateral token directly to a specific market and configuring its parameters (e.g., collateral factor) within that market?
    • Can a creator add new collateral tokens to a market after it’s created, or are they limited to the initial selection?

[SCP] Close Market by Creator when totalBorrow is zero (without SCP)

  • The assumption that “all Borrowers have returned the borrowed base asset” is unrealistic, as evidenced by legacy markets in Compound v2, where deprecated markets retain non-zero borrow balances even years after deprecation. To address this, the protocol should implement a borrow threshold (e.g., total borrow < $10,000) as a criteria for market closure. If outstanding debts persist, mechanisms such as debt auctions (similar to MakerDAO’s Emergency Shutdown) or debt redistribution (like Liquity’s Redistribution) could be used to settle obligations without requiring full repayment.

[SCP] Liquidation

  • Does Sandbox intend to use the exact same liquidation mechanism as Compound III, or will it use the Compound v2 model? The specification mentions the absorb function but doesn’t mention the Store Front Price Factor, a key component of Compound III’s liquidation process.
  • Incorrect Effective Supply and Liquidation Threshold calculation
    • Collateral and liquidation factors are asset-specific and should not be averaged.
    • Error in Original Spec:
      • Cumulative Supply = 10 AERO * $1.2 + 10 LINK * $15.51 = $167.1
      • Effective Supply = $167.1 * (0.6+0.65) / 2 = $104.43
    • Correct Calculation:
      • Effective Supply = 10 AERO * $1.2 * 0.6 + 10 LINK * $15.51 * 0.65 = $108.015

[SCP] Borrowing asset

  • LINK prices typo
    • $23.51 in the assumption and $32.51 in the formula
  • Borrow limit calculation typo
    • Correct: Borrow Limit = Collateral Value * Collateral Factor
    • Error: Borrow Limit = (10 * 1.48 / 0.6) + …
2 Likes

Thanks for the feedback, @platonia! Appreciate that!

I will answer some questions before @dmitriywoofsoftware will revert with more technical answers.

[SCP] Buy fees with discount in exchange for COMP tokens
Same to liquidations, we can’t track all possible liquidity sources to swap fees into COMP, that’s why we allow users to execute this swap. Also, we would like to accrue fees to Compound Treasury in COMP since it should be more safe from legal perspective and bring more value to COMP. Also important to mention that Compound DAO pays to service provider in COMP at the moment.

We are open to alternatives.

[SCP] Add new collateral asset using governance proposal
We will fix wording from our side and come back. Thank you for flagging this.

[SCP] Close Market by Creator when totalBorrow is zero (without SCP)
IMHO, assets of users shall be protected. No matter how much TVL is there.

[SCP] Liquidation
Liquidations will be the same as on Compound v3.

Also thanks for flagging typos!

1 Like