Bitcoin Forum
May 11, 2024, 10:01:03 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help btc,eth wallets  (Read 190 times)
skyllpin (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 5


View Profile
December 24, 2021, 12:04:49 PM
Merited by OmegaStarScream (2), bitmover (1)
 #1

Hello everyone,

We are looking for a solution to a problem we've encountered.

We are currently developing a centralized crypto exchange platform. And there is one possible scenario I would like to go over.

Right now, we assign a user's wallet and balance separately from each other. Unfortunately, this results in leftover money that both us and the user can't access.

For example, if the user adds $100 to his ETH account and only withdraws $70, after a $20 commission, he is left with $10 on his account that he will never get to use.

Therefore, we need to find a solution that will allow us to generate separate user addresses for monitoring and deposits. This should enable us to get all the funds in one wallet, leaving no leftovers.

BTC has a solution that allows us to create subaccounts, but what should we do with the other coins?
I HATE TABLES I HATE TABLES I HA(╯°□°)╯︵ ┻━┻ TABLES I HATE TABLES I HATE TABLES
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715464863
Hero Member
*
Offline Offline

Posts: 1715464863

View Profile Personal Message (Offline)

Ignore
1715464863
Reply with quote  #2

1715464863
Report to moderator
1715464863
Hero Member
*
Offline Offline

Posts: 1715464863

View Profile Personal Message (Offline)

Ignore
1715464863
Reply with quote  #2

1715464863
Report to moderator
1715464863
Hero Member
*
Offline Offline

Posts: 1715464863

View Profile Personal Message (Offline)

Ignore
1715464863
Reply with quote  #2

1715464863
Report to moderator
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3472
Merit: 6131



View Profile
December 24, 2021, 03:21:05 PM
 #2

I'm not sure I understand the problem here and why is this is not a problem for BTC withdrawals? You're saying that the user won't be able to withdraw the rest of his funds (10$). Why is that though? If it's because of the 20$ fees, or due to the fact that you have a minimum amount requirement, then that's something all exchanges deal with. Isn't? I don't see how would you work around that.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
hosseinimr93
Legendary
*
Online Online

Activity: 2394
Merit: 5235



View Profile
December 24, 2021, 03:21:36 PM
Merited by hugeblack (4), OmegaStarScream (2)
 #3

For example, if the user adds $100 to his ETH account and only withdraws $70, after a $20 commission, he is left with $10 on his account that he will never get to use.
You don't have to give the 70 dollars worth of ethereum from the address the user has deposited to. You can use the fund other users have deposited to process one's withdrawal.
Centralized exchanges usually move all the funds to their own wallet and use the fund in that wallet for processing withdrawals.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BlackHatCoiner
Legendary
*
Online Online

Activity: 1512
Merit: 7364


Farewell, Leo


View Profile
December 24, 2021, 03:32:18 PM
 #4

For example, if the user adds $100 to his ETH account and only withdraws $70, after a $20 commission, he is left with $10 on his account that he will never get to use.
Your commission or miner's commission? The latter can't be tackled somehow. Ethereum doesn't seem to scale with these fees and if you want to protect your customers about this situation you need to warn them before every withdrawal.

For instance, if they have $100 in ETH and want to withdraw $70, you can recommend them to withdraw $80 and empty their balance instead of leaving a temporarily non-spendable amount of $10.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Darker45
Legendary
*
Offline Offline

Activity: 2576
Merit: 1860


🙏🏼Padayon...🙏


View Profile
December 25, 2021, 01:37:08 AM
 #5

I'm sorry, what's the real goal here? It seems to me you're creating a problem where there is none.

What's the problem really? What do you mean by the leftover money that is inaccessible to both the exchange and the user? If it is a centralized exchange you are referring to, who's got the control of the private keys? Isn't it that they are in the hands of the exchange?

And why would a certain user not withdraw everything if leaving a small amount means it could not be withdrawn anymore?

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
bitmover
Legendary
*
Online Online

Activity: 2296
Merit: 5942


bitcoindata.science


View Profile WWW
December 25, 2021, 11:42:52 AM
 #6

For example, if the user adds $100 to his ETH account and only withdraws $70, after a $20 commission, he is left with $10 on his account that he will never get to use.

Therefore, we need to find a solution that will allow us to generate separate user addresses for monitoring and deposits. This should enable us to get all the funds in one wallet, leaving no leftovers.


When you send 70 btc from an address with 100, the change usually goes to a change address. This might be the case.

However,  AFAIK  , ethereum doesn't work like this and there is no change address as there are no utxo.


Quote
BTC has a solution that allows us to create subaccounts, but what should we do with the other coins?
Ethereum also has this option to create sub accounts, which is basically a new address
https://ethereum.org/en/developers/docs/accounts/

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
noorman0
Hero Member
*****
Offline Offline

Activity: 1764
Merit: 694


[Nope]No hype delivers more than hope


View Profile WWW
December 25, 2021, 12:04:42 PM
 #7

Right now, we assign a user's wallet and balance separately from each other. Unfortunately, this results in leftover money that both us and the user can't access.

Let me understand this part, you mean you will keep the user's balance stored in the user's deposit address, correct? And because the balance is no longer sufficient for the transaction fee, you can't access move it?

This method will be difficult for you in the end. Users will also not always withdraw ETH because they previously deposited ETH. They can withdraw into other cryptocurrencies and at different amount as well, unless you are not an exchange platform. You should set up a centralized hot wallet which is a common method CEX uses to store and manage user funds.

we need to find a solution that will allow us to generate separate user addresses for monitoring and deposits.
I also don't understand about this, is there an address that works as a monitor for other addresses. What I know, it's a smartcontract function.

This space for rent.
Available in mid January 2024 - PM me
NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6386


Looking for campaign manager? Contact icopress!


View Profile
December 25, 2021, 07:34:25 PM
 #8

For example, if the user adds $100 to his ETH account and only withdraws $70, after a $20 commission, he is left with $10 on his account that he will never get to use.

While he will not be able to withdraw the 10$ as BTC because of your fees, the user still has 2 options:

* That money stays there and when he will add the next 100$ he will have 110$ to work with. In this case a warning at the initial withdrawal would be nice ("The remaining amount is less than the minimum amount to withdraw from this platform. Please consider withdrawing the full amount")

* The user can convert into some altcoin where your fees are much lower and he can still withdraw.


I see no problem. Is the problem related tot he logic, or is it something implemented wrong from technical point of view (the old deposit address becomes - for some odd reason - no longer available)? Maybe you should explain more clearly your problem. If it helps, I'll add that one user should have more than one deposit address (and even if you show only the last one, all those addresses are watched and credited). The user deposit addresses, the current amounts the users have, all this kind of information will stay on a normal old school database, since you said you make a centralized exchange.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
The Cryptovator
Legendary
*
Offline Offline

Activity: 2240
Merit: 2174


Need PR/CMC & CG? TG @The_Cryptovator


View Profile WWW
December 26, 2021, 03:20:43 PM
 #9

This isn't should the exchange wallet works. When a users make a deposit the funds should move to your cold wallet. You need just use an internal algorithm for the user's exchange account to credit and debit his balance. The user's withdrawal request should go to the hot wallet from where you will process withdrawal whether automatic or manual. You should always refill the hot wallet from your cold wallet. So there will not be a leftover amount anymore. All the centralized exchange and custodial wallets work this way. Users deposit ETH it doesn't mean he will withdraw that. He might withdraw some other coin. If the user exchanges eth with another coin and withdraws that, still will the eth balance reflects in user's wallet? Definitely not. So how the mount will leftover? It shouldn't anyway. You should hire an experienced wallet developer to make it easier.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
batang_bitcoin
Hero Member
*****
Offline Offline

Activity: 2968
Merit: 600


Eloncoin.org - Mars, here we come!


View Profile
December 26, 2021, 09:46:42 PM
 #10

I think I've encountered this type of problem before with a forgotten exchange, I can't remember its name but I understand that problem really exists. One manual solution is this:
For instance, if they have $100 in ETH and want to withdraw $70, you can recommend them to withdraw $80 and empty their balance instead of leaving a temporarily non-spendable amount of $10.

You have to recommend the users to withdraw as much as possible all that they have and put a reminder that remaining funds might be at loss so they'll be forced to withdraw all of it. Well, this is for the manual part and reminder but technically, it goes to the devs part.



 

 

 

 

 

 


▄▄████████▄▄
▄▄████████████████▄▄
▄██
████████████████████▄
▄███
██████████████████████▄
▄████
███████████████████████▄
███████████████████████▄
█████████████████▄███████
████████████████▄███████▀
██████████▄▄███▄██████▀
████████▄████▄█████▀▀
██████▄██████████▀
███▄▄█████
███████▄
██▄██████████████
░▄██████████████▀
▄█████████████▀
████████████
███████████▀
███████▀▀
.
▄▄███████▄▄
▄███████████████▄
▄███████████████████▄
▄██████████
███████████
▄███████████████████████▄
█████████████████████████
█████████████████████████
█████████████████████████
▀█
██████████████████████▀
▀██
███████████████████▀
▀███████████████████▀
▀█████████
██████▀
▀▀███████▀▀
.
 ElonCoin.org 
.
████████▄▄███████▄▄
███████▄████████████▌
██████▐██▀███████▀▀██
███████████████████▐█▌
████▄▄▄▄▄▄▄▄▄▄██▄▄▄▄▄
███▐███▀▄█▄█▀▀█▄█▄▀
███████████████████
█████████████▄████
█████████▀░▄▄▄▄▄
███████▄█▄░▀█▄▄░▀
███▄██▄▀███▄█████▄▀
▄██████▄▀███████▀
████████▄▀████▀
█████▄▄
.
"I could either watch it
happen or be a part of it"
▬▬▬▬▬
The Cryptovator
Legendary
*
Offline Offline

Activity: 2240
Merit: 2174


Need PR/CMC & CG? TG @The_Cryptovator


View Profile WWW
December 27, 2021, 04:28:26 PM
 #11

I think I've encountered this type of problem before with a forgotten exchange, I can't remember its name but I understand that problem really exists. One manual solution is this:
For instance, if they have $100 in ETH and want to withdraw $70, you can recommend them to withdraw $80 and empty their balance instead of leaving a temporarily non-spendable amount of $10.

You have to recommend the users to withdraw as much as possible all that they have and put a reminder that remaining funds might be at loss so they'll be forced to withdraw all of it. Well, this is for the manual part and reminder but technically, it goes to the devs part.
This wouldn't be a solution for a centralized exchange. Users have the right to withdraw whatever they want. A minimum or maximum withdrawal is just limited by the platform. But can't force them to empty their wallet. This problem shouldn't exist anyway. As I told above, OP needs an experienced wallet developer or exchange developer who can solve it. The fund should move hot or cold wallet entirely from the user's wallet and withdrawal call should happen from the hot wallet. Otherwise, it's quite impossible to run an exchange. That's the reason actually why exchange requires high fees than actual network fees.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
batang_bitcoin
Hero Member
*****
Offline Offline

Activity: 2968
Merit: 600


Eloncoin.org - Mars, here we come!


View Profile
December 27, 2021, 06:12:20 PM
 #12

I think I've encountered this type of problem before with a forgotten exchange, I can't remember its name but I understand that problem really exists. One manual solution is this:
For instance, if they have $100 in ETH and want to withdraw $70, you can recommend them to withdraw $80 and empty their balance instead of leaving a temporarily non-spendable amount of $10.

You have to recommend the users to withdraw as much as possible all that they have and put a reminder that remaining funds might be at loss so they'll be forced to withdraw all of it. Well, this is for the manual part and reminder but technically, it goes to the devs part.
This wouldn't be a solution for a centralized exchange. Users have the right to withdraw whatever they want. A minimum or maximum withdrawal is just limited by the platform. But can't force them to empty their wallet. This problem shouldn't exist anyway. As I told above, OP needs an experienced wallet developer or exchange developer who can solve it. The fund should move hot or cold wallet entirely from the user's wallet and withdrawal call should happen from the hot wallet. Otherwise, it's quite impossible to run an exchange. That's the reason actually why exchange requires high fees than actual network fees.
It's just a note though and they still have the decision to withdraw the amount of it. It's like giving the users a warning that they can't retrieve the remaining funds and they're honest.
But the catch, after these traders knowing that fact on this exchange that OP is developing, they might never comeback since there are those traders that are leaving some amounts on their wallets.



 

 

 

 

 

 


▄▄████████▄▄
▄▄████████████████▄▄
▄██
████████████████████▄
▄███
██████████████████████▄
▄████
███████████████████████▄
███████████████████████▄
█████████████████▄███████
████████████████▄███████▀
██████████▄▄███▄██████▀
████████▄████▄█████▀▀
██████▄██████████▀
███▄▄█████
███████▄
██▄██████████████
░▄██████████████▀
▄█████████████▀
████████████
███████████▀
███████▀▀
.
▄▄███████▄▄
▄███████████████▄
▄███████████████████▄
▄██████████
███████████
▄███████████████████████▄
█████████████████████████
█████████████████████████
█████████████████████████
▀█
██████████████████████▀
▀██
███████████████████▀
▀███████████████████▀
▀█████████
██████▀
▀▀███████▀▀
.
 ElonCoin.org 
.
████████▄▄███████▄▄
███████▄████████████▌
██████▐██▀███████▀▀██
███████████████████▐█▌
████▄▄▄▄▄▄▄▄▄▄██▄▄▄▄▄
███▐███▀▄█▄█▀▀█▄█▄▀
███████████████████
█████████████▄████
█████████▀░▄▄▄▄▄
███████▄█▄░▀█▄▄░▀
███▄██▄▀███▄█████▄▀
▄██████▄▀███████▀
████████▄▀████▀
█████▄▄
.
"I could either watch it
happen or be a part of it"
▬▬▬▬▬
hugeblack
Legendary
*
Offline Offline

Activity: 2506
Merit: 3650


Buy/Sell crypto at BestChange


View Profile WWW
December 29, 2021, 12:29:35 PM
 #13

This would be a problem if the platform was decentralized, as the user manages his money without controlling the platform, but in the central platforms, they do not make transfers on mainNet network only when deposits or withdraws.

The solutions to the problem will be as follows:

 - Create a token where the user converts all the dust balance to it and then can exchange it to BTC with zero fees: as BNB dust exchange.
 - Possibility of withdrawing to networks with low fees: sidechain network or second layer as LN or Polygon.
 - Enable VIP user option: When your account is premium, the platform can incur a withdrawal fee (make it zero) for monthly subscriptions.

Other marketing solutions because the administration is updating the database balance, which is a central thing.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
stanner.austin
Member
**
Offline Offline

Activity: 67
Merit: 53


View Profile
December 29, 2021, 02:50:23 PM
 #14

@skyllpin
Possible solution is Unspent transaction hash.
if user buy 100$ eth you can send from your exchange wallet address which have many UTX .
once user send someone or withdraw 70$ use that UTX and cut fee (send that to your wallet or fee wallet) and left over to his own wallet address with new UTX.
So in future user can use that UTX for sending,withdraw or cover any fee charge by your service.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!