ETH Price: $3,880.36 (+5.89%)

Contract

0x07ee93aEEa0a36FfF2A9B95dd22Bd6049EE54f26
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Join92398892020-01-08 12:02:191792 days ago1578484939IN
Sky: Proxy Actions DSR
0 ETH0.0017792820
Join92398822020-01-08 12:00:171792 days ago1578484817IN
Sky: Proxy Actions DSR
0 ETH0.001767820
Exit All89588752019-11-18 22:12:471843 days ago1574115167IN
Sky: Proxy Actions DSR
0 ETH0.000926946
Join89588712019-11-18 22:10:091843 days ago1574115009IN
Sky: Proxy Actions DSR
0 ETH0.001219556
Exit All89588412019-11-18 22:03:451843 days ago1574114625IN
Sky: Proxy Actions DSR
0 ETH0.000999326
Join89587942019-11-18 21:53:251843 days ago1574114005IN
Sky: Proxy Actions DSR
0 ETH0.001467196

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DssProxyActionsDsr

Compiler Version
v0.5.12+commit.7709ece9

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-11-14
*/

// hevm: flattened sources of /nix/store/sxr9nv6bdacjzw8vhns72bxjga458x34-dss-proxy-actions-53f1d75/src/DssProxyActions.sol
pragma solidity =0.5.12;

////// /nix/store/sxr9nv6bdacjzw8vhns72bxjga458x34-dss-proxy-actions-53f1d75/src/DssProxyActions.sol
/* pragma solidity 0.5.12; */

contract GemLike {
    function approve(address, uint) public;
    function transfer(address, uint) public;
    function transferFrom(address, address, uint) public;
    function deposit() public payable;
    function withdraw(uint) public;
}

contract ManagerLike {
    function cdpCan(address, uint, address) public view returns (uint);
    function ilks(uint) public view returns (bytes32);
    function owns(uint) public view returns (address);
    function urns(uint) public view returns (address);
    function vat() public view returns (address);
    function open(bytes32, address) public returns (uint);
    function give(uint, address) public;
    function cdpAllow(uint, address, uint) public;
    function urnAllow(address, uint) public;
    function frob(uint, int, int) public;
    function flux(uint, address, uint) public;
    function move(uint, address, uint) public;
    function exit(address, uint, address, uint) public;
    function quit(uint, address) public;
    function enter(address, uint) public;
    function shift(uint, uint) public;
}

contract VatLike {
    function can(address, address) public view returns (uint);
    function ilks(bytes32) public view returns (uint, uint, uint, uint, uint);
    function dai(address) public view returns (uint);
    function urns(bytes32, address) public view returns (uint, uint);
    function frob(bytes32, address, address, address, int, int) public;
    function hope(address) public;
    function move(address, address, uint) public;
}

contract GemJoinLike {
    function dec() public returns (uint);
    function gem() public returns (GemLike);
    function join(address, uint) public payable;
    function exit(address, uint) public;
}

contract GNTJoinLike {
    function bags(address) public view returns (address);
    function make(address) public returns (address);
}

contract DaiJoinLike {
    function vat() public returns (VatLike);
    function dai() public returns (GemLike);
    function join(address, uint) public payable;
    function exit(address, uint) public;
}

contract HopeLike {
    function hope(address) public;
    function nope(address) public;
}

contract EndLike {
    function fix(bytes32) public view returns (uint);
    function cash(bytes32, uint) public;
    function free(bytes32) public;
    function pack(uint) public;
    function skim(bytes32, address) public;
}

contract JugLike {
    function drip(bytes32) public returns (uint);
}

contract PotLike {
    function pie(address) public view returns (uint);
    function drip() public returns (uint);
    function join(uint) public;
    function exit(uint) public;
}

contract ProxyRegistryLike {
    function proxies(address) public view returns (address);
    function build(address) public returns (address);
}

contract ProxyLike {
    function owner() public view returns (address);
}

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// WARNING: These functions meant to be used as a a library for a DSProxy. Some are unsafe if you call them directly.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

contract Common {
    uint256 constant RAY = 10 ** 27;

    // Internal functions

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, "mul-overflow");
    }

    // Public functions

    function daiJoin_join(address apt, address urn, uint wad) public {
        // Gets DAI from the user's wallet
        DaiJoinLike(apt).dai().transferFrom(msg.sender, address(this), wad);
        // Approves adapter to take the DAI amount
        DaiJoinLike(apt).dai().approve(apt, wad);
        // Joins DAI into the vat
        DaiJoinLike(apt).join(urn, wad);
    }
}

contract DssProxyActions is Common {
    // Internal functions

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, "sub-overflow");
    }

    function toInt(uint x) internal pure returns (int y) {
        y = int(x);
        require(y >= 0, "int-overflow");
    }

    function toRad(uint wad) internal pure returns (uint rad) {
        rad = mul(wad, 10 ** 27);
    }

    function convertTo18(address gemJoin, uint256 amt) internal returns (uint256 wad) {
        // For those collaterals that have less than 18 decimals precision we need to do the conversion before passing to frob function
        // Adapters will automatically handle the difference of precision
        wad = mul(
            amt,
            10 ** (18 - GemJoinLike(gemJoin).dec())
        );
    }

    function _getDrawDart(
        address vat,
        address jug,
        address urn,
        bytes32 ilk,
        uint wad
    ) internal returns (int dart) {
        // Updates stability fee rate
        uint rate = JugLike(jug).drip(ilk);

        // Gets DAI balance of the urn in the vat
        uint dai = VatLike(vat).dai(urn);

        // If there was already enough DAI in the vat balance, just exits it without adding more debt
        if (dai < mul(wad, RAY)) {
            // Calculates the needed dart so together with the existing dai in the vat is enough to exit wad amount of DAI tokens
            dart = toInt(sub(mul(wad, RAY), dai) / rate);
            // This is neeeded due lack of precision. It might need to sum an extra dart wei (for the given DAI wad amount)
            dart = mul(uint(dart), rate) < mul(wad, RAY) ? dart + 1 : dart;
        }
    }

    function _getWipeDart(
        address vat,
        uint dai,
        address urn,
        bytes32 ilk
    ) internal view returns (int dart) {
        // Gets actual rate from the vat
        (, uint rate,,,) = VatLike(vat).ilks(ilk);
        // Gets actual art value of the urn
        (, uint art) = VatLike(vat).urns(ilk, urn);

        // Uses the whole dai balance in the vat to reduce the debt
        dart = toInt(dai / rate);
        // Checks the calculated dart is not higher than urn.art (total debt), otherwise uses its value
        dart = uint(dart) <= art ? - dart : - toInt(art);
    }

    function _getWipeAllWad(
        address vat,
        address usr,
        address urn,
        bytes32 ilk
    ) internal view returns (uint wad) {
        // Gets actual rate from the vat
        (, uint rate,,,) = VatLike(vat).ilks(ilk);
        // Gets actual art value of the urn
        (, uint art) = VatLike(vat).urns(ilk, urn);
        // Gets actual dai amount in the urn
        uint dai = VatLike(vat).dai(usr);

        uint rad = sub(mul(art, rate), dai);
        wad = rad / RAY;

        // If the rad precision has some dust, it will need to request for 1 extra wad wei
        wad = mul(wad, RAY) < rad ? wad + 1 : wad;
    }

    // Public functions

    function transfer(address gem, address dst, uint wad) public {
        GemLike(gem).transfer(dst, wad);
    }

    function ethJoin_join(address apt, address urn) public payable {
        // Wraps ETH in WETH
        GemJoinLike(apt).gem().deposit.value(msg.value)();
        // Approves adapter to take the WETH amount
        GemJoinLike(apt).gem().approve(address(apt), msg.value);
        // Joins WETH collateral into the vat
        GemJoinLike(apt).join(urn, msg.value);
    }

    function gemJoin_join(address apt, address urn, uint wad, bool transferFrom) public {
        // Only executes for tokens that have approval/transferFrom implementation
        if (transferFrom) {
            // Gets token from the user's wallet
            GemJoinLike(apt).gem().transferFrom(msg.sender, address(this), wad);
            // Approves adapter to take the token amount
            GemJoinLike(apt).gem().approve(apt, wad);
        }
        // Joins token collateral into the vat
        GemJoinLike(apt).join(urn, wad);
    }

    function hope(
        address obj,
        address usr
    ) public {
        HopeLike(obj).hope(usr);
    }

    function nope(
        address obj,
        address usr
    ) public {
        HopeLike(obj).nope(usr);
    }

    function open(
        address manager,
        bytes32 ilk,
        address usr
    ) public returns (uint cdp) {
        cdp = ManagerLike(manager).open(ilk, usr);
    }

    function give(
        address manager,
        uint cdp,
        address usr
    ) public {
        ManagerLike(manager).give(cdp, usr);
    }

    function giveToProxy(
        address proxyRegistry,
        address manager,
        uint cdp,
        address dst
    ) public {
        // Gets actual proxy address
        address proxy = ProxyRegistryLike(proxyRegistry).proxies(dst);
        // Checks if the proxy address already existed and dst address is still the owner
        if (proxy == address(0) || ProxyLike(proxy).owner() != dst) {
            uint csize;
            assembly {
                csize := extcodesize(dst)
            }
            // We want to avoid creating a proxy for a contract address that might not be able to handle proxies, then losing the CDP
            require(csize == 0, "Dst-is-a-contract");
            // Creates the proxy for the dst address
            proxy = ProxyRegistryLike(proxyRegistry).build(dst);
        }
        // Transfers CDP to the dst proxy
        give(manager, cdp, proxy);
    }

    function cdpAllow(
        address manager,
        uint cdp,
        address usr,
        uint ok
    ) public {
        ManagerLike(manager).cdpAllow(cdp, usr, ok);
    }

    function urnAllow(
        address manager,
        address usr,
        uint ok
    ) public {
        ManagerLike(manager).urnAllow(usr, ok);
    }

    function flux(
        address manager,
        uint cdp,
        address dst,
        uint wad
    ) public {
        ManagerLike(manager).flux(cdp, dst, wad);
    }

    function move(
        address manager,
        uint cdp,
        address dst,
        uint rad
    ) public {
        ManagerLike(manager).move(cdp, dst, rad);
    }

    function frob(
        address manager,
        uint cdp,
        int dink,
        int dart
    ) public {
        ManagerLike(manager).frob(cdp, dink, dart);
    }

    function quit(
        address manager,
        uint cdp,
        address dst
    ) public {
        ManagerLike(manager).quit(cdp, dst);
    }

    function enter(
        address manager,
        address src,
        uint cdp
    ) public {
        ManagerLike(manager).enter(src, cdp);
    }

    function shift(
        address manager,
        uint cdpSrc,
        uint cdpOrg
    ) public {
        ManagerLike(manager).shift(cdpSrc, cdpOrg);
    }

    function makeGemBag(
        address gemJoin
    ) public returns (address bag) {
        bag = GNTJoinLike(gemJoin).make(address(this));
    }

    function lockETH(
        address manager,
        address ethJoin,
        uint cdp
    ) public payable {
        // Receives ETH amount, converts it to WETH and joins it into the vat
        ethJoin_join(ethJoin, address(this));
        // Locks WETH amount into the CDP
        VatLike(ManagerLike(manager).vat()).frob(
            ManagerLike(manager).ilks(cdp),
            ManagerLike(manager).urns(cdp),
            address(this),
            address(this),
            toInt(msg.value),
            0
        );
    }

    function safeLockETH(
        address manager,
        address ethJoin,
        uint cdp,
        address owner
    ) public payable {
        require(ManagerLike(manager).owns(cdp) == owner, "owner-missmatch");
        lockETH(manager, ethJoin, cdp);
    }

    function lockGem(
        address manager,
        address gemJoin,
        uint cdp,
        uint wad,
        bool transferFrom
    ) public {
        // Takes token amount from user's wallet and joins into the vat
        gemJoin_join(gemJoin, address(this), wad, transferFrom);
        // Locks token amount into the CDP
        VatLike(ManagerLike(manager).vat()).frob(
            ManagerLike(manager).ilks(cdp),
            ManagerLike(manager).urns(cdp),
            address(this),
            address(this),
            toInt(convertTo18(gemJoin, wad)),
            0
        );
    }

    function safeLockGem(
        address manager,
        address gemJoin,
        uint cdp,
        uint wad,
        bool transferFrom,
        address owner
    ) public {
        require(ManagerLike(manager).owns(cdp) == owner, "owner-missmatch");
        lockGem(manager, gemJoin, cdp, wad, transferFrom);
    }

    function freeETH(
        address manager,
        address ethJoin,
        uint cdp,
        uint wad
    ) public {
        // Unlocks WETH amount from the CDP
        frob(manager, cdp, -toInt(wad), 0);
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), wad);
        // Exits WETH amount to proxy address as a token
        GemJoinLike(ethJoin).exit(address(this), wad);
        // Converts WETH to ETH
        GemJoinLike(ethJoin).gem().withdraw(wad);
        // Sends ETH back to the user's wallet
        msg.sender.transfer(wad);
    }

    function freeGem(
        address manager,
        address gemJoin,
        uint cdp,
        uint wad
    ) public {
        uint wad18 = convertTo18(gemJoin, wad);
        // Unlocks token amount from the CDP
        frob(manager, cdp, -toInt(wad18), 0);
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), wad18);
        // Exits token amount to the user's wallet as a token
        GemJoinLike(gemJoin).exit(msg.sender, wad);
    }

    function exitETH(
        address manager,
        address ethJoin,
        uint cdp,
        uint wad
    ) public {
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), wad);

        // Exits WETH amount to proxy address as a token
        GemJoinLike(ethJoin).exit(address(this), wad);
        // Converts WETH to ETH
        GemJoinLike(ethJoin).gem().withdraw(wad);
        // Sends ETH back to the user's wallet
        msg.sender.transfer(wad);
    }

    function exitGem(
        address manager,
        address gemJoin,
        uint cdp,
        uint wad
    ) public {
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), convertTo18(gemJoin, wad));

        // Exits token amount to the user's wallet as a token
        GemJoinLike(gemJoin).exit(msg.sender, wad);
    }

    function draw(
        address manager,
        address jug,
        address daiJoin,
        uint cdp,
        uint wad
    ) public {
        address urn = ManagerLike(manager).urns(cdp);
        address vat = ManagerLike(manager).vat();
        bytes32 ilk = ManagerLike(manager).ilks(cdp);
        // Generates debt in the CDP
        frob(manager, cdp, 0, _getDrawDart(vat, jug, urn, ilk, wad));
        // Moves the DAI amount (balance in the vat in rad) to proxy's address
        move(manager, cdp, address(this), toRad(wad));
        // Allows adapter to access to proxy's DAI balance in the vat
        if (VatLike(vat).can(address(this), address(daiJoin)) == 0) {
            VatLike(vat).hope(daiJoin);
        }
        // Exits DAI to the user's wallet as a token
        DaiJoinLike(daiJoin).exit(msg.sender, wad);
    }

    function wipe(
        address manager,
        address daiJoin,
        uint cdp,
        uint wad
    ) public {
        address vat = ManagerLike(manager).vat();
        address urn = ManagerLike(manager).urns(cdp);
        bytes32 ilk = ManagerLike(manager).ilks(cdp);

        address own = ManagerLike(manager).owns(cdp);
        if (own == address(this) || ManagerLike(manager).cdpCan(own, cdp, address(this)) == 1) {
            // Joins DAI amount into the vat
            daiJoin_join(daiJoin, urn, wad);
            // Paybacks debt to the CDP
            frob(manager, cdp, 0, _getWipeDart(vat, VatLike(vat).dai(urn), urn, ilk));
        } else {
             // Joins DAI amount into the vat
            daiJoin_join(daiJoin, address(this), wad);
            // Paybacks debt to the CDP
            VatLike(vat).frob(
                ilk,
                urn,
                address(this),
                address(this),
                0,
                _getWipeDart(vat, wad * RAY, urn, ilk)
            );
        }
    }

    function safeWipe(
        address manager,
        address daiJoin,
        uint cdp,
        uint wad,
        address owner
    ) public {
        require(ManagerLike(manager).owns(cdp) == owner, "owner-missmatch");
        wipe(manager, daiJoin, cdp, wad);
    }

    function wipeAll(
        address manager,
        address daiJoin,
        uint cdp
    ) public {
        address vat = ManagerLike(manager).vat();
        address urn = ManagerLike(manager).urns(cdp);
        bytes32 ilk = ManagerLike(manager).ilks(cdp);
        (, uint art) = VatLike(vat).urns(ilk, urn);

        address own = ManagerLike(manager).owns(cdp);
        if (own == address(this) || ManagerLike(manager).cdpCan(own, cdp, address(this)) == 1) {
            // Joins DAI amount into the vat
            daiJoin_join(daiJoin, urn, _getWipeAllWad(vat, urn, urn, ilk));
            // Paybacks debt to the CDP
            frob(manager, cdp, 0, -int(art));
        } else {
            // Joins DAI amount into the vat
            daiJoin_join(daiJoin, address(this), _getWipeAllWad(vat, address(this), urn, ilk));
            // Paybacks debt to the CDP
            VatLike(vat).frob(
                ilk,
                urn,
                address(this),
                address(this),
                0,
                -int(art)
            );
        }
    }

    function safeWipeAll(
        address manager,
        address daiJoin,
        uint cdp,
        address owner
    ) public {
        require(ManagerLike(manager).owns(cdp) == owner, "owner-missmatch");
        wipeAll(manager, daiJoin, cdp);
    }

    function lockETHAndDraw(
        address manager,
        address jug,
        address ethJoin,
        address daiJoin,
        uint cdp,
        uint wadD
    ) public payable {
        address urn = ManagerLike(manager).urns(cdp);
        address vat = ManagerLike(manager).vat();
        bytes32 ilk = ManagerLike(manager).ilks(cdp);
        // Receives ETH amount, converts it to WETH and joins it into the vat
        ethJoin_join(ethJoin, urn);
        // Locks WETH amount into the CDP and generates debt
        frob(manager, cdp, toInt(msg.value), _getDrawDart(vat, jug, urn, ilk, wadD));
        // Moves the DAI amount (balance in the vat in rad) to proxy's address
        move(manager, cdp, address(this), toRad(wadD));
        // Allows adapter to access to proxy's DAI balance in the vat
        if (VatLike(vat).can(address(this), address(daiJoin)) == 0) {
            VatLike(vat).hope(daiJoin);
        }
        // Exits DAI to the user's wallet as a token
        DaiJoinLike(daiJoin).exit(msg.sender, wadD);
    }

    function openLockETHAndDraw(
        address manager,
        address jug,
        address ethJoin,
        address daiJoin,
        bytes32 ilk,
        uint wadD
    ) public payable returns (uint cdp) {
        cdp = open(manager, ilk, address(this));
        lockETHAndDraw(manager, jug, ethJoin, daiJoin, cdp, wadD);
    }

    function lockGemAndDraw(
        address manager,
        address jug,
        address gemJoin,
        address daiJoin,
        uint cdp,
        uint wadC,
        uint wadD,
        bool transferFrom
    ) public {
        address urn = ManagerLike(manager).urns(cdp);
        address vat = ManagerLike(manager).vat();
        bytes32 ilk = ManagerLike(manager).ilks(cdp);
        // Takes token amount from user's wallet and joins into the vat
        gemJoin_join(gemJoin, urn, wadC, transferFrom);
        // Locks token amount into the CDP and generates debt
        frob(manager, cdp, toInt(convertTo18(gemJoin, wadC)), _getDrawDart(vat, jug, urn, ilk, wadD));
        // Moves the DAI amount (balance in the vat in rad) to proxy's address
        move(manager, cdp, address(this), toRad(wadD));
        // Allows adapter to access to proxy's DAI balance in the vat
        if (VatLike(vat).can(address(this), address(daiJoin)) == 0) {
            VatLike(vat).hope(daiJoin);
        }
        // Exits DAI to the user's wallet as a token
        DaiJoinLike(daiJoin).exit(msg.sender, wadD);
    }

    function openLockGemAndDraw(
        address manager,
        address jug,
        address gemJoin,
        address daiJoin,
        bytes32 ilk,
        uint wadC,
        uint wadD,
        bool transferFrom
    ) public returns (uint cdp) {
        cdp = open(manager, ilk, address(this));
        lockGemAndDraw(manager, jug, gemJoin, daiJoin, cdp, wadC, wadD, transferFrom);
    }

    function openLockGNTAndDraw(
        address manager,
        address jug,
        address gntJoin,
        address daiJoin,
        bytes32 ilk,
        uint wadC,
        uint wadD
    ) public returns (address bag, uint cdp) {
        // Creates bag (if doesn't exist) to hold GNT
        bag = GNTJoinLike(gntJoin).bags(address(this));
        if (bag == address(0)) {
            bag = makeGemBag(gntJoin);
        }
        // Transfer funds to the funds which previously were sent to the proxy
        GemLike(GemJoinLike(gntJoin).gem()).transfer(bag, wadC);
        cdp = openLockGemAndDraw(manager, jug, gntJoin, daiJoin, ilk, wadC, wadD, false);
    }

    function wipeAndFreeETH(
        address manager,
        address ethJoin,
        address daiJoin,
        uint cdp,
        uint wadC,
        uint wadD
    ) public {
        address urn = ManagerLike(manager).urns(cdp);
        // Joins DAI amount into the vat
        daiJoin_join(daiJoin, urn, wadD);
        // Paybacks debt to the CDP and unlocks WETH amount from it
        frob(
            manager,
            cdp,
            -toInt(wadC),
            _getWipeDart(ManagerLike(manager).vat(), VatLike(ManagerLike(manager).vat()).dai(urn), urn, ManagerLike(manager).ilks(cdp))
        );
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), wadC);
        // Exits WETH amount to proxy address as a token
        GemJoinLike(ethJoin).exit(address(this), wadC);
        // Converts WETH to ETH
        GemJoinLike(ethJoin).gem().withdraw(wadC);
        // Sends ETH back to the user's wallet
        msg.sender.transfer(wadC);
    }

    function wipeAllAndFreeETH(
        address manager,
        address ethJoin,
        address daiJoin,
        uint cdp,
        uint wadC
    ) public {
        address vat = ManagerLike(manager).vat();
        address urn = ManagerLike(manager).urns(cdp);
        bytes32 ilk = ManagerLike(manager).ilks(cdp);
        (, uint art) = VatLike(vat).urns(ilk, urn);

        // Joins DAI amount into the vat
        daiJoin_join(daiJoin, urn, _getWipeAllWad(vat, urn, urn, ilk));
        // Paybacks debt to the CDP and unlocks WETH amount from it
        frob(
            manager,
            cdp,
            -toInt(wadC),
            -int(art)
        );
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), wadC);
        // Exits WETH amount to proxy address as a token
        GemJoinLike(ethJoin).exit(address(this), wadC);
        // Converts WETH to ETH
        GemJoinLike(ethJoin).gem().withdraw(wadC);
        // Sends ETH back to the user's wallet
        msg.sender.transfer(wadC);
    }

    function wipeAndFreeGem(
        address manager,
        address gemJoin,
        address daiJoin,
        uint cdp,
        uint wadC,
        uint wadD
    ) public {
        address urn = ManagerLike(manager).urns(cdp);
        // Joins DAI amount into the vat
        daiJoin_join(daiJoin, urn, wadD);
        uint wad18 = convertTo18(gemJoin, wadC);
        // Paybacks debt to the CDP and unlocks token amount from it
        frob(
            manager,
            cdp,
            -toInt(wad18),
            _getWipeDart(ManagerLike(manager).vat(), VatLike(ManagerLike(manager).vat()).dai(urn), urn, ManagerLike(manager).ilks(cdp))
        );
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), wad18);
        // Exits token amount to the user's wallet as a token
        GemJoinLike(gemJoin).exit(msg.sender, wadC);
    }

    function wipeAllAndFreeGem(
        address manager,
        address gemJoin,
        address daiJoin,
        uint cdp,
        uint wadC
    ) public {
        address vat = ManagerLike(manager).vat();
        address urn = ManagerLike(manager).urns(cdp);
        bytes32 ilk = ManagerLike(manager).ilks(cdp);
        (, uint art) = VatLike(vat).urns(ilk, urn);

        // Joins DAI amount into the vat
        daiJoin_join(daiJoin, urn, _getWipeAllWad(vat, urn, urn, ilk));
        uint wad18 = convertTo18(gemJoin, wadC);
        // Paybacks debt to the CDP and unlocks token amount from it
        frob(
            manager,
            cdp,
            -toInt(wad18),
            -int(art)
        );
        // Moves the amount from the CDP urn to proxy's address
        flux(manager, cdp, address(this), wad18);
        // Exits token amount to the user's wallet as a token
        GemJoinLike(gemJoin).exit(msg.sender, wadC);
    }
}

contract DssProxyActionsEnd is Common {
    // Internal functions

    function _free(
        address manager,
        address end,
        uint cdp
    ) internal returns (uint ink) {
        bytes32 ilk = ManagerLike(manager).ilks(cdp);
        address urn = ManagerLike(manager).urns(cdp);
        VatLike vat = VatLike(ManagerLike(manager).vat());
        uint art;
        (ink, art) = vat.urns(ilk, urn);

        // If CDP still has debt, it needs to be paid
        if (art > 0) {
            EndLike(end).skim(ilk, urn);
            (ink,) = vat.urns(ilk, urn);
        }
        // Approves the manager to transfer the position to proxy's address in the vat
        if (vat.can(address(this), address(manager)) == 0) {
            vat.hope(manager);
        }
        // Transfers position from CDP to the proxy address
        ManagerLike(manager).quit(cdp, address(this));
        // Frees the position and recovers the collateral in the vat registry
        EndLike(end).free(ilk);
    }

    // Public functions
    function freeETH(
        address manager,
        address ethJoin,
        address end,
        uint cdp
    ) public {
        uint wad = _free(manager, end, cdp);
        // Exits WETH amount to proxy address as a token
        GemJoinLike(ethJoin).exit(address(this), wad);
        // Converts WETH to ETH
        GemJoinLike(ethJoin).gem().withdraw(wad);
        // Sends ETH back to the user's wallet
        msg.sender.transfer(wad);
    }

    function freeGem(
        address manager,
        address gemJoin,
        address end,
        uint cdp
    ) public {
        uint wad = _free(manager, end, cdp);
        // Exits token amount to the user's wallet as a token
        GemJoinLike(gemJoin).exit(msg.sender, wad);
    }

    function pack(
        address daiJoin,
        address end,
        uint wad
    ) public {
        daiJoin_join(daiJoin, address(this), wad);
        VatLike vat = DaiJoinLike(daiJoin).vat();
        // Approves the end to take out DAI from the proxy's balance in the vat
        if (vat.can(address(this), address(end)) == 0) {
            vat.hope(end);
        }
        EndLike(end).pack(wad);
    }

    function cashETH(
        address ethJoin,
        address end,
        bytes32 ilk,
        uint wad
    ) public {
        EndLike(end).cash(ilk, wad);
        uint wadC = mul(wad, EndLike(end).fix(ilk)) / RAY;
        // Exits WETH amount to proxy address as a token
        GemJoinLike(ethJoin).exit(address(this), wadC);
        // Converts WETH to ETH
        GemJoinLike(ethJoin).gem().withdraw(wadC);
        // Sends ETH back to the user's wallet
        msg.sender.transfer(wadC);
    }

    function cashGem(
        address gemJoin,
        address end,
        bytes32 ilk,
        uint wad
    ) public {
        EndLike(end).cash(ilk, wad);
        // Exits token amount to the user's wallet as a token
        GemJoinLike(gemJoin).exit(msg.sender, mul(wad, EndLike(end).fix(ilk)) / RAY);
    }
}

contract DssProxyActionsDsr is Common {
    function join(
        address daiJoin,
        address pot,
        uint wad
    ) public {
        VatLike vat = DaiJoinLike(daiJoin).vat();
        // Executes drip to get the chi rate updated to rho == now, otherwise join will fail
        uint chi = PotLike(pot).drip();
        // Joins wad amount to the vat balance
        daiJoin_join(daiJoin, address(this), wad);
        // Approves the pot to take out DAI from the proxy's balance in the vat
        if (vat.can(address(this), address(pot)) == 0) {
            vat.hope(pot);
        }
        // Joins the pie value (equivalent to the DAI wad amount) in the pot
        PotLike(pot).join(mul(wad, RAY) / chi);
    }

    function exit(
        address daiJoin,
        address pot,
        uint wad
    ) public {
        VatLike vat = DaiJoinLike(daiJoin).vat();
        // Executes drip to count the savings accumulated until this moment
        uint chi = PotLike(pot).drip();
        // Calculates the pie value in the pot equivalent to the DAI wad amount
        uint pie = mul(wad, RAY) / chi;
        // Exits DAI from the pot
        PotLike(pot).exit(pie);
        // Checks the actual balance of DAI in the vat after the pot exit
        uint bal = DaiJoinLike(daiJoin).vat().dai(address(this));
        // Allows adapter to access to proxy's DAI balance in the vat
        if (vat.can(address(this), address(daiJoin)) == 0) {
            vat.hope(daiJoin);
        }
        // It is necessary to check if due rounding the exact wad amount can be exited by the adapter.
        // Otherwise it will do the maximum DAI balance in the vat
        DaiJoinLike(daiJoin).exit(
            msg.sender,
            bal >= mul(wad, RAY) ? wad : bal / RAY
        );
    }

    function exitAll(
        address daiJoin,
        address pot
    ) public {
        VatLike vat = DaiJoinLike(daiJoin).vat();
        // Executes drip to count the savings accumulated until this moment
        uint chi = PotLike(pot).drip();
        // Gets the total pie belonging to the proxy address
        uint pie = PotLike(pot).pie(address(this));
        // Exits DAI from the pot
        PotLike(pot).exit(pie);
        // Allows adapter to access to proxy's DAI balance in the vat
        if (vat.can(address(this), address(daiJoin)) == 0) {
            vat.hope(daiJoin);
        }
        // Exits the DAI amount corresponding to the value of pie
        DaiJoinLike(daiJoin).exit(msg.sender, mul(chi, pie) / RAY);
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"internalType":"address","name":"apt","type":"address"},{"internalType":"address","name":"urn","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"daiJoin_join","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"daiJoin","type":"address"},{"internalType":"address","name":"pot","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"daiJoin","type":"address"},{"internalType":"address","name":"pot","type":"address"}],"name":"exitAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"daiJoin","type":"address"},{"internalType":"address","name":"pot","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"join","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610d43806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806371006c09146100515780639f6c3dbd14610089578063c56167c6146100bf578063c77843b3146100f5575b600080fd5b6100876004803603606081101561006757600080fd5b506001600160a01b03813581169160208101359091169060400135610123565b005b6100876004803603606081101561009f57600080fd5b506001600160a01b03813581169160208101359091169060400135610506565b610087600480360360608110156100d557600080fd5b506001600160a01b03813581169160208101359091169060400135610763565b6100876004803603604081101561010b57600080fd5b506001600160a01b0381358116916020013516610986565b6000836001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561016057600080fd5b505af1158015610174573d6000803e3d6000fd5b505050506040513d602081101561018a57600080fd5b505160408051634fb3c66560e11b815290519192506000916001600160a01b03861691639f678cca91600480830192602092919082900301818787803b1580156101d357600080fd5b505af11580156101e7573d6000803e3d6000fd5b505050506040513d60208110156101fd57600080fd5b5051905060008161021a856b033b2e3c9fd0803ce8000000610cad565b8161022157fe5b049050846001600160a01b0316637f8661a1826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561026a57600080fd5b505af115801561027e573d6000803e3d6000fd5b505050506000866001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102bf57600080fd5b505af11580156102d3573d6000803e3d6000fd5b505050506040513d60208110156102e957600080fd5b505160408051633612d9a360e11b815230600482015290516001600160a01b0390921691636c25b34691602480820192602092909190829003018186803b15801561033357600080fd5b505afa158015610347573d6000803e3d6000fd5b505050506040513d602081101561035d57600080fd5b505160408051634538c4eb60e01b81523060048201526001600160a01b038a81166024830152915192935090861691634538c4eb91604480820192602092909190829003018186803b1580156103b257600080fd5b505afa1580156103c6573d6000803e3d6000fd5b505050506040513d60208110156103dc57600080fd5b505161045357836001600160a01b031663a3b22fc4886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561043a57600080fd5b505af115801561044e573d6000803e3d6000fd5b505050505b866001600160a01b031663ef693bed33610479886b033b2e3c9fd0803ce8000000610cad565b841015610494576b033b2e3c9fd0803ce80000008404610496565b875b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156104e557600080fd5b505af11580156104f9573d6000803e3d6000fd5b5050505050505050505050565b6000836001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561054357600080fd5b505af1158015610557573d6000803e3d6000fd5b505050506040513d602081101561056d57600080fd5b505160408051634fb3c66560e11b815290519192506000916001600160a01b03861691639f678cca91600480830192602092919082900301818787803b1580156105b657600080fd5b505af11580156105ca573d6000803e3d6000fd5b505050506040513d60208110156105e057600080fd5b505190506105ef853085610763565b60408051634538c4eb60e01b81523060048201526001600160a01b038681166024830152915191841691634538c4eb91604480820192602092909190829003018186803b15801561063f57600080fd5b505afa158015610653573d6000803e3d6000fd5b505050506040513d602081101561066957600080fd5b50516106e057816001600160a01b031663a3b22fc4856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b1580156106c757600080fd5b505af11580156106db573d6000803e3d6000fd5b505050505b836001600160a01b031663049878f382610706866b033b2e3c9fd0803ce8000000610cad565b8161070d57fe5b046040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561074457600080fd5b505af1158015610758573d6000803e3d6000fd5b505050505050505050565b826001600160a01b031663f4b9fa756040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561079e57600080fd5b505af11580156107b2573d6000803e3d6000fd5b505050506040513d60208110156107c857600080fd5b5051604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd9160648082019260009290919082900301818387803b15801561082057600080fd5b505af1158015610834573d6000803e3d6000fd5b50505050826001600160a01b031663f4b9fa756040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561087357600080fd5b505af1158015610887573d6000803e3d6000fd5b505050506040513d602081101561089d57600080fd5b50516040805163095ea7b360e01b81526001600160a01b038681166004830152602482018590529151919092169163095ea7b391604480830192600092919082900301818387803b1580156108f157600080fd5b505af1158015610905573d6000803e3d6000fd5b50505050826001600160a01b0316633b4da69f83836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561096957600080fd5b505af115801561097d573d6000803e3d6000fd5b50505050505050565b6000826001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156109c357600080fd5b505af11580156109d7573d6000803e3d6000fd5b505050506040513d60208110156109ed57600080fd5b505160408051634fb3c66560e11b815290519192506000916001600160a01b03851691639f678cca91600480830192602092919082900301818787803b158015610a3657600080fd5b505af1158015610a4a573d6000803e3d6000fd5b505050506040513d6020811015610a6057600080fd5b5051604080516305f5d64360e11b815230600482015290519192506000916001600160a01b03861691630bebac86916024808301926020929190829003018186803b158015610aae57600080fd5b505afa158015610ac2573d6000803e3d6000fd5b505050506040513d6020811015610ad857600080fd5b505160408051637f8661a160e01b81526004810183905290519192506001600160a01b03861691637f8661a19160248082019260009290919082900301818387803b158015610b2657600080fd5b505af1158015610b3a573d6000803e3d6000fd5b505060408051634538c4eb60e01b81523060048201526001600160a01b03898116602483015291519187169350634538c4eb9250604480820192602092909190829003018186803b158015610b8e57600080fd5b505afa158015610ba2573d6000803e3d6000fd5b505050506040513d6020811015610bb857600080fd5b5051610c2f57826001600160a01b031663a3b22fc4866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015610c1657600080fd5b505af1158015610c2a573d6000803e3d6000fd5b505050505b846001600160a01b031663ef693bed336b033b2e3c9fd0803ce8000000610c568686610cad565b81610c5d57fe5b046040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561074457600080fd5b6000811580610cc857505080820282828281610cc557fe5b04145b610d08576040805162461bcd60e51b815260206004820152600c60248201526b6d756c2d6f766572666c6f7760a01b604482015290519081900360640190fd5b9291505056fea265627a7a723158208daa8c5490010fc092c27522739e2580fad4632b46242cae43aa034a54436b8364736f6c634300050c0032

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806371006c09146100515780639f6c3dbd14610089578063c56167c6146100bf578063c77843b3146100f5575b600080fd5b6100876004803603606081101561006757600080fd5b506001600160a01b03813581169160208101359091169060400135610123565b005b6100876004803603606081101561009f57600080fd5b506001600160a01b03813581169160208101359091169060400135610506565b610087600480360360608110156100d557600080fd5b506001600160a01b03813581169160208101359091169060400135610763565b6100876004803603604081101561010b57600080fd5b506001600160a01b0381358116916020013516610986565b6000836001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561016057600080fd5b505af1158015610174573d6000803e3d6000fd5b505050506040513d602081101561018a57600080fd5b505160408051634fb3c66560e11b815290519192506000916001600160a01b03861691639f678cca91600480830192602092919082900301818787803b1580156101d357600080fd5b505af11580156101e7573d6000803e3d6000fd5b505050506040513d60208110156101fd57600080fd5b5051905060008161021a856b033b2e3c9fd0803ce8000000610cad565b8161022157fe5b049050846001600160a01b0316637f8661a1826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561026a57600080fd5b505af115801561027e573d6000803e3d6000fd5b505050506000866001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156102bf57600080fd5b505af11580156102d3573d6000803e3d6000fd5b505050506040513d60208110156102e957600080fd5b505160408051633612d9a360e11b815230600482015290516001600160a01b0390921691636c25b34691602480820192602092909190829003018186803b15801561033357600080fd5b505afa158015610347573d6000803e3d6000fd5b505050506040513d602081101561035d57600080fd5b505160408051634538c4eb60e01b81523060048201526001600160a01b038a81166024830152915192935090861691634538c4eb91604480820192602092909190829003018186803b1580156103b257600080fd5b505afa1580156103c6573d6000803e3d6000fd5b505050506040513d60208110156103dc57600080fd5b505161045357836001600160a01b031663a3b22fc4886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561043a57600080fd5b505af115801561044e573d6000803e3d6000fd5b505050505b866001600160a01b031663ef693bed33610479886b033b2e3c9fd0803ce8000000610cad565b841015610494576b033b2e3c9fd0803ce80000008404610496565b875b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156104e557600080fd5b505af11580156104f9573d6000803e3d6000fd5b5050505050505050505050565b6000836001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561054357600080fd5b505af1158015610557573d6000803e3d6000fd5b505050506040513d602081101561056d57600080fd5b505160408051634fb3c66560e11b815290519192506000916001600160a01b03861691639f678cca91600480830192602092919082900301818787803b1580156105b657600080fd5b505af11580156105ca573d6000803e3d6000fd5b505050506040513d60208110156105e057600080fd5b505190506105ef853085610763565b60408051634538c4eb60e01b81523060048201526001600160a01b038681166024830152915191841691634538c4eb91604480820192602092909190829003018186803b15801561063f57600080fd5b505afa158015610653573d6000803e3d6000fd5b505050506040513d602081101561066957600080fd5b50516106e057816001600160a01b031663a3b22fc4856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b1580156106c757600080fd5b505af11580156106db573d6000803e3d6000fd5b505050505b836001600160a01b031663049878f382610706866b033b2e3c9fd0803ce8000000610cad565b8161070d57fe5b046040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561074457600080fd5b505af1158015610758573d6000803e3d6000fd5b505050505050505050565b826001600160a01b031663f4b9fa756040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561079e57600080fd5b505af11580156107b2573d6000803e3d6000fd5b505050506040513d60208110156107c857600080fd5b5051604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd9160648082019260009290919082900301818387803b15801561082057600080fd5b505af1158015610834573d6000803e3d6000fd5b50505050826001600160a01b031663f4b9fa756040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561087357600080fd5b505af1158015610887573d6000803e3d6000fd5b505050506040513d602081101561089d57600080fd5b50516040805163095ea7b360e01b81526001600160a01b038681166004830152602482018590529151919092169163095ea7b391604480830192600092919082900301818387803b1580156108f157600080fd5b505af1158015610905573d6000803e3d6000fd5b50505050826001600160a01b0316633b4da69f83836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561096957600080fd5b505af115801561097d573d6000803e3d6000fd5b50505050505050565b6000826001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156109c357600080fd5b505af11580156109d7573d6000803e3d6000fd5b505050506040513d60208110156109ed57600080fd5b505160408051634fb3c66560e11b815290519192506000916001600160a01b03851691639f678cca91600480830192602092919082900301818787803b158015610a3657600080fd5b505af1158015610a4a573d6000803e3d6000fd5b505050506040513d6020811015610a6057600080fd5b5051604080516305f5d64360e11b815230600482015290519192506000916001600160a01b03861691630bebac86916024808301926020929190829003018186803b158015610aae57600080fd5b505afa158015610ac2573d6000803e3d6000fd5b505050506040513d6020811015610ad857600080fd5b505160408051637f8661a160e01b81526004810183905290519192506001600160a01b03861691637f8661a19160248082019260009290919082900301818387803b158015610b2657600080fd5b505af1158015610b3a573d6000803e3d6000fd5b505060408051634538c4eb60e01b81523060048201526001600160a01b03898116602483015291519187169350634538c4eb9250604480820192602092909190829003018186803b158015610b8e57600080fd5b505afa158015610ba2573d6000803e3d6000fd5b505050506040513d6020811015610bb857600080fd5b5051610c2f57826001600160a01b031663a3b22fc4866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015610c1657600080fd5b505af1158015610c2a573d6000803e3d6000fd5b505050505b846001600160a01b031663ef693bed336b033b2e3c9fd0803ce8000000610c568686610cad565b81610c5d57fe5b046040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561074457600080fd5b6000811580610cc857505080820282828281610cc557fe5b04145b610d08576040805162461bcd60e51b815260206004820152600c60248201526b6d756c2d6f766572666c6f7760a01b604482015290519081900360640190fd5b9291505056fea265627a7a723158208daa8c5490010fc092c27522739e2580fad4632b46242cae43aa034a54436b8364736f6c634300050c0032

Deployed Bytecode Sourcemap

29600:2586:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29600:2586:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30347:1077;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;30347:1077:0;;;;;;;;;;;;;;;;;:::i;:::-;;29645:694;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;29645:694:0;;;;;;;;;;;;;;;;;:::i;3854:375::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3854:375:0;;;;;;;;;;;;;;;;;:::i;31432:751::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;31432:751:0;;;;;;;;;;:::i;30347:1077::-;30453:11;30479:7;-1:-1:-1;;;;;30467:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30467:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30467:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30467:26:0;30592:19;;;-1:-1:-1;;;30592:19:0;;;;30467:26;;-1:-1:-1;30581:8:0;;-1:-1:-1;;;;;30592:17:0;;;;;:19;;;;;30467:26;;30592:19;;;;;;;30581:8;30592:17;:19;;;5:2:-1;;;;30:1;27;20:12;5:2;30592:19:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30592:19:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30592:19:0;;-1:-1:-1;30703:8:0;30592:19;30714:13;30718:3;3639:8;30714:3;:13::i;:::-;:19;;;;;;30703:30;;30787:3;-1:-1:-1;;;;;30779:17:0;;30797:3;30779:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30779:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30779:22:0;;;;30887:8;30910:7;-1:-1:-1;;;;;30898:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30898:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30898:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30898:26:0;:45;;;-1:-1:-1;;;30898:45:0;;30937:4;30898:45;;;;;;-1:-1:-1;;;;;30898:30:0;;;;;;:45;;;;;:26;;:45;;;;;;;;:30;:45;;;5:2:-1;;;;30:1;27;20:12;5:2;30898:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30898:45:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30898:45:0;31029:40;;;-1:-1:-1;;;31029:40:0;;31045:4;31029:40;;;;-1:-1:-1;;;;;31029:40:0;;;;;;;;;30898:45;;-1:-1:-1;31029:7:0;;;;;;:40;;;;;30898:45;;31029:40;;;;;;;;:7;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;31029:40:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31029:40:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31029:40:0;31025:95;;31091:3;-1:-1:-1;;;;;31091:8:0;;31100:7;31091:17;;;;;;;;;;;;;-1:-1:-1;;;;;31091:17:0;-1:-1:-1;;;;;31091:17:0;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31091:17:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31091:17:0;;;;31025:95;31314:7;-1:-1:-1;;;;;31302:25:0;;31342:10;31374:13;31378:3;3639:8;31374:3;:13::i;:::-;31367:3;:20;;:38;;3639:8;31396:3;:9;31367:38;;;31390:3;31367:38;31302:114;;;;;;;;;;;;;-1:-1:-1;;;;;31302:114:0;-1:-1:-1;;;;;31302:114:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31302:114:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31302:114:0;;;;30347:1077;;;;;;;:::o;29645:694::-;29751:11;29777:7;-1:-1:-1;;;;;29765:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29765:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29765:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29765:26:0;29907:19;;;-1:-1:-1;;;29907:19:0;;;;29765:26;;-1:-1:-1;29896:8:0;;-1:-1:-1;;;;;29907:17:0;;;;;:19;;;;;29765:26;;29907:19;;;;;;;29896:8;29907:17;:19;;;5:2:-1;;;;30:1;27;20:12;5:2;29907:19:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29907:19:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29907:19:0;;-1:-1:-1;29985:41:0;29998:7;30015:4;30022:3;29985:12;:41::i;:::-;30122:36;;;-1:-1:-1;;;30122:36:0;;30138:4;30122:36;;;;-1:-1:-1;;;;;30122:36:0;;;;;;;;;:7;;;;;;:36;;;;;;;;;;;;;;;:7;:36;;;5:2:-1;;;;30:1;27;20:12;5:2;30122:36:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30122:36:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30122:36:0;30118:87;;30180:3;-1:-1:-1;;;;;30180:8:0;;30189:3;30180:13;;;;;;;;;;;;;-1:-1:-1;;;;;30180:13:0;-1:-1:-1;;;;;30180:13:0;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30180:13:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30180:13:0;;;;30118:87;30301:3;-1:-1:-1;;;;;30293:17:0;;30327:3;30311:13;30315:3;3639:8;30311:3;:13::i;:::-;:19;;;;;;30293:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30293:38:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30293:38:0;;;;29645:694;;;;;:::o;3854:375::-;3986:3;-1:-1:-1;;;;;3974:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3974:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3974:22:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3974:22:0;:67;;;-1:-1:-1;;;3974:67:0;;4010:10;3974:67;;;;4030:4;3974:67;;;;;;;;;;;;-1:-1:-1;;;;;3974:35:0;;;;;;:67;;;;;-1:-1:-1;;3974:67:0;;;;;;;;-1:-1:-1;3974:35:0;:67;;;5:2:-1;;;;30:1;27;20:12;5:2;3974:67:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3974:67:0;;;;4116:3;-1:-1:-1;;;;;4104:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4104:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4104:22:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4104:22:0;:40;;;-1:-1:-1;;;4104:40:0;;-1:-1:-1;;;;;4104:40:0;;;;;;;;;;;;;;;:30;;;;;;;:40;;;;;-1:-1:-1;;4104:40:0;;;;;;;-1:-1:-1;4104:30:0;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;4104:40:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4104:40:0;;;;4202:3;-1:-1:-1;;;;;4190:21:0;;4212:3;4217;4190:31;;;;;;;;;;;;;-1:-1:-1;;;;;4190:31:0;-1:-1:-1;;;;;4190:31:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4190:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4190:31:0;;;;3854:375;;;:::o;31432:751::-;31522:11;31548:7;-1:-1:-1;;;;;31536:24:0;;:26;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31536:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31536:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31536:26:0;31661:19;;;-1:-1:-1;;;31661:19:0;;;;31536:26;;-1:-1:-1;31650:8:0;;-1:-1:-1;;;;;31661:17:0;;;;;:19;;;;;31536:26;;31661:19;;;;;;;31650:8;31661:17;:19;;;5:2:-1;;;;30:1;27;20:12;5:2;31661:19:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31661:19:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31661:19:0;31764:31;;;-1:-1:-1;;;31764:31:0;;31789:4;31764:31;;;;;;31661:19;;-1:-1:-1;31753:8:0;;-1:-1:-1;;;;;31764:16:0;;;;;:31;;;;;31661:19;;31764:31;;;;;;;:16;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;31764:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31764:31:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31764:31:0;31841:22;;;-1:-1:-1;;;31841:22:0;;;;;;;;;;31764:31;;-1:-1:-1;;;;;;31841:17:0;;;;;:22;;;;;-1:-1:-1;;31841:22:0;;;;;;;;-1:-1:-1;31841:17:0;:22;;;5:2:-1;;;;30:1;27;20:12;5:2;31841:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;31949:40:0;;;-1:-1:-1;;;31949:40:0;;31965:4;31949:40;;;;-1:-1:-1;;;;;31949:40:0;;;;;;;;;:7;;;;-1:-1:-1;31949:7:0;;-1:-1:-1;31949:40:0;;;;;;;;;;;;;;;:7;:40;;;5:2:-1;;;;30:1;27;20:12;5:2;31949:40:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31949:40:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31949:40:0;31945:95;;32011:3;-1:-1:-1;;;;;32011:8:0;;32020:7;32011:17;;;;;;;;;;;;;-1:-1:-1;;;;;32011:17:0;-1:-1:-1;;;;;32011:17:0;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;32011:17:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;32011:17:0;;;;31945:95;32129:7;-1:-1:-1;;;;;32117:25:0;;32143:10;3639:8;32155:13;32159:3;32164;32155;:13::i;:::-;:19;;;;;;32117:58;;;;;;;;;;;;;-1:-1:-1;;;;;32117:58:0;-1:-1:-1;;;;;32117:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;3685:134:0;3737:6;3764;;;:30;;-1:-1:-1;;3779:5:0;;;3793:1;3788;3779:5;3788:1;3774:15;;;;;:20;3764:30;3756:55;;;;;-1:-1:-1;;;3756:55:0;;;;;;;;;;;;-1:-1:-1;;;3756:55:0;;;;;;;;;;;;;;;3685:134;;;;:::o

Swarm Source

bzzr://8daa8c5490010fc092c27522739e2580fad4632b46242cae43aa034a54436b83

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Sky (formerly Maker) enables users to get rewarded for non-custodial savings.

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.