Skip to content

Conversation

@jose-velasco-ieu
Copy link
Contributor

@jose-velasco-ieu jose-velasco-ieu commented Nov 5, 2025

📝 PR Summary

This draft PR proposes Daml changes related to CIP-0082Establish a 5% Development Fund.

⚠️ Disclaimer

  • No tests have been implemented yet.
  • This PR is not production-ready.
  • Pre-commit checks were skipped.

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

Copy link
Contributor

@meiersi-da meiersi-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Nice work!

wdyt about doing the change wrt where the configs are stored, and then implementing the Daml tests before pinging for another review?

-- See Splice.Scripts.Parameters for concrete values.
data DevelopmentFundConfig = DevelopmentFundConfig
with
beneficiary : Party
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this design it makes sense to not have to specify a beneficiary at all times. This can be useful to decouple the time when the fund issuance is activated from the time when the collection and funds management rules are setup and implemented.

I'd thus suggest that we make the party optional here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

issueValidatorRewards = True
executeTransfer rewardsConfig context dso transfer
configUsd = getValueAsOf now configSchedule
executeTransfer rewardsConfig context dso configUsd.developmentFundConfig transfer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid repeatedly reading the config. Instead extend:

data TransferContextSummary = TransferContextSummary with
featuredAppProvider : Optional Party
config : TransferConfig Amulet
openRound : OpenMiningRound
issuingMiningRounds : Map Round IssuingMiningRound
validatorRights : Map Party (ContractId ValidatorRight)
deriving (Eq, Show)
with the config you need.

Actually, if we put developmentFundBeneficiary into the TransferConfig record, then we already get its value at exactly the right place. That should simplify the code quite a bit.

I'd then put the developmentFundPercentage into the IssuanceConfig where we also define all the tranches.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to double-check: with this new approach, DevelopmentFundConfig is gone, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

let params = computeIssuingRoundParameters
miningRound.tickDuration miningRound.amuletPrice miningRound.issuanceConfig summary
let
optDevelopmentFundPercentage = (.percentage) <$> (getValueAsOf now configSchedule).developmentFundConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally try to pin all parameters for a round as part of round creation to avoid surprises when issuance configs change.

With my proposal above of putting developmentFundPercentage into IssuanceConfig you get this for free.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jose-velasco-ieu
Copy link
Contributor Author

and then implementing the Daml tests

Are you referring to implementing the full Daml test suite to cover all the new scenarios?
@meiersi-da

@meiersi-da
Copy link
Contributor

and then implementing the Daml tests

Are you referring to implementing the full Daml test suite to cover all the new scenarios? @meiersi-da

yes

jose-velasco-ieu and others added 12 commits November 6, 2025 15:09
Signed-off-by: Jose Velasco - IEU <[email protected]>
…ate a DevelopmentFundCoupon contract in AmuletRules_MiningRound_StartIssuing

Signed-off-by: Jose Velasco - IEU <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
jose-velasco-ieu and others added 11 commits November 6, 2025 15:09
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
Co-authored-by: Simon Meier <[email protected]>
Signed-off-by: Jose Velasco - IEU <[email protected]>
…n from collection and fund management setup

Signed-off-by: Jose Velasco - IEU <[email protected]>
…ntFundPercentage and TransferConfig.optDevelopmentFundBeneficiary

Signed-off-by: Jose Velasco - IEU <[email protected]>
@jose-velasco-ieu
Copy link
Contributor Author

and then implementing the Daml tests

Are you referring to implementing the full Daml test suite to cover all the new scenarios? @meiersi-da

yes

Done
I think it's ready for a second review

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.

5 participants