You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment we can query the withdrawal amount that has been requested. This value can be much larger than the available balance (it will be capped when we withdraw). However, there seems to be no way to read the amount of tokens which we will be able to withdraw successfully.
balanceStates is a private mapping (and cannot be made public due to ABI encoder issues). The only way to query balance information is via getBalances which will deduct any pending withdraw (capped at the current balance):
This is the amount which we will be able to withdraw, but there is no way to access it externally after a request has been made.
We would have to access balanceStates[user][token].balance directly. While this is possible from web3 via getStorageAt it does not seem possible from other smart contracts (cf. https://eips.ethereum.org/EIPS/eip-2330).
Thus external contracts such as the BatchExchangeViewer can give no accurate estimation of how much will end up in an account after a claimable withdraw is executed.
The text was updated successfully, but these errors were encountered:
At the moment we can query the withdrawal amount that has been requested. This value can be much larger than the available balance (it will be capped when we withdraw). However, there seems to be no way to read the amount of tokens which we will be able to withdraw successfully.
balanceStates
is a private mapping (and cannot be made public due to ABI encoder issues). The only way to query balance information is viagetBalances
which will deduct any pending withdraw (capped at the current balance):uint256 amount = Math.min(balanceStates[user][token].balance, balanceStates[user][token].pendingWithdraws.amount);
This is the amount which we will be able to withdraw, but there is no way to access it externally after a request has been made.
We would have to access
balanceStates[user][token].balance
directly. While this is possible from web3 viagetStorageAt
it does not seem possible from other smart contracts (cf. https://eips.ethereum.org/EIPS/eip-2330).Thus external contracts such as the BatchExchangeViewer can give no accurate estimation of how much will end up in an account after a claimable withdraw is executed.
The text was updated successfully, but these errors were encountered: