Maximum Available Liquidity
If you're going to initiate a cross-chain request, please make sure there's enough buffer liquidity on the target chain since there will always be a time gap between reading the stats and executing the request.
The major concept is that we can get the rough available liquidity by getting the balance of the YBridgeVault
contract If the deposit token is native token. If it's ERC20-like token, we get the balance of the YBridgeVault
contract from the vault token's ERC20 contract.
However, the balance we get directly from the contract is just a rough number since some of the balance might belong to the YBridge worker.
If you need a more accurate way to access the Maximum Available Liquidity, please use the following API (Get Pool Liquidity) to obtain liquidity information.
Last updated