Core Architecture

Contract Structure

The system consists of two main contracts:

Key Dependencies

Storage Structure

Listing Management

struct Listing {
    address seller;
    address token;
    uint256 amount;
    uint256 next;
    uint256 prev;
}

struct Queue {
    uint256 head;
    uint256 tail;
}

The contract uses a linked list implementation for efficient listing management, with separate queues for each RepoToken.

Last updated