Game Description
We are engaged in creating an online game (web3 casino). Each game is a round of competitions (lasting about a minute +/-), at the end of the round, the winners and losers are determined. In one round, by standard, 10 players participate (9 winners, 1 loser), the cost of participating in one game round is $50, which is the amount each player pays to play. For example, each player pays a participation fee of $50 (10x50 = $500 - the pot of the specific game round), all transactions occur in toncoin (ton network), after the game is completed, all payouts to players need to be recorded on the ton network, essentially just conducting on-chain transactions so that the player sees that the entire gaming process is transparent.
Problem
The loss of the loser should be divided among the 9 other participants of the round (the winners) and our commission (the developers' commission). In the case of classic 10 on-chain transfers on the TON blockchain, each transaction will incur a fee of up to $1. This is a lot because the payout to one winning player will be small, for example, $5 (1/10 of $50 or 1/10 of the amount lost by the loser), from this $5 we will have to pay a $1 network fee, which is not very appealing, especially if we have to pay it every time for each winning payout.
Task
It is necessary to create a TON smart contract for the game that aggregates the transactions of one round and makes the payouts. That is, transfers within one room will be implemented by one smart contract, which in theory will save us on network fees and we will pay 1/10 of the fees from 10 transactions. In other words, the fee for 10 transfers (payout to 9 users + payout to the system) will be $1, not $10 (10 transactions, each with a network fee of $1).
In total, 1 game - 1 on-chain transaction on the blockchain (10 actions).
I am not a blockchain developer, so if I formulated or described something incorrectly, I can provide more details in correspondence. I suspect this is not rocket science and can be implemented, but if there are thoughts on how to solve our problem in other ways - that is also welcome. The project is long-term, if you do well and there is interest - more tasks will come your way $