cryptowarz / website-bugs

Bugs found on https://cryptowarz.net
1 stars 0 forks source link

New Position in Arena Placed with Wbnb in the account. #25

Closed Mostakh97 closed 3 years ago

Mostakh97 commented 3 years ago

Hey developers,

When i tried to open a new position in arena without have any wbnb blance in my account , the transaction executed successfully and placed the position. But after that the position gets cancelled.

Here is the transction ids - 0x575fa99edcc48f5c2fe14217181e14153692d9617cfa93b2f1ea2b0087a92a7a

0x204a3583c3803927f304b83744ec4219d02aaefea0c616e4701188030f1180d8

cryptowarz commented 3 years ago

Both transactions are Approve functions. That allows the contract to transfer the tokens from your wallet to the contract. You need 2 approve functions - 1 for WBNB and 1 for WarZ ( for the burn ) Anytime a battle is opened, WarZ is consumed - ( deflation )

Function: approve(address spender, uint256 rawAmount) ***
MethodID: 0x095ea7b3
[0]:  000000000000000000000000d4386cc647eb093cc81ed86b5c93ca142b6f90f3
[1]:  ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

I do not think this was a bug - Please let me know how I can make the interaction clearer.

Those transactions for this type of interaction - the approve before the position is opened.

image