You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Develop Liquidity Change Tracking Functionality with Linked List for Guardian Contract
Issue Description:
Background:
Our current implementation of the Guardian contract lacks an efficient way to track and manage liquidity changes over time for various tokens. We require a system that can dynamically track these changes, enforce withdrawal rate limits, and optimize gas usage during contract interactions.
Objective:
The goal is to develop a functionality within the Guardian contract that utilizes a linked list structure to track liquidity changes (LiqChangeNode) for each token. This system should efficiently manage historical data, enforce rate limits, and allow for dynamic updates as time progresses.
Key Requirements:
Linked List Implementation: Develop a linked list structure where each node (LiqChangeNode) represents a liquidity change event (inflow or outflow) with an associated timestamp.
Historical Liquidity Tracking: The system must maintain a historical record of liquidity changes for each token, allowing the contract to calculate current and future liquidity based on past events.
Dynamic Time Window Management: Implement functionality to dynamically add new liquidity events to the tail of the list and remove outdated events from the head, based on the withdrawalPeriod for each token.
Rate Limit Enforcement: Utilize the linked list to enforce withdrawal rate limits per token. The contract should be able to assess if a withdrawal request exceeds the set limits by examining the liquidity changes within the relevant time frame.
Grace Period Handling: After a rate limit breach, the system should support a grace period where withdrawals can be temporarily allowed under certain conditions (e.g., admin override).
Gas Optimization: Include mechanisms to clear irrelevant historical data from the linked list to optimize gas costs for future interactions with the contract.
Documentation and Testing: Provide comprehensive documentation for the new functionality, including its design, usage, and limitations. Also, develop a suite of tests to cover various scenarios, including edge cases, to ensure reliability and security.
Acceptance Criteria:
Linked list structure for tracking liquidity changes is implemented and integrated with the Guardian contract.
Functionality for adding and removing liquidity change events from the linked list is fully operational and gas-efficient.
Withdrawal rate limits can be enforced based on the liquidity changes recorded in the linked list.
Grace period functionality is correctly handled post-rate limit breaches.
Gas optimization measures for managing historical data in the linked list are implemented.
Comprehensive documentation and a full suite of tests are provided.
GitHub Issue Title:
Develop Liquidity Change Tracking Functionality with Linked List for Guardian Contract
Issue Description:
Background:
Our current implementation of the Guardian contract lacks an efficient way to track and manage liquidity changes over time for various tokens. We require a system that can dynamically track these changes, enforce withdrawal rate limits, and optimize gas usage during contract interactions.
Objective:
The goal is to develop a functionality within the Guardian contract that utilizes a linked list structure to track liquidity changes (
LiqChangeNode
) for each token. This system should efficiently manage historical data, enforce rate limits, and allow for dynamic updates as time progresses.Key Requirements:
Linked List Implementation: Develop a linked list structure where each node (
LiqChangeNode
) represents a liquidity change event (inflow or outflow) with an associated timestamp.Historical Liquidity Tracking: The system must maintain a historical record of liquidity changes for each token, allowing the contract to calculate current and future liquidity based on past events.
Dynamic Time Window Management: Implement functionality to dynamically add new liquidity events to the tail of the list and remove outdated events from the head, based on the
withdrawalPeriod
for each token.Rate Limit Enforcement: Utilize the linked list to enforce withdrawal rate limits per token. The contract should be able to assess if a withdrawal request exceeds the set limits by examining the liquidity changes within the relevant time frame.
Grace Period Handling: After a rate limit breach, the system should support a grace period where withdrawals can be temporarily allowed under certain conditions (e.g., admin override).
Gas Optimization: Include mechanisms to clear irrelevant historical data from the linked list to optimize gas costs for future interactions with the contract.
Documentation and Testing: Provide comprehensive documentation for the new functionality, including its design, usage, and limitations. Also, develop a suite of tests to cover various scenarios, including edge cases, to ensure reliability and security.
Acceptance Criteria:
Assignees:
The text was updated successfully, but these errors were encountered: