plutus-use-cases-0.1.0.0: Collection of smart contracts to develop the plutus/wallet interface
Safe HaskellNone
LanguageHaskell2010

Plutus.Contracts.Swap

Contents

Synopsis

Documentation

data Swap Source #

A swap is an agreement to exchange cashflows at future dates. To keep things simple, this is an interest rate swap (meaning that the cashflows are interest payments on the same principal amount but with two different interest rates, of which one is fixed and one is floating (varying with time)) with only a single payment date.

At the beginning of the contract, the fixed rate is set to the expected future value of the floating rate (so if the floating rate behaves as expected, the two payments will be exactly equal).

Constructors

Swap 

Fields

Instances

Instances details
Lift DefaultUni Swap Source # 
Instance details

Defined in Plutus.Contracts.Swap

Typeable DefaultUni Swap Source # 
Instance details

Defined in Plutus.Contracts.Swap

Script

swapValidator :: Swap -> Validator Source #

Validator script for the two transactions that initialise the swap. See note [Swap Transactions] See note [Contracts and Validator Scripts] in Language.Plutus.Coordination.Contracts