Creator and receiver in Limit Orders - Receiver will receive shares from the creator. (We would suggest explaining this in the Concepts section of your GitBook)
When placing a Limit order:
creator initiates the tx and places the deposit - but
the LimitOrder is added for the receiver: trancheUser is created for the receiver code
When canceling a LO and withdrawing a filled LO: Limit orders are searched for a creator (in the moment of placing the Limit Order, this was receiver):
Withdrawing: getting trancheUser for creator code
Canceling: getting tranchUser for creator code
and later when sending the calculated amount of shares to be withdrawn or canceled, the amount is sent to the “new” receiver:
Withdrawing: send amount to the receiver code
Canceling: send the amount to the receiver code
It is unclear:
Whether the receiver that could differ from the creator should be defined in the moment of placing the order or It could be defined in the moment of withdrawals and cancellations?
Who is in charge of initiating withdrawals and cancellations - by design?
Update, from sync meeting:
We have discussed the roots of this design-idea (the solidity contracts, and integration issues - where it is enabled to place limit orders in the name of another user).
We concluded that, for current Duality implementation, this would be sufficient:
PlaceLimitOrder - contains receiver and this will give us the explained feature needed (trancheUser will be the receiver), later for
CancelLimitOrder and WithdrawFilledLimitOrder - there is no need to have the receiver propagated, since the initiator of the transaction should be the receiver.
This would simplify current design.
Creator and receiver in Limit Orders - Receiver will receive shares from the creator. (We would suggest explaining this in the Concepts section of your GitBook)
When placing a Limit order: creator initiates the tx and places the deposit - but the LimitOrder is added for the receiver: trancheUser is created for the receiver code
When canceling a LO and withdrawing a filled LO: Limit orders are searched for a creator (in the moment of placing the Limit Order, this was receiver): Withdrawing: getting trancheUser for creator code Canceling: getting tranchUser for creator code and later when sending the calculated amount of shares to be withdrawn or canceled, the amount is sent to the “new” receiver: Withdrawing: send amount to the receiver code Canceling: send the amount to the receiver code
It is unclear: Whether the receiver that could differ from the creator should be defined in the moment of placing the order or It could be defined in the moment of withdrawals and cancellations? Who is in charge of initiating withdrawals and cancellations - by design? Update, from sync meeting: We have discussed the roots of this design-idea (the solidity contracts, and integration issues - where it is enabled to place limit orders in the name of another user). We concluded that, for current Duality implementation, this would be sufficient: PlaceLimitOrder - contains receiver and this will give us the explained feature needed (trancheUser will be the receiver), later for CancelLimitOrder and WithdrawFilledLimitOrder - there is no need to have the receiver propagated, since the initiator of the transaction should be the receiver. This would simplify current design.