Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Swap = Swap {
- swapNotionalAmt :: !Ada
- swapObservationTime :: !POSIXTime
- swapFixedRate :: !Rational
- swapFloatingRate :: !Rational
- swapMargin :: !Ada
- swapOracle :: PaymentPubKey
- swapValidator :: Swap -> Validator
Documentation
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).
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