ArkProject is a liquidity layer for digital assets, uniting markets, empowering creators, and bridging the gap to mass adoption. Built on top of Starknet, ArkProject is designed to provide a fully decentralized and trustless orderbook on-chain.
We need to introduce a whitelisting mechanism for brokers in our Orderbook. A broker, in our context, is an entity authorized to perform order creation & fulfillment. Our system should include two types of brokers:
a) Marketplace brokers that are rewarded when an order is created. creator_broker
b) Marketplace brokers that are rewarded when an order is fulfilled. fulfiller_broker
Theses two will be send to Starknet L2 when the order is executed.
Requirements
Whitelisting Functionality: Implement a function to whitelist brokers. This function should manage the list of marketplaces and projects authorized to act as brokers.
Broker Validation in Order Creation and Fulfillment:
In the order creation process, validate if the broker is whitelisted. Reject the creation if no broker is detected or if a non-whitelisted broker is involved.
Similarly, for order fulfillment, ensure that the fulfilling broker is whitelisted and reject the transaction if it's not.
Feature Description
We need to introduce a whitelisting mechanism for brokers in our Orderbook. A broker, in our context, is an entity authorized to perform order creation & fulfillment. Our system should include two types of brokers: a) Marketplace brokers that are rewarded when an order is created. creator_broker b) Marketplace brokers that are rewarded when an order is fulfilled. fulfiller_broker
Theses two will be send to Starknet L2 when the order is executed.
Requirements
Whitelisting Functionality: Implement a function to whitelist brokers. This function should manage the list of marketplaces and projects authorized to act as brokers.
Broker Validation in Order Creation and Fulfillment:
Implementation Details
Whitelist Broker Function:
Broker Validation in Validate Common Data Function:
validate common data
function.Please feel free to ask for any clarifications or additional details needed.