For testing of quick swap on evm compatible blockchain, we can use mumbai and goerli testnet. Quick swap is inspired by https://arxiv.org/pdf/2211.15804.pdf
Alice and Bob want to withdraw their principal amounts/tokens on different chains / same chain. (ie Bob deploys PLT on Besu, Alice deploys PL on Goerli, Bob withdraws Alice’s PL and Alice withdraws Bob’s PLT)
The principal lock is used to exchange the principal amounts/tokens they want to exchange in the first place.
The griefing lock is an extension of HTLC to account for the risks if either party backs out from the exchange of amounts/tokens. The griefing amount is the opportunity costs of locking in HTLC, paid by the party that backs out.
npx hardhat compile
npx hardhat deploy --network ganache
npx hardhat basic-qs --ttoken-address 0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab --network ganache (the address are obtained from hardhat deploy)
npx hardhat advanced-qs --ttoken-address 0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab --network ganache (the address are obtained from hardhat deploy)
npx hardhat btcusd-qs --ttoken-address 0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab --network ganache