honey-potPoL Security Guidelines: Oracle and HONEY

Threat 1: External Oracle Price Manipulation and Unreliable Oracle Logic

External oracle price manipulation and unreliable oracle logic (e.g., reliance on a single oracle, asymmetric processing) can lead to protocol losses or user harm during the HONEY token minting/redeeming process.

Impact

Low

Relying on a single oracle or failing to clearly inform users during a de-pegging event can lead to user harm. It is also potentially vulnerable to price manipulation via Flash Loans, so it is rated Low.

Guideline

  • Use the median or weighted average of at least three independent oracle feeds as the final price.

  • Specify the oracle process (add, modify, delete):

    • Add: A governance vote is required to add a new oracle.

    • Modify: A minimum of 72 hours advance notice and a governance feedback period are required to adjust the weight of an existing oracle.

      • 72-hour advance notice: Ensures sufficient time for governance participation.

    • Delete: A replacement oracle is required when removing an oracle feed.

    • Emergency Halt:

      • Authority: Limited to a multisig or a manager elected by governance.

      • Post-halt process: A community announcement and recovery plan must be submitted within 24 hours.

      • Recovery procedure: Requires governance approval.

  • Specify the processing logic for oracle anomalies:

    • Automatically exclude an oracle from aggregation if its connection is delayed by more than 30 seconds.

    • Reduce the weight by 70% if the deviation from the median of other feeds exceeds Β±0.1%, and automatically exclude it if it exceeds Β±0.15%.

      • Β±0.1% warning: 50% of the Honey pegging tolerance (0.2%).

      • Β±0.15% exclusion: 75% of the Honey pegging tolerance (0.2%).

    • Price determination must reference at least three oracles; otherwise, temporarily suspend trading.

    • Reactivating a deactivated oracle requires verification (reason for deactivation, feasibility of reactivation).

    • Automatic switch to a secondary oracle if the primary oracle fails.

  • Warn users if the oracle price fluctuates beyond a preset threshold:

    • Threshold setting: User warning if the 1-minute price exceeds Β±0.1%, Circuit Breaker if it exceeds Β±0.15%.

    • Threshold change: A minimum of 72 hours advance notice and a governance feedback period are required to change the threshold.

  • Check for logical asymmetry between oracles.

    • Generalization is needed instead of specific oracle logic like "If the spot oracle price exceeds $1.00, treat it as $1.00."

  • Mitigate the impact of real-time oracle manipulation attacks by determining prices based on a TWAP over a certain period.

  • To prevent economic attacks that exploit severe de-pegging of the HONEY token, consider introducing a mechanism that requires a trading delay or additional verification when an abnormal surge in trading volume or a repetitive attack pattern is detected.

Best Practice

HoneyFactory.solarrow-up-right

HoneyFactory.solarrow-up-right

Custom Code


Threat 2: Exploitation of Overly Sensitive De-pegging Criteria and Basket Mode Activation Conditions

Criteria that consider very low levels of price fluctuation as de-pegging can frequently activate Basket Mode even with minor market volatility, harming the user experience.

There is also a possibility that an attacker could intentionally induce a slight de-pegging of a specific constituent stablecoin to trigger Basket Mode and trick users into minting or redeeming with an unexpected asset composition ratio.

For example, if redemption through Basket Mode is forced even when only some of the multiple constituent stablecoins are slightly de-pegged, users who wanted to receive only normally pegged assets are at risk of receiving unwanted assets.

Impact

Informational

If the minting and redeeming logic's basket modes operate separately, it can cause confusion. It is recommended to improve user convenience through a more granular basket mode, so it is rated Informational.

Guideline

  • Sensitivity Adjustment Criteria: Instead of having separate basket modes for minting and redeeming, apply different stages of basket mode based on the price fluctuation rate23.

    • Warning Stage (0.1%): User notification if it persists for 1 minute.

    • (Temporary De-pegging) Restriction Stage (0.2%): Restrict minting of the asset and adjust the exchange ratio if it persists for 1 minute.

    • (De-pegging) Basket Stage (0.5%): Immediately activate Basket Mode if it persists for 1 minute.

  • Basket Mode activation should be considered a last resort for maintaining stability and should be automatically deactivated when the pegged asset's stability is restored.

Best Practice

HoneyFactory.solarrow-up-right

Custom Code


Threat 3: Uncertainty in Valuation and User Notification When Redeeming De-pegged Assets

If there are no clear standards and notifications about 'at what price de-pegged assets are valued and returned to the user' and 'how much potential loss the user must bear in this process,' users cannot accurately assess the value of the tokens they will receive in basket mode.

Impact

Informational

This is a threat in terms of user convenience, so it is rated Informational.

Guideline

  • When redeeming while Basket Mode is active, the value of the de-pegged asset is assessed by referencing at least 3 oracles25 (Currently, Berachain references reliable Chainlink oracles along with Pyth and spot oracles.).

    • In this process, only active oracles are referenced (deactivated, emergency-halted oracles are prohibited).

  • A clear and simple procedure is needed to notify users that de-pegged assets may be included in the redemption, the valuation criteria for de-pegged assets, and the potential for loss.

  • If necessary, consider operating an internal reserve fund at the protocol level to partially mitigate the risk of sudden losses from de-pegged assets.

    • The reserve fund is composed of a portion of the fees generated during the redemption process and is operated as an internal reserve.

    • The reserve fund is activated only when basket mode is active and is used to minimize user losses.

Best Practice

HoneyFactory.solarrow-up-right

Custom Code

Last updated