Skip to content

FUN-411. Double royalty pool#55

Merged
Bromel777 merged 2 commits intomainfrom
fun-411-double-royalty-pool
Oct 21, 2025
Merged

FUN-411. Double royalty pool#55
Bromel777 merged 2 commits intomainfrom
fun-411-double-royalty-pool

Conversation

@Bromel777
Copy link
Collaborator

@Bromel777 Bromel777 commented Jun 10, 2025

This pull request introduces a new type of pool called Double Royalty Pool. Generally, the Double Royalty Pool is an extension of the existing Royalty Pool, with a few key additions:

New royalty pool fields (line 76)
Field for a second royalty public key (line 81)
All existing royalty pool math now takes these new fields into account, for example:
Royalty calculation logic updated (line 227)

The following contracts were also updated to support the new royalty model:

PDoubleRoyaltyDeposit.hs
PDoubleRoyaltyRedeem.hs
These contracts take the new fields into account in their calculations.

The PDoubleRoyaltyWithdrawPool.hs contract (which validates royalty withdrawals) now works with two royalty keys and determines the correct withdrawer based on a value provided in the redeemer.

Additionally, the Royalty Pool DAO v1 contract was extended to support the new format. It now validates and prevents unauthorized changes to the new fields during DAO actions.

New scripts:
PDoubleRoyaltyDAOV1.hs
PDoubleRoyaltyDeposit.hs
PDoubleRoyaltyPool.hs
PDoubleRoyaltyRedeem.hs
PDoubleRoyaltyWithdrawPool.hs

This PR also includes a small fix for the following contracts related to the DAO v1 orders approach:

PBalancePool.hs
PPool.hs
A Nonce field was added to the pool datum in both cases to support new DAO-related flows.

@Bromel777 Bromel777 force-pushed the fun-411-double-royalty-pool branch 2 times, most recently from 72a3e45 to a3dd046 Compare June 13, 2025 10:23
@Bromel777 Bromel777 force-pushed the fun-411-double-royalty-pool branch 2 times, most recently from 28368ff to aaff4c9 Compare June 23, 2025 19:07
@Bromel777 Bromel777 requested review from AOranov and oskin1 June 23, 2025 19:28
AOranov
AOranov previously approved these changes Jun 24, 2025
AOranov
AOranov previously approved these changes Jul 22, 2025
@Bromel777 Bromel777 force-pushed the fun-411-double-royalty-pool branch from df2cc5b to ef2e529 Compare October 21, 2025 08:02
@Bromel777 Bromel777 merged commit f10d678 into main Oct 21, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants