Last active
March 10, 2023 08:49
-
-
Save istovatis/37360493a2fb120e1254fa676ba692d2 to your computer and use it in GitHub Desktop.
TokenSwap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[["AAF Provider","The Role that provides AFF"],["RWD Provider","The Role that provides RWD"]],"contractType":"Swap","contractShortDescription":"Atomically exchange of RWD and AFF tokens","contractName":"Swap of RWD and AFF tokens","contractLongDescription":"Waits until one party deposits RWD and the other party deposits dollar tokens. If both parties collaborate it carries the exchange atomically, otherwise parties are refunded.","choiceInfo":[]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When | |
| [Case | |
| (Deposit | |
| (Role "RWD Provider") | |
| (Role "RWD Provider") | |
| (Token "aaaaaa" "RWD") | |
| (ConstantParam "Amount of Reward") | |
| ) | |
| (When | |
| [Case | |
| (Deposit | |
| (Role "AAF provider") | |
| (Role "AAF Provider") | |
| (Token "bbbbbb" "AAF") | |
| (ConstantParam "Amount of AAF") | |
| ) | |
| (Pay | |
| (Role "RWD Provider") | |
| (Party (Role "AAF provider")) | |
| (Token "aaaaaa" "RWD") | |
| (ConstantParam "Amount of Reward") | |
| (Pay | |
| (Role "RWD Provider") | |
| (Party (Role "RWD Provider")) | |
| (Token "bbbbbb" "AAF") | |
| (ConstantParam "Amount of AAF") | |
| Close | |
| ) | |
| )] | |
| (TimeParam "Timeout for AFF deposit") | |
| Close | |
| )] | |
| (TimeParam "Timeout for RWD deposit") | |
| Close |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment