0

I deployed a contract on the bsc network to execute functions on the blockchain then I approved my contract at the wbnb address to make purchases and/or sales from the contract.

Aprobación wbnb

What am I allowing with that approval? my wbnb have been used by other contracts and my wbnb has been transferred. How can I delimit it or how have they been stolen if I only authorized wbnb?

enter image description here

1 Answer 1

0

By calling approve on a token you are authorizing the target contract access to the tokens for the amount approved.

They could transfer the tokens to someone else or burn them.

If you had approved a large amount then the contract could keep transferring any amount deposited until the total approved without requiring new approvals.

3
  • How could I approve so that only my contract receives and sends wbnb without other contracts stealing wbnb from me? Commented Jul 17, 2022 at 5:51
  • approving my contract in wbnb address any contract could be sent wbnb from my contract and wallet? Commented Jul 17, 2022 at 5:52
  • @JhonatanAlfred87 There's nothing in the standard to prevent an approved contract from forwarding funds to another address. You can always approve a zero amount so the contract won't have access to your funds. An improperly secured contract can be quite dangerous, so you shouldn't approve a contract that you don't trust.
    – Ismael
    Commented Jul 17, 2022 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.