Horizon Academy
English V3
English V3
  • Horizon Academy
  • Horizon Protocol
    • Introduction
      • Tokenomics
      • Business Model
      • Synthetic Assets - zAssets
    • Security Audit
    • Community
      • How to Initiate a HIP
      • HIPs
        • HIP-23 Revenue Sharing Model: Intent-based System Phase one
        • HIP-22: Create a zUSD - USDC pool on Pancakeswap V3
        • HIP-21: Stop Incentives to the zBNB - BNB pool on Wombat Exchange
        • HIP-20: Suspend zMATIC Market and Introduce zPOL Ahead of MATIC to POL Migration
        • HIP-19: Temporarily reduce C-Ratio to 350%
        • HIP-18: Add DOGE and SHIBA to Horizon Futures
        • HIP-17: Add DOT, AVAX, and MATIC to Horizon Futures
        • HIP-16: Add XRP, ADA, and LINK to Horizon Futures
        • HIP-15: Add SOL to Horizon Futures
        • HIP-14: Reduce Trading Fees during Horizon Futures Promotional Period
        • HIP-13: Suspend zNVDA market ahead of Stock Split and convert zNVDA to zUSD
        • HIP-12: Updated Utilization of zUSD & zBNB Liquidity
        • HIP-11: Redirect HZN from EARN Pool to PancakeSwap as ‘Bribe’ using Cakepie
        • HIP-10: Use zAssets from Community Fund staking to provide liquidity on Wombat via Yield Aggregator
        • HIP-9: Redirect HZN from EARN Pools to Wombat Exchange as ‘Bribes’
        • HIP-8: Move the zUSD-BUSD and zBNB-BNB Liquidity Pools to Wombat Exchange
        • HIP-7: Utilize the Community Fund for Additional Liquidity
        • HIP-6: Lower Target C-Ratio to 600% from 700%
        • HIP-5: List New zAssets
        • HIP-4: Use Keepers to Close Weekly Fee Periods
        • HIP-3: Suspend zTSLA ahead of Stock Split
        • HIP-2: Lower Target C-Ratio to 700%
        • HIP-1: Create incentivized zBNB/BNB pool
      • Community Grant Program
    • FAQs
  • Stake & Earn
    • Introduction
    • Staking on Horizon Protocol
      • Staking and Rewards
      • Mint, Burn, and Claim
      • Collaterialization and C-Ratio
      • Liquidation
      • Managing Risk
      • C-Ratio Strategies
      • Hedge your Portfolio
    • Interfaces
      • Account - Escrow
      • Account - Authorize
      • Account - History
    • Guides
      • How to Stake by Minting zUSD
      • Adding Liquidity for zUSD and zBNB pools
      • Add Liquidity for HZN-BNB
      • Remove LP Tokens for zUSD-BUSD Pool
      • Setting Up Chainlink Automation
  • Educational Articles
    • Glossary and Definitions
    • What are DeFi Derivatives and how are they used
    • A Brief History of Synthetic Assets and Financial Derivatives
    • DeFi Derivative Projects
Powered by GitBook
On this page
  • Summary
  • Specification
  • Motivation
  • Potential Risks
  • Considerations
  • Feedback & Questions
  1. Horizon Protocol
  2. Community
  3. HIPs

HIP-4: Use Keepers to Close Weekly Fee Periods

Use Chainlink Keepers for a decentralized automated closing of the weekly fee periods

PreviousHIP-5: List New zAssetsNextHIP-3: Suspend zTSLA ahead of Stock Split

Type: Horizon Improvement Proposal Date: August 30th, 2022 Status: Draft 1 | Completed

Summary

Deploy a Keepers Upkeep contract and register a Keeper to automate the weekly fee period close.

Specification

  • Deploy a Keeper-compatible contract that automates the weekly period close to the BNB Chain mainnet

  • Register and fund the Keeper

Motivation

The closeCurrentFeePeriod() function in the FeePool contract is responsible for closing the current week’s collected fees and rewards and starting a new period each week (Claim Day). This function will also migrate any unclaimed rewards from the previous claimable period to the current claimable period, snapshot the fees/rewards for users for the new claimable period, and start a new period.

While the Horizon Protocol team actively maintains the closure of the fee period each week, this can also be done by anyone in the community, as the closeCurrentFeePeriod() is a public function that anyone can execute.

The integration of Chainlink Keepers to automate this important protocol maintenance operation will help mitigate potential scenarios where the function isn’t called on time and help further decentralize the protocol.

Potential Risks

The implementation of this HIP might come with some risks, including the following:

  • A minimum balance of LINK tokens must be maintained in the Keeper or it will not perform the upkeep

Considerations

Additional thoughts we should take into consideration:

  • Should there be any failure in the Keeper network, the community should be aware that they can also call the closeCurrentFeePeriod() themselves to help maintain the protocol.

Feedback & Questions

If you have any questions or concerns, please do not hesitate to reach out.

The Keepers upkeep will require ERC677 LINK tokens, which will be funded by the Community Fund. The Keeper Upkeep charges a (which is low relative to other networks) to the gas fee required to call the function in order to fund the upkeep operation on their network. The closeCurrentFeePeriod() function uses ~220,000 gas (~$0.30) on the BNB Chain mainnet, so the estimated cost of each transaction will be ~$0.40 paid in LINK tokens. Additionally, a must be maintained in the upkeep or it will cease to function.

30% premium
Minimum Balance