Open speezepearson opened 3 years ago
Oh right, I remember why I've been putting this off: because it's actually a lot harder than just changing a database column type from bool to int.
If Alice sets a credit limit for her friend Bob, his available credit should go down when he bets against her, and up when either (a) she loses a bet to him, or (b) he sends her money. But how does Biatob know when he sends her money, given that it doesn't and will never handle users' money directly? She must have to tell Biatob every time he [Venmo/PayPal/...]s her. Seems like a hassle!
How could this hassle be minimized? A few possible mechanisms:
Alternatively, we could fudge the question, and not handle credit limits perfectly, but implement some approximate solution that's easier to bookkeep. Like... a per-market credit limit? Instead of capping Bob's worst-case losses at $1000, Alice could cap his exposure to any single market Alice runs at, say, $200? Then, as long as Bob doesn't bet heavily in more than 5 of Alice's markets at a time, he stays within Alice's "true" credit limit for him, and Biatob doesn't need to know about any side payments, it can just retain its assumption that people will settle bets on a market-by-market basis after resolution.
Splitwise handles this via a button reading "Settle Up" that uses the PayPal/Venmo API to configure a transaction of the appropriate quantity and destination for you to authorize, and (I assume) only updates the ledger if the transaction does indeed get done.
On Wed, Jul 21, 2021, 21:31 speezepearson @.***> wrote:
Oh right, I remember why I've been putting this off: because it's actually a lot harder than just changing a database column type from bool to int.
If Alice sets a credit limit for her friend Bob, his available credit should go down when he bets against her, and up when either (a) she loses a bet to him, or (b) he sends her money. But how does Biatob know when he sends her money, given that it doesn't and will never handle users' money directly? She must have to tell Biatob every time he [Venmo/PayPal/...]s her. Seems like a hassle!
How could this hassle be minimized?
- When Bob sends Alice $47, he also tells Biatob that he paid her. Biatob sends her a magic email link that raises Bob's available credit by $47.
- When Bob sends Alice $47, she can forward PayPal's notification email to some Biatob email address, and it will parse out the necessary info somehow. (Included for completeness, but I really don't want to get into the "parsing information out of emails" game.)
- Have a page that tells users how much they owe other users on net, and assume that they will only send each other payments that exactly settle that debt. Bob visits that page, sees that he owes Alice $47, sends her $47, and clicks a button that says "I settled this." Biatob sends her a magic email link that raises Bob's available credit by $47.
Alternatively, we could fudge the question, and not handle credit limits perfectly, but implement some approximate solution that's easier to bookkeep. Like... a per-market credit limit?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/speezepearson/biatob/issues/24#issuecomment-884600892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGEOHSRZU7NGL4TZ5H7WG3TY5YF3ANCNFSM5AZADAVA .
Ooh, I like that idea. Thanks for pointing it out!
(I've been resisting letting people attach payment information to their accounts, since that would provide an avenue for bad guys to turn security holes into money. Maybe I should let go of that reluctance. Or maybe Biatob can pre-fill the "Amount" and "Note" fields but leave "Recipient" blank.)
Or maybe Biatob can pre-fill the "Amount" and "Note" fields but leave "Recipient" blank.
Oh, no, that wouldn't work: if Biatob doesn't know the recipient's PayPal address, then it can't check that address against the transaction destination address, so Bob could raise his credit limit with Alice by sending money to anybody. But... maybe it's okay to assume that nobody will engage in such blatant dishonesty. If Biatob sends the recipient a notification "Hey, Bob claims to have paid you $47," then such wrongdoing is very likely to be caught regardless.
Hmm. Suppose Alice creates a prediction market. Bob (who has some nonzero credit limit for Alice) bets in the market, staking $20 against somebody else.
Rephrased: suppose Bob doesn't trust Alice very much, and assigns her only a $20 credit limit. Under what circumstances would Bob want to bet $1000 in an Alice-adjudicated market?
Maybe leave it up to Bob? When he makes a bet, give him a checkbox labeled "I trust Alice to adjudicate fairly, don't count my stake against her credit limit"?
These questions haven't come up earlier because, when "trust" is without qualifiers, everybody essentially has infinite credit. Maybe I'll keep it that way for now -- credit limits are turning out to be surprisingly subtle.
Currently, "trust" in Biatob is unqualified: I "trust" my dearest friends by virtue of our years of rapport and collaboration and our deeply shared social network; I also "trust" a couple LessWrong users by virtue of their having expressed interest in my site. The sizes of the bets I'm willing to make against these two groups are... considerably different. But Biatob doesn't know that.
Ideally, I would be able to somehow limit how much I'm willing to credit any of these people: instead of having, conceptually,
trusted : (Username, Username) -> Bool
, we would havecreditLimit : (Username, Username) -> UInt
.