fallen-icarus / cardano-swaps

A distributed order-book DEX using composable atomic swaps with full delegation control and endogenous liquidity.
Apache License 2.0
69 stars 12 forks source link

Created ability to extend one-way swaps via a staking validator #18

Closed SynthLuvr closed 5 months ago

SynthLuvr commented 5 months ago

Context: #16

Added a new redeemer SpendWithExtension, and extension field to one-way swap datum. This allows extending the capability of cardano-swaps by attaching a stake validator or stake key to a swap. If an extension is added to a swap UTXO, then the funds in the UTXO can be withdrawn upon authorization of the stake key. This allows users to give 'power of attorney' to other smart contracts or third parties.

For example, a user may want to authorize a smart contract to forward their tokens to a final destination upon the completion of the swap; they can now do this by attaching a parameterized staking validator to their one-way swap request, and register the staking validator when the swap is created.

fallen-icarus commented 5 months ago

I appreciate you trying to help, but the discussion is still ongoing in the linked issue. So far, it still isn't even clear this feature is needed.