Bitcoin Forum
May 29, 2024, 09:59:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help understanding Uniswap and similar places  (Read 62 times)
MacInTheNet (OP)
Jr. Member
*
Offline Offline

Activity: 38
Merit: 1


View Profile
January 18, 2024, 09:48:44 PM
 #1

Hi, no expert here.
Please help me understand something if you can.
I've been starting to use ledger swap feature, Uniswap with ledger and so on.
I've understood I have to allow two things to happen.
Token approval first and then the swap.
I've spent a lot of money in fees because something wasn't working very fast and well so I did the same thing more than once but that's OK, my fault.
What I want to understand is:
Let's suppose I want to swap 500 usdc for eth.
Let's suppose I have just that amount of usdc in my wallet.
If I authorize the maximum amount and then I swap, does it end there?
I mean: if the next day I send other usdc to my address, is there the risk those usdc are spent without my will?
Is it recommended to revoke something after the swap if the token approval has no limit?
I hope I explained myself Cheesy
Thanks in advance Smiley
libert19
Hero Member
*****
Offline Offline

Activity: 2506
Merit: 945



View Profile WWW
January 22, 2024, 06:59:13 AM
 #2

Hi, no expert here.

Please help me understand something if you can.

I've been starting to use ledger swap feature, Uniswap with ledger and so on.

I've understood I have to allow two things to happen.

Token approval first and then the swap.

I've spent a lot of money in fees because something wasn't working very fast and well so I did the same thing more than once but that's OK, my fault.

I hope you understood your fault. Make use of Etherscan explorer (https://etherscan.io/) to know about your transactions. If fee is too low, send 0 ETH transaction to yourself with high gas fee, it'll cancel old transaction and allow you to make new transaction with high fee. Repeatedly making more transactions for same purpose will just cause you to lose your money.

Quote
What I want to understand is:

Let's suppose I want to swap 500 usdc for eth.

Let's suppose I have just that amount of usdc in my wallet.

If I authorize the maximum amount and then I swap, does it end there?

I mean: if the next day I send other usdc to my address, is there the risk those usdc are spent without my will?

Is it recommended to revoke something after the swap if the token approval has no limit?

I hope I explained myself Cheesy

Thanks in advance Smiley

When you approve on uniswap, uniswap contract gets permission to spend your token, if you approve 500 USDC you won't have to approve again on uniswap (or when using other dapps using Uniswap contract) for future transactions involving less than or equal to 500 usdc, so you save gas fees for future approvals transactions, this being a pro of it.

While con being if Uniswap contract gets compromised, then hacker would be able to drain your USDC amounted <=500 without your consent. This con applies to malicious contracts to begin with or compromised legit contracts.

You can use revoke cash to remove approvals: https://revoke.cash/

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
MFahad
Hero Member
*****
Offline Offline

Activity: 2478
Merit: 644


Eloncoin.org - Mars, here we come!


View Profile WWW
January 22, 2024, 09:57:17 AM
 #3

Hi, no expert here.
Please help me understand something if you can.
I've been starting to use ledger swap feature, Uniswap with ledger and so on.
I've understood I have to allow two things to happen.
Token approval first and then the swap.
I've spent a lot of money in fees because something wasn't working very fast and well so I did the same thing more than once but that's OK, my fault.
What I want to understand is:
Let's suppose I want to swap 500 usdc for eth.
Let's suppose I have just that amount of usdc in my wallet.
If I authorize the maximum amount and then I swap, does it end there?
I mean: if the next day I send other usdc to my address, is there the risk those usdc are spent without my will?
Is it recommended to revoke something after the swap if the token approval has no limit?
I hope I explained myself Cheesy
Thanks in advance Smiley
Web3 Transactions doesn't exclude transaction fee from the amount you Enter. so if you chose max and send then the transaction would most likely end up getting fail, so you must keep as much as you need to pay for gas and then you can swap the rest.
and No. there is no any risk of your fund getting cut after you deposit more funds. Ledger is a non custodial wallet, it desn't exclude your balance without your permission.
the reason why you spent a lot of fee i think was because you are using Ethereum chain. Fees are generally high in ethereum chain.









▄▄████████▄▄
▄▄████████████████▄▄
▄██
████████████████████▄
▄███
██████████████████████▄
▄████
███████████████████████▄
███████████████████████▄
█████████████████▄███████
████████████████▄███████▀
██████████▄▄███▄██████▀
████████▄████▄█████▀▀
██████▄██████████▀
███▄▄█████
███████▄
██▄██████████████
░▄██████████████▀
▄█████████████▀
████████████
███████████▀
███████▀▀
.
▄▄███████▄▄
▄███████████████▄
▄███████████████████▄
▄██████████
███████████
▄███████████████████████▄
█████████████████████████
█████████████████████████
█████████████████████████
▀█
██████████████████████▀
▀██
███████████████████▀
▀███████████████████▀
▀█████████
██████▀
▀▀███████▀▀
.
 ElonCoin.org 
.
████████▄▄███████▄▄
███████▄████████████▌
██████▐██▀███████▀▀██
███████████████████▐█▌
████▄▄▄▄▄▄▄▄▄▄██▄▄▄▄▄
███▐███▀▄█▄█▀▀█▄█▄▀
███████████████████
█████████████▄████
█████████▀░▄▄▄▄▄
███████▄█▄░▀█▄▄░▀
███▄██▄▀███▄█████▄▀
▄██████▄▀███████▀
████████▄▀████▀
█████▄▄
.
"I could either watch it
happen or be a part of it"
▬▬▬▬▬
MacInTheNet (OP)
Jr. Member
*
Offline Offline

Activity: 38
Merit: 1


View Profile
January 22, 2024, 11:23:51 PM
 #4

Thank you both Smiley
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!