wen-community / wen-program-library

Apache License 2.0
87 stars 18 forks source link

WEN Royalties Interface #105

Open kespinola opened 4 days ago

kespinola commented 4 days ago

Issue

The WEN Royalties Distribution is handling both royalty payout and enforcement.

The program is unable to payout creators in the sell flow and instead requires escrow accounts that need to be claimed by the creator.

Additional Metadata Fields Spec

royaltyBasisPoints: u16
`{creator_1}`: share
...
`{creator_n}`: share

Goal

Payout creators in the same transaction fulfilling the sale while still doing an enforcment check that the cpi program is respecting royalties via transfer.

No need for additional accounts on state to serve as escrow or approvals. The system works off of only the WNS mint account.

Strategy

kespinola commented 4 days ago

Consider refactoring wen_royalties_distribution program to use the wen-royalties-inferface.

https://github.com/wen-community/wen-program-library/blob/main/programs/wen_royalty_distribution/src/state.rs#L4