Currently we have a basic hacky end-to-end PoC for SWAP accounting. We have specs that indicate how this can be analyzed as an iterated prisoner's dilemma. However, there are quite a lot of states and inputs that go into making decisions on what to do. Having a more formal model with rigor around this would make it easier to analyze, think about, spot flaws, bugs, and build on.
Suggested solution
We have a finite set of states, inputs and outputs w.r.t. the game being played for SWAP. List these more formally and make a basic FSM model through some means. Ideally it can be used directly in nim-waku, say, but it can also logically be ported over.
Details
Just a brain dump here in terms of states and inputs:
A node can be in credit or debit
It can receive message and send cheque
It can redeem cheques or save for later
Cheque can be invalid
The relationship can be new or old
A node can have various tolerance for delayed settlement
A node may have promised some form of uptime
A node may have detected missing messages through other means
Historical records may be used as part of input (though with simple tit-for-tat memory model can be quite basic)
Start simple though, and leave more sophisticated/probabilistic models for later.
Problem
Currently we have a basic hacky end-to-end PoC for SWAP accounting. We have specs that indicate how this can be analyzed as an iterated prisoner's dilemma. However, there are quite a lot of states and inputs that go into making decisions on what to do. Having a more formal model with rigor around this would make it easier to analyze, think about, spot flaws, bugs, and build on.
Suggested solution
We have a finite set of states, inputs and outputs w.r.t. the game being played for SWAP. List these more formally and make a basic FSM model through some means. Ideally it can be used directly in nim-waku, say, but it can also logically be ported over.
Details
Just a brain dump here in terms of states and inputs:
Start simple though, and leave more sophisticated/probabilistic models for later.