Zero coupon bond
This contract is the archetype version of the contract taken from the Findel paper (Financial Derivatives Language).
Suppose Alice sells to Bob a zero-coupon (i.e., paying no interest) bond that pays $11 in one year for $10.
The findel expression below describes this contract:
1
And ( Give( Scale( 10; One( USD ))); At( now+1 years; Scale( 11 ; One( USD ))))
Copied!
zero_coupon_bond.arl
1
archetype zero_coupon_bond
2
3
variable issuer : role = @tz1bfVgcJC4ukaQSHUe1EbrUd5SekXeP9CWk (* seller 'Alice' *)
4
5
variable owner : role = @tz1Lc2qBKEWCBeDU8npG6zCeCqpmaegRi6Jg
6
(* buyer 'Bob'; receives 11 tez in one-year *)
7
8
9
variable price : tez = 10tz
10
11
variable payment : tez = 1.1 * price
12
13
variable maturity : date = 2020-12-31
14
15
states =
16
| Created initial
17
| Confirmed (* owner has purchased bond *)
18
| Repaid (* issuer has transferred payment to contract *)
19
| Collected (* owner has collected payment *)
20
21
transition confirm () {
22
specification {
23
postcondition s1 {
24
balance = 0tz
25
}
26
}
27
28
from Created
29
to Confirmed
30
when { transferred = price }
31
with effect {
32
maturity := now + 365d;
33
transfer price to issuer
34
}
35
}
36
37
transition repay () {
38
called by issuer
39
40
from Confirmed
41
to Repaid when { transferred = payment }
42
}
43
44
transition collect () {
45
called by owner
46
47
from Repaid
48
to Collected
49
when { now >= maturity }
50
with effect {
51
if balance >= payment
52
then transfer balance to owner
53
}
54
}
55
Copied!
Last modified 1yr ago
Export as PDF
Copy link