Skip to content

Add receivedAmount in Order struct #685

Description

@hilmarx

For some use cases, it would be quite helpful to know on-chain how many buyTokens were received from a given order, as the Order Struct currently only stores the usedAmount.

Maybe something like that:

struct Order {
        uint16 buyToken;
        uint16 sellToken;
        uint32 validFrom; // order is valid from auction collection period: validFrom inclusive
        uint32 validUntil; // order is valid till auction collection period: validUntil inclusive
        uint128 priceNumerator;
        uint128 priceDenominator;
        uint128 usedAmount; // remainingAmount = priceDenominator - usedAmount
        uint128 receivedAmount; 
}

An example of such use case would be if someone would like to know on-chain how much of the buyTokens were sold and hence can safely be requested to be withdrawn at a later time without potentially overriding another concurrent order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions