Description:
We need to build a minimal on-chain order book for buying and selling artist shares. This would allow early supporters, fans, or speculators to trade their share of an artist's success, similar to NFTs or tokens, but aligned with our custom share standard.
Core Features:
-
Users can place limit buy or limit sell orders for artist shares.
-
Shares are ERC-20-like or a custom standard.
-
Matching engine processes trades either fully on-chain or via off-chain matching with on-chain settlement.
Tasks:
-
Design Order struct (type, amount, price, user, token_address).
-
Implement placeBuyOrder() and placeSellOrder() functions.
-
Implement cancelOrder() and matchOrders() logic.
-
Ensure trades respect ownership and token transfer approvals.
-
Gas optimization for large order books.
Note: Orders can be placed for any supported token by referencing its token address within the order.
Description:
We need to build a minimal on-chain order book for buying and selling artist shares. This would allow early supporters, fans, or speculators to trade their share of an artist's success, similar to NFTs or tokens, but aligned with our custom share standard.
Core Features:
Users can place limit buy or limit sell orders for artist shares.
Shares are ERC-20-like or a custom standard.
Matching engine processes trades either fully on-chain or via off-chain matching with on-chain settlement.
Tasks:
Design
Orderstruct (type, amount, price, user, token_address).Implement
placeBuyOrder()andplaceSellOrder()functions.Implement
cancelOrder()andmatchOrders()logic.Ensure trades respect ownership and token transfer approvals.
Gas optimization for large order books.
Note: Orders can be placed for any supported token by referencing its token address within the order.