Derisking: two-party lock substitution. - #13
Conversation
| -- Using amount becuase the settlement legs below will all have this amount. nextIterationFunding maps will vary. | ||
| let Some [(_, amount)] = TM.toList substituteWithAllocation.allocation.nextIterationFunding | ||
|
|
||
| require "lock subjects must match between substituted allocations" $ |
There was a problem hiding this comment.
I'd suggest we do not require this. If the substitution controllers on the target are OK with, then we should just allow it.
I'd also suggest that we don't encode the vesting state in the proposal. Instead just copy it over from substituted allocation.
There was a problem hiding this comment.
Should be copying the vesting state from the substituted allocation, yes, but this implementation allows each side to decide which allocation of theirs to use when they approve, which means we do need to at least bound the vesting parameters to protect the party that made the offer. It ought to be a less-than and a copy in the vesting case.
For governance it seems surprising to allow lock suppliers to freely reassign locks between subjects gated only by the substitution controllers. I did consider putting that check at offer creation time, though, to let a non-subject-altering and subject-altering path share the offer type.
| substituteWithCid : ContractId AmuletAllocationV2 | ||
| topUpAllocationCid : Optional (ContractId AmuletAllocationV2) |
There was a problem hiding this comment.
Why do we have both of these options?
There was a problem hiding this comment.
Both are present to allow a party to provide a substitution for a subject they already supply by increasing their allocation instead of producing a new one. This isn't for general top-up, which shouldn't get any form of propose-accept.
…daml Co-authored-by: Simon Meier <simon@digitalasset.com> Signed-off-by: Jonathan D.K. Gibbons <jonored@gmail.com>
Pull Request Checklist
Cluster Testing
/cluster_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./upgrade_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./hdm_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./lsu_teston this PR to request it, and ping someone with access to the DA-internal system to approve it.PR Guidelines
Fixes #n, and mention issues worked on using#nMerge Guidelines