2

Is there a list of tokens that can be borrowed from dYdX for a flashloan? I assume it can be any of their supported Ethereum tokens but I'm having troubles finding a complete list of what they support.

Anyone know?

2 Answers 2

0

Unfortunately dYdX discontinued SoloMargin, and therefore their ability to carry out flashloans as of Nov, 2021. So no tokens can be borrowed anymore for this purpose

0

Only 4 tokens: DAI, USDC, WETH and SAI

This is how you can get this list:

     pragma solidity ^0.8.0;
    pragma experimental ABIEncoderV2;
    import "hardhat/console.sol";
    import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol";
    import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
    import { ISoloMargin } from "./ISoloMargin.sol";
    import { ICallee } from "./ICallee.sol";
    import { DYDXDataTypes } from "./DYDXDataTypes.sol";

contract DYDX is ICallee {

      ISoloMargin public immutable soloMargin;
        address _soloMargin = 0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e;
         soloMargin = ISoloMargin(_soloMargin);
                // Setup state variables
                uint256 numMarkets = ISoloMargin(_soloMargin).getNumMarkets();
                console.log(numMarkets);
                for (uint256 marketId = 0; marketId < numMarkets; marketId++) {
                    address token = ISoloMargin(_soloMargin).getMarketTokenAddress(marketId);
                    tokenAddressToMarketId[token] = marketId;
                    console.log(token);
                }

}

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.