#lucdid

1 messages · Page 1 of 1 (latest)

vernal pastureBOT
frosty edge
#

Hmm.... do you have an example of the withdrawl attempt not behaving as you expect?

dull merlin
#

Yep. Let me know if it'd be helpful to have the event ids.

frosty edge
#

Yeah can you share one of those event IDs (just one is fine, I can find the others from there)

dull merlin
#

Ok here's the one from the first balance.available = -$2,205.98 evt_1MyPu0Iz1IZwdwgxLH90HPwz

frosty edge
#

👍 taking a look now

#

Yeah I can see why this would be an issue for you - you get the payout.paid event which brings the balance to $0, but getting the payout.failed event later brings the available balance back down to negative because we queue up a new automatic payout to try again

dull merlin
#

Exactly!

frosty edge
dull merlin
#

So we're considering adding a custom logic that does the following:

  • Check that balance.available >= $0
  • Wait for 48 hours
  • Check that no withdrawal has failed in the meantime

But it seems like a piece of ducttape to be honest. What do you think?

#

Do you know why we're returned a payout.paid event before the payout.failed event?

frosty edge
#

I wasn't around when the payout.paid event was designed, but I believe the intention is that if everything goes right, this is when the funds should be hitting the external account - if we relied on the bank to come back to us and notify us of the final status then that delays that out further and it can be confusing when those funds are already in the bank account

#

(but that's a bit of me speculating)

dull merlin
#

Okay makes sense, thank you. So our intention to build a logic to backstop the flaws of this workflow makes sense to you?

vernal pastureBOT
brittle latch
#

Hey there, can you specify which backstop logic you're referring to?

dull merlin
#

Hey! This one:

  • Once we receive a balance.available >= $0 event, wait for 48 hours.
  • Then 48 hours later, check that no withdrawal has failed in the meantime
  • Only then we will proceed with the refund.
brittle latch
#

I'm not understanding how that ties to the questions of the payout events, can you clarify?

dull merlin
#

I can speciify with a Loom walkthrough, I'll send it to you via DM

#

Ha, looks like I can't DM you

brittle latch
#

Can you explain here instead? As karbi explained we send the payout.paid when the estimated available date passes if we haven't been notified of a failure by the bank, but sometimes failures come later