Crank fees are determined based on a combination of factors aimed at ensuring the efficient and stable operation of the protocol, particularly during periods of network congestion. Here's a detailed explanation of how crank fees are determined:
- Gas Costs: The primary factor in determining crank fees is the cost of gas on the blockchain network. Gas is a unit that measures the amount of computational effort required to execute operations like transactions or smart contracts. Since crank bots perform essential functions such as liquidations, order triggering, and the execution of funding and borrow fee payments, the gas costs incurred during these operations significantly influence the crank fee amount.
- Network Congestion: During periods of high network activity or congestion, gas prices tend to increase due to the higher demand for transaction processing. Crank fees are adjusted based on these congestion-time gas prices to ensure that the incentives for performing crank operations remain aligned with the increased costs. This adjustment ensures that participants are adequately compensated for their contributions, even when the network is busy.
- Decentralization and Security Incentives: The determination of crank fees also considers the need to incentivize participants sufficiently to maintain decentralization and security. High enough crank fees during congestion ensure that the protocol can continue to operate efficiently and safely by encouraging a distributed network of participants to engage in crank operations.
- Protocol Efficiency and Stability: The goal is to balance the crank fees in a way that they cover the necessary costs and incentivize participation without becoming prohibitively expensive for users. This balance is crucial for maintaining the protocol's efficiency and stability, ensuring that operations are carried out smoothly and positions are managed effectively.
- Market Dynamics and User Impact: Lastly, the impact of crank fees on users, especially those with smaller positions for whom these fees might represent a more significant portion of total costs, is considered. The protocol aims to manage these fees to minimize adverse impacts on user experience while maintaining the necessary incentives for protocol operations.
In summary, crank fees are determined by assessing gas costs, network congestion levels, the need for decentralization and security, the overall efficiency and stability of the protocol, and the impact on users. The objective is to ensure that the protocol remains functional, secure, and user-friendly, even during periods of high network activity.