From 734c78539ec13a2f13cd3357d061c37b3fda829c Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Mon, 11 Nov 2024 21:16:39 -0800 Subject: [PATCH] fixup! notes --- packages/vats/src/orch-purse/notes.txt | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/vats/src/orch-purse/notes.txt diff --git a/packages/vats/src/orch-purse/notes.txt b/packages/vats/src/orch-purse/notes.txt new file mode 100644 index 000000000000..fd9025187d6e --- /dev/null +++ b/packages/vats/src/orch-purse/notes.txt @@ -0,0 +1,38 @@ +ub = unencumbered balance (purse "currentAmount") +eb = encumbered balance (total payments in recovery set) +fb = full balance = eb + ub (orch acct balance) + +s = source +d = dest + +ertp withdraw(a) + ub -= a + eb += a + fb unchanged + +ertp deposit(a) + sub unchanged + seb -= a + sfb -= a + once transfer succeeds + dub += a + deb unchanged + dfb += a + once transfer fails + sub += a + seb unchanged from above + sfb += a (net sfb unchanged) + +ertp burn(a) (like a successful deposit to dev/null) + ub unchanged + eb -= a + fb -= a + +ertp reclaim(a), like a successful self.deposit(a) + ub += a + eb -= a + fb unchanged + +if orch account can be independently spent from + ub can go negative, if fb < eb + payments can fail to be deposited