Skip to content

SC: Implement Order Book for Trading Artist Shares #19

@jedstroke

Description

@jedstroke

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.

Metadata

Metadata

Assignees

Labels

onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weeksmart contract

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions