Open duizer opened 1 year ago
This is indeed a good question, but if you gave the WalletDepositEndpoint to someone, and deleted you own reference to it, then they would be able to transfer to it on the registry level, but the WalletSystem would reject it, this leaves the Slice in limbo where no one can regain control of it.
We could make transfers similar to how allocate/claim works, so that a receiver has to receive on the registries as well before the transfer is complete, if not done, then the sender can revoke the transfer, only if the receiver has not completet it ofcouse.
sequenceDiagram
SenderWallet->>Registry: TransferSlice
SenderWallet->>ReceiverWallet: Send receiverSlice
alt receiveSlice Success
ReceiverWallet->>Registry: CompleteTransfer
else fails
SenderWallet->>Registry: RevokeTransfer
end
Wallet Deposit Endpoints are easily created, which means that there is a case where they are never used. At the time of writing, there is no cleanup of unused Wallet Deposit Endpoint. This could lead to a potential performance issue.
Things to consider here is what is "unused" and do we need some lifetime period.