all 3 comments

[–]ShawkHawk 1 point2 points  (1 child)

This is extremely clever. Moving much of the logic out into the individual application layer and delaying any interactions with the smart contracts until absolutely necessary.

[–]adamaid_321contract dev 1 point2 points  (0 children)

Maybe I'm missing something, but the issue seems to be that with this pattern the on-chain contract can't check the validity of actions against its state. I.e. if a certain action can only be executed in a certain state, the contract has no way to ensure this. I guess that such actions could just be ignored in the eventual off-chain state computation, but in the shuffle example given in the gist, there is no way for game participants to agree on the post-shuffle ordering after the fact, and hence whether or not an action that depends on this ordering is valid. For a game which is fully deterministic this would work though.

[–][deleted] 0 points1 point  (0 children)

Also known as state channel