0

I'm facing a task to calculate how much surplus should be included in transaction, so it will match designated amount after fee offtake.

Say, sender wants recipient to get 4,550,00 cents. That transaction is a subject to 1% + 390 cents fixed fee.

Question is how much sender should pay, for recipient to receive exactly 4,550,00 cents?

I can't think about any clever solution, only brute-force approach atm :(

UPDATE: percentage fee is applied on transaction amount plus fixed fee. I.e. on 4,553,90 in this example

1 Answers1

0

The sender should send $$101\%\, \text{of} \,4,550,00+390,$$ or in other words $$1.01×4,550,00+390.$$ You can work this out.

Allawonder
  • 13,327
  • Hi,

    (((455000 * 1.01) + 390) - 1%) - 390 gives 454950.6 unless I'm missing something https://www.wolframalpha.com/input/?i=%28%28%28455000++*+1.01%29+%2B+390%29+-+1%25%29+-+390

    P.S. Updated post to denote that percentage fee is taken on a transaction amount plus fixed fee

    – lessless Sep 08 '19 at 13:21
  • @lessless I don't understand what you mean. If you remove $1%$ of $4,550,00$ and $390$ from the above sum, you should get exactly $4,550,00.$ – Allawonder Sep 08 '19 at 13:27
  • 1
    You are right! Just to clarify - here is how it works:
    • there is a transaction amount, say 455000
    • there is a notification cost, say 390
    • there is processing fee, say 1%

    at first - processing fee is charged and then notification fee is charged.

    Given sender paid exactly 455000 at the end of the cycle receiver will get 455000 - 4550 - 390: 450060 cents.

    (1.01 * 455000 + 390) - (1% from 455000) - 390 equals exactly 455000, thanks!

    – lessless Sep 08 '19 at 14:14