Hey DAMLer’s, Happy New Year (especially to those already celebrating on the other side of world)!
I was testing the digital-asset/ ex-bond-issuance and came across an error during investor settlement step.
The issued Bond, approved by CSD:
Issue Sze: 100000
Issue Date: 01/01/2020
Maturity Date: 01/01/2028
Currency: USD
Denomination: 100
Coupon Rate: 0.05
The auction specs:
Start Date: 12/26/2019
End Date: 01/01/2020
Minimum Price: 98
Size: 100000
In the auction I placed six total bids, 2 each by Bank1, Bank2, and Bank3.
Bank1 Bids: (Price: 105, Quantity: 40000), (Price: 105.5, Quantity: 41000)
Bank2 Bids: (Price: 103, Quantity: 25000), (Price: 101, Quantity: 24000)
Bank3 Bids: (Price: 104, Quantity: 45000), (Price: 99, Quantity: 10000)
Based on the above, I would expect the price to settle @ 104 with Bank1 receiving 81,000 units, Bank2 receiving no units, and Bank3 receiving 19,000 units.
I have no trouble settling as Bank2 (receives no allocation, and unlocks bid cash) and Bank3 (receives 19,000 units, and excess cash is unlocked and returned).
However, when I settle as Bank1, the AuctionSettleRequest
contract is consumed (it disappears), but the exchange of assets never occurs. All cash remains locked and no assets appear in their balance (I’d expect to see a small amount of cash, and 81,000 units of the bond). This is the error from the console where the triggers were running:
Command failed: Command interpretation error in LF-DAMLe: Interpretation error: Error: User abort: Locked cash should be sufficient to finalize settlement. Details: Last location: [DA.Internal.Assert:19], partial transaction: root node NodeId(14): NodeFetch(ContractId(00e05448b860a4afe01b6e3820bf663101ba409b37304a3b293c46ce85c8adf754),e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Fact.Asset:AssetDeposit,Some(Location(5894d748a7e97b8fd49ca4dab20543066ad2fcfb4435ae2062cbc335bbb69734,DA.Internal.Prelude,$u002b$u002b,(380,25),(380,27))),Some(TreeSet(Bank1)),TreeSet(CentralBank),TreeSet(Bank1, CentralBank),None,false), root node NodeId(17): NodeCreate(ContractId(00c724cfb7753a38322d0b4ee145b5500baaaf2a94d74e1173a7bfafb15c38c74f),ContractInst(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Rule.Asset:AssetSettlementChain,ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Rule.Asset:AssetSettlementChain),ImmArray((Some(masterAgreement),ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Types:MasterAgreement),ImmArray((Some(id),ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Types:Id),ImmArray((Some(signatories),ValueRecord(Some(5894d748a7e97b8fd49ca4dab20543066ad2fcfb4435ae2062cbc335bbb69734:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((AuctionAgent,ValueUnit))))))),(Some(label),ValueText(DvPMasterSettleAuctionMaster)),(Some(version),ValueInt64(0))))),(Some(party1),ValueParty(Bank1)),(Some(party2),ValueParty(Issuer))))),(Some(tradeId),ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Types:Id),ImmArray((Some(signatories),ValueRecord(Some(5894d748a7e97b8fd49ca4dab20543066ad2fcfb4435ae2062cbc335bbb69734:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((Bank1,ValueUnit),(Issuer,ValueUnit))))))),(Some(label),ValueText(DvPMasterSettleAuctionTrade)),(Some(version),ValueInt64(0))))),(Some(asset),ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Types:Asset),ImmArray((Some(id),ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Types:Id),ImmArray((Some(signatories),ValueRecord(Some(5894d748a7e97b8fd49ca4dab20543066ad2fcfb4435ae2062cbc335bbb69734:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((CentralBank,ValueUnit))))))),(Some(label),ValueText(USD)),(Some(version),ValueInt64(0))))),(Some(quantity),ValueNumeric(4264000.0000000000))))),(Some(steps),ValueList(FrontStack(ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Rule.Asset:AssetSettlementStep),ImmArray((Some(sender),ValueParty(Bank1)),(Some(receiver),ValueParty(Issuer)),(Some(depositCid),ValueOptional(None)),(Some(creditSettlementCid),ValueContractId(ContractId(007c0c776bc3bfb3cfc47873ffc8b67cb9f41d6a41772c6e7f7a1ad9f3f52a7667))),(Some(debitSettlementCid),ValueContractId(ContractId(006414c7edb756eca47225a90c5dcd296e8b44e25ce2ac216896eaef5b9d22aa4e)))))))),(Some(observers),ValueRecord(Some(5894d748a7e97b8fd49ca4dab20543066ad2fcfb4435ae2062cbc335bbb69734:DA.Next.Set:Set),ImmArray((Some(textMap),ValueTextMap(SortedLookupList((Regulator,ValueUnit))))))))),),Some(Location(5894d748a7e97b8fd49ca4dab20543066ad2fcfb4435ae2062cbc335bbb69734,DA.Internal.Prelude,$u002b$u002b,(380,25),(380,27))),TreeSet(AuctionAgent),TreeSet(AuctionAgent, Bank1, Issuer, Regulator),None), root node NodeId(47): NodeExercises(ContractId(007b0e65f898a013fcccc043f3330e24d6c99ad086347010f9e755f3cff0983e68),e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Rule.Asset:AssetFungible,AssetFungible_Merge,Some(Location(5894d748a7e97b8fd49ca4dab20543066ad2fcfb4435ae2062cbc335bbb69734,DA.Internal.Prelude,$u002b$u002b,(380,25),(380,27))),false,TreeSet(Bank1),ValueRecord(Some(e8750bc69d5e0ecaebbaffb8cdd927015674be6753aa1c9e6a390d7ae68ff8cd:DA.Finance.Rule.Asset:AssetFungible_Merge),ImmArray((S..., code: 3 (context: {triggerDefinition=170c25c1822e97ba83d08d4fcf443be21fcd7cc305f37659d8c9ba6aab2c6842:DA.RefApps.Bond.Triggers.InvestorSettlementTrigger:investorSettlementTrigger})
It seems like all of the locked cash (for both successful bids) is trying to be returned to the bidder after recognizing the first successful bid, not leaving any locked cash to account for the second successful bid.
Has anyone else observed this error?