What would be the math to calculate out Stripes payout fees (0.25% + $0.25/payout) from each transfer to a Connect account?
FYI - Stripe takes the fee from the total amount of all transfers, but I need to compute it out for each transfer I send.
ex. I want to transfer $100.00 => 10000 cents
10000 cents - 25 cents(1st transfer in a pay period only) = 9975 cents
Here's where I get lost/confused - I can't take out 0.25% of 9975 (~25cents) because Stripe will only charge a fee from the remaining amount I send ~9950 cents. So the fee I took (~25) is too high for the amount I sent to payout.
Can anyone help me with the math?
you can look over here for my approach: https://stackoverflow.com/a/70775321/2434784
But some of the tl,dr is yes, you can just use the straight-forward approach above. Since the fees are currently 0.25%, you will only be off by 0.25%/(1 + 0.25%) - not much of a concern. Reserve the pessimistic amount, and reconcile each month with Stripe's actual charges.
you can reach out to Stripe support to clarify the fees https://support.stripe.com/contact.
Related
I want to distribute a fee from every transaction to a mapping(address=>uint) of 3000 addresses, evenly.
Now, that is an issue because the function will run out of gas, so I've heard, that instead of a push method, a pull method should be able to pull it off.
So instead, pool all fees together under one single uint and then let each of every 3k address pull their own share.
Now that brings new issues because the pool uint is forever increasing and decreasing (when people take their share out and new incoming fees from transactions) and how can I control one who may only take their share once but still continuously & evenly distributed?
Some direction here would be greatly appreciated on how to solve those distribution issues because my math is far from the strongest asset I possess.
Solved it by having a mapping to store for every user what was the total incoming deposits last time they claimed their share and deduct that from the current total incoming deposits and give their % cut based on the difference if any.
Psuedo Solidity (excluding proper checks & interactions):
uint256 totalRevShare = onDeposit() pub payable {...+=msg.value}
//..in Withdraw Function
...
uint256 unclaimedScope = totalRevShare - LastTotalRevShare[user];
LastTotalRevShare[user] = totalRevShare;
uint256 _userUnclaimedCut = unclaimedScope / totalReceivers;
...
msg.sender.call{value:_userUnclaimedCut}("");
Hope it helps you to move from push to pull functionality.
Problem: Truck assignment with limited quantity to deliver to the customers.
The truck has to be assigned to the customer. As the truck has limited quantity, the truck needs to return back to reload again to deliver to the next customer.
Trip - load at Depot, unload at customer/few customers, come back to depot.
The problem facts are available trucks and customers to be delivered. We need to find dynamically how many trips can be possible from truck-based on few timing-related conditions(like truck available time, driver hours, etc).
The solution I can think off:
Pre-compute max number of trips by the truck based on business understanding- use this as a planning variable. Provide hard score for violating time constraints, so few trips will be left unassigned if truck exceeds the available truck/trip time.
Need Help:
For every solved example, we have a fixed number of planning variables before planning. Even In the chained planning variable(Like TSP,VRP), we have the fixed number of trucks beforehand.
Any help is appreciated. If there is no direct solution, is the approach I have come up is the best possible?
That solution is indeed recommended currently:
Provide enough trucks in the anchorValueRange to make sure a feasible solution can be found. Defining that number can be tricky: typically double the average usage. For example, if you have 300 visits and do on average 100 visits per truck, give it 6 trucks, as you never expect it to use more than 6 trucks (and probably a lot less). If trucks have skills or affinity, this becomes a bunch more complex.
Add an extra score level: if you're on HardSoftScore, switch to HardMediumSoftScore.
Add a medium constraint to penalize the number of trucks used. This is softer than the hard constraints (capacity etc) and harder than the soft constraints (distance etc).
(The alternative, adding/removing values to the value ranges on the fly, is only theoretically possible in OptaPlanner's architecture at the moment (don't use addProblemFactChanges for this!). It might sound like the perfect solution, but there are many subsystems that profit from a fixed value range, so that approach would have severe trade-offs.)
Ignoring capacity as my tables won't exceed 25 GB, since I have 25 RCU and 25 WCU free per month, does that mean I can have a maximum of 25 tables with 1RCU and 1WCU per table?
For my own development and learning purposes I may not need more tables, but for the sake of understanding, if I create the 26th table, then would I exceed the free tier?
From AWS Free Tier:
Amazon DynamoDB
25 GB of storage
25 Units of Write Capacity
25 Units of Read Capacity
Enough to handle up to 200M requests per month
The free tier is applied as a pricing discount. The first usage of the above quantities each month has no cost.
So, yes, you could create 25 tables with 1 RCU, 1 WCU and 1GB of storage each and this would stay in the free tier. Any usage beyond this amount would be charged a normal rates.
"Subject to 10% service charge per room per night. Any cancellation or
amendments can be made 2 days prior to arrival. Otherwise, one nights’
room rate will be levied. The first night guarantee is required at
time of reservation and one night room rental will be charged to the
credit card provided in the event of no show, late cancellation or
amendment. If any dispute arises, Hotel Rainbow Hong Kong reserves the
final decision."
i use the css properties "word-break:break-all", but it did not do well.
there are still some word being break up.
** You need 'word-wrap' property **
Use this one
word-wrap:break-word;
Visit http://www.w3schools.com/cssref/css3_pr_word-break.asp
p{word-break:break-all;}
I have studied Frequency division duplex (FDD) and Time division duplex (TDD) but i can't find its difference on the basis of throughput. Is there any person who have an adequate knowledge about it. Thanx
There is no throughput difference between the two methods.
If you have a 100Mbps link and you split it to 10 equal users, both FDM and TDM will give each user a 10Mbps link.
There are too many free variables in your question to give a specific answer. In FDD paired frequencies are used to accomplish simultaneous upload and download. In TDD, the same frequency is used for both upload and download and by adjusting timeslots used for upload and download, their ratio can be adjusted dynamically based on how much data there is to be sent or received.