Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bebop shows "0" gas estimate #223

Closed
SMLaursen opened this issue Dec 9, 2024 · 2 comments
Closed

Bebop shows "0" gas estimate #223

SMLaursen opened this issue Dec 9, 2024 · 2 comments

Comments

@SMLaursen
Copy link

When integrating with Your SDK, we've noticed that some routes have a zero gasEstimate (and gasCostUSD). I think I've narrowed it down to bebop.

If the gasEstimate could not be calculated for whatever reason, I think it would be cleaner to not include that field. Example of such;

{
    "id": "b0871e90-4f66-4171-8589-feab40919212",
    "fromChainId": 1,
    "fromAmountUSD": "0.8804",
    "fromAmount": "225000000000000",
    "fromToken": {
        "address": "0x0000000000000000000000000000000000000000",
        "chainId": 1,
        "symbol": "ETH",
        "decimals": 18,
        "name": "ETH",
        "coinKey": "ETH",
        "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",
        "priceUSD": "3912.79"
    },
    "fromAddress": "[REDACTED]",
    "toChainId": 1,
    "toAmountUSD": "0.8746",
    "toAmount": "874663",
    "toAmountMin": "874663",
    "toToken": {
        "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "chainId": 1,
        "symbol": "USDT",
        "decimals": 6,
        "name": "USDT",
        "coinKey": "USDT",
        "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",
        "priceUSD": "0.99998"
    },
    "toAddress": "[REDACTED]",
    "gasCostUSD": "0.0000",
    "containsSwitchChain": false,
    "steps": [
        {
            "type": "lifi",
            "id": "b0871e90-4f66-4171-8589-feab40919212:0",
            "tool": "bebop",
            "toolDetails": {
                "key": "bebop",
                "name": "Bebop",
                "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/bebop.svg"
            },
            "action": {
                "fromToken": {
                    "address": "0x0000000000000000000000000000000000000000",
                    "chainId": 1,
                    "symbol": "ETH",
                    "decimals": 18,
                    "name": "ETH",
                    "coinKey": "ETH",
                    "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",
                    "priceUSD": "3912.79"
                },
                "fromAmount": "225000000000000",
                "toToken": {
                    "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
                    "chainId": 1,
                    "symbol": "USDT",
                    "decimals": 6,
                    "name": "USDT",
                    "coinKey": "USDT",
                    "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",
                    "priceUSD": "0.99998"
                },
                "fromChainId": 1,
                "toChainId": 1,
                "slippage": 0.005,
                "fromAddress": "[REDACTED]",
                "toAddress": "[REDACTED]"
            },
            "estimate": {
                "tool": "bebop",
                "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
                "toAmountMin": "874663",
                "toAmount": "874663",
                "fromAmount": "225000000000000",
                "feeCosts": [],
                "gasCosts": [
                    {
                        "type": "SEND",
                        "price": "10284487980",
                        "estimate": "0",
                        "limit": "243000",
                        "amount": "0",
                        "amountUSD": "0.0000",
                        "token": {
                            "address": "0x0000000000000000000000000000000000000000",
                            "chainId": 1,
                            "symbol": "ETH",
                            "decimals": 18,
                            "name": "ETH",
                            "coinKey": "ETH",
                            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",
                            "priceUSD": "3912.79"
                        }
                    }
                ],
                "executionDuration": 30,
                "fromAmountUSD": "0.8804",
                "toAmountUSD": "0.8746"
            },
            "includedSteps": [
                {
                    "id": "82fbe963-7d60-406e-8900-31e278a55f85",
                    "type": "swap",
                    "action": {
                        "fromChainId": 1,
                        "fromAmount": "225000000000000",
                        "fromToken": {
                            "address": "0x0000000000000000000000000000000000000000",
                            "chainId": 1,
                            "symbol": "ETH",
                            "decimals": 18,
                            "name": "ETH",
                            "coinKey": "ETH",
                            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",
                            "priceUSD": "3912.79"
                        },
                        "toChainId": 1,
                        "toToken": {
                            "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
                            "chainId": 1,
                            "symbol": "USDT",
                            "decimals": 6,
                            "name": "USDT",
                            "coinKey": "USDT",
                            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",
                            "priceUSD": "0.99998"
                        },
                        "slippage": 0.005,
                        "fromAddress": "[REDACTED]"
                    },
                    "estimate": {
                        "tool": "bebop",
                        "fromAmount": "225000000000000",
                        "toAmount": "874663",
                        "toAmountMin": "874663",
                        "approvalAddress": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
                        "executionDuration": 30,
                        "feeCosts": [],
                        "gasCosts": [
                            {
                                "type": "SEND",
                                "price": "10284487980",
                                "estimate": "0",
                                "limit": "0",
                                "amount": "0",
                                "amountUSD": "0.0000",
                                "token": {
                                    "address": "0x0000000000000000000000000000000000000000",
                                    "chainId": 1,
                                    "symbol": "ETH",
                                    "decimals": 18,
                                    "name": "ETH",
                                    "coinKey": "ETH",
                                    "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",
                                    "priceUSD": "3912.79"
                                }
                            }
                        ]
                    },
                    "tool": "bebop",
                    "toolDetails": {
                        "key": "bebop",
                        "name": "Bebop",
                        "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/bebop.svg"
                    }
                }
            ],
            "integrator": "goodwallet"
        }
    ],
    "tags": [
        "RECOMMENDED",
        "CHEAPEST",
        "FASTEST"
    ]
}
@chybisov
Copy link
Member

chybisov commented Dec 9, 2024

@SMLaursen hey, thank you! I'll forward this to our BE team 🙂

@chybisov
Copy link
Member

Hey, it should be fixed on production. Thank you 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants