The system consists of two main contracts:
RepoTokenLinkedListStorageV1: Defines the storage layout
RepoTokenLinkedListStorageV1
RepoTokenLinkedList: Implements the core trading logic and access control
RepoTokenLinkedList
OpenZeppelin Upgradeable contracts for:
Access Control
Pausable functionality
Reentrancy protection
UUPS upgradeability pattern
Integration with Term Protocol contracts:
TermController
TermDiscountRateAdapter
TermRepoServicer
The contract uses a linked list implementation for efficient listing management, with separate queues for each RepoToken.
Last updated 1 year ago
struct Listing { address seller; address token; uint256 amount; uint256 next; uint256 prev; } struct Queue { uint256 head; uint256 tail; }