Skip to content

Commit

Permalink
fixup! notes
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Nov 13, 2024
1 parent 79a1dac commit 734c785
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions packages/vats/src/orch-purse/notes.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 734c785

Please sign in to comment.