Contract 0x37407f3178ffe07a6cf5c847f8f680fecf319fab 12

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x5d2c9f6cf209aca0dfd638295160f6a1be8e00a453de80e5d98c02d4b55db727Close With Depos...1912481372024-03-17 8:20:5611 days 2 hrs ago0x23dd73e6808c04543e10ee582a107999057556e9 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000062120.1
0xe39f8354a4caaf88ebc6f28521b7862df5ad2c89a4037ccbee9e2c75b7650f71Withdraw Collate...1903450922024-03-14 16:49:1313 days 18 hrs ago0xefc17ff5db1fbbf77304ab3423faab05baa21d8c IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000032130.1
0x229df0aa645303f78db4109b61b5ecb8283ff173267f72fd89854291f9fe1f13Withdraw Collate...1903449872024-03-14 16:48:4613 days 18 hrs ago0xefc17ff5db1fbbf77304ab3423faab05baa21d8c IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00003384 0.1
0x914e905f82b8f16d3d0c258bc8997babcb63b3ab4116c6010c144f860bdf72ddClose With Depos...1872711792024-03-05 7:55:0323 days 3 hrs ago0xafebe0bcc500e50e1644ed7fd44dc5f7a73527ee IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00024993 0.1
0xd71f1da96f943df3f07954b0146064381c9188b584faefdcf273e18954355195Withdraw Collate...1870771612024-03-04 17:35:3023 days 17 hrs ago0xefc17ff5db1fbbf77304ab3423faab05baa21d8c IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00031452 0.1
0x4c6a475174b12e496a42fd1c90c87ad74b2e665421d9c17a796c5b4eea074b23Withdraw Collate...1870770902024-03-04 17:35:1223 days 17 hrs ago0xefc17ff5db1fbbf77304ab3423faab05baa21d8c IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00031648 0.1
0x7a98cf379f3ebd498e733f7aa1289eb439853db80864635350d4080acdbb1703Withdraw Collate...1870769812024-03-04 17:34:4323 days 17 hrs ago0xefc17ff5db1fbbf77304ab3423faab05baa21d8c IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00031622 0.1
0xc95a14cea5ff6fe4e3191e331f56580cc137780d68e678e2bad9c6f485ad6759Close With Swap1810263882024-02-15 14:20:0241 days 20 hrs ago0xc48e307d6969ade25ea283abf64f83880667882a IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00020556 0.1
0xf23f7ab0b3f41e1d26daabd5f1d2cfe15b4944d3a2c53dbcd3243bc41410b8c1Close With Swap1810262272024-02-15 14:19:2141 days 20 hrs ago0xc48e307d6969ade25ea283abf64f83880667882a IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00025484 0.1
0x3912d7ce4e3d0382b578f5d5726cb4808c3bd5fcf9a30e8de8eb7883706e9198Close With Swap1787960962024-02-08 21:18:5548 days 13 hrs ago0xa4043ecc57b007ac0fdabb49aa5331d07a943edc IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00047711 0.1
0x6c7a244809c231605352b0c42183ac5c349436a049849decc634ef0727d4d84bWithdraw Collate...1758317932024-01-30 20:35:5957 days 14 hrs ago0xefc17ff5db1fbbf77304ab3423faab05baa21d8c IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00007812 0.1
0xe4d93e88bc684bb31e4e4bf1b7c7e64b1f677763aa5d8792fcd0609a21c1694aWithdraw Collate...1758311442024-01-30 20:33:0257 days 14 hrs ago0xefc17ff5db1fbbf77304ab3423faab05baa21d8c IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00007983 0.1
0xd15087704d4a93f55c604154d563791136b2b62e69393e771c6980a6c7d96d76Close With Depos...1748709472024-01-28 0:30:3560 days 10 hrs ago0x1b69c4a788ad8f940e624341ab45c731d01190de IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00009327 0.1
0x13172d093f28437c3d7f5d73f6eea131b4d3759e5ab4e2703944d975afb1e7d6Close With Depos...1668075632024-01-03 22:49:4584 days 12 hrs ago0x73a1d10446584a3ca75269300442c9744df0d751 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00022989 0.1
0x101255b27ebe4ce9e1529cdba73795229b925c028d5a66a13eaec3e0806cc9bfClose With Depos...1668006652024-01-03 22:19:2284 days 12 hrs ago0x4a2e8f0272f3c052af04e12ebb1ee94145b8a06f IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00013261 0.1
0x7b42bfbe5cdef0d21cb24f0682120509f53fb3065e2fad72bf2e6e8f256e482eClose With Depos...1667972322024-01-03 22:04:2884 days 13 hrs ago0xe680a722841d3e14760464fe8ec64abb8cf7d6fa IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00010607 0.1
0xd2aafe5d4a13cc604f0c0d7c65d67fb318b380ac13d447f2cda2bc0c091c3f60Close With Depos...1633024792023-12-24 15:10:2194 days 20 hrs ago0x23dd73e6808c04543e10ee582a107999057556e9 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000157570.1
0xd593c1473b990b7fd423ece6d98c9a994342193490dc63bc482d0c1c997889e2Close With Depos...1632060672023-12-24 8:21:2595 days 2 hrs ago0x23dd73e6808c04543e10ee582a107999057556e9 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000113010.1
0x9b837b8beb3dfbf100d13e6760555ea58deac2e8b2a6803b56a7c636d7130b69Close With Depos...1632057272023-12-24 8:20:0295 days 2 hrs ago0x23dd73e6808c04543e10ee582a107999057556e9 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000109890.1
0x63460aceb06c65563821c840e67346b20ce696a5130dfcdab66862884d8b19c5Close With Depos...1559838292023-12-01 22:57:52117 days 12 hrs ago0x4c36a46e4f054fbf09f6f643d6d1f40dcfaff1ae IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00014678 0.1
0x704be6de6a67973f772544a81a82f4b86240bbc37817e3ba36220754cca2db06Close With Depos...1559591642023-12-01 20:44:21117 days 14 hrs ago0x23dd73e6808c04543e10ee582a107999057556e9 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000234240.1
0xc5c519e91c017bedaf85e93994e35050f33bba8a200800bed3a4dc1e63032ce3Close With Swap1503534322023-11-14 14:31:22134 days 20 hrs ago0x0b018a79e7dc9786ab6163cc4156342a157373f2 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000324070.1
0xd11034fdc7501712d1662f38600e3c36465b462d2c01776f4ed2b3ab441a40f8Close With Depos...1499852332023-11-13 11:26:38135 days 23 hrs ago0xc48e307d6969ade25ea283abf64f83880667882a IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.00018656 0.1
0xd0c468353ba9868c6af212f8f270da90c0659f3d3c7924c07b2e6f529a2b4d09Close With Swap1497793162023-11-12 19:48:38136 days 15 hrs ago0x7f90c8bc0f469c504814f30eabe6dca92bb0a5c4 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000191790.1
0x2c5a09b36eee5c1d831766e67c69fcff143043bacf4163a197c95fc6075dfa3aClose With Swap1493071092023-11-11 8:52:40138 days 2 hrs ago0x9b90e8a81507b9ef6f6a260e2280b609f54ea7a5 IN  0x37407f3178ffe07a6cf5c847f8f680fecf319fab0 ETH0.000154470.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xc95a14cea5ff6fe4e3191e331f56580cc137780d68e678e2bad9c6f485ad67591810263882024-02-15 14:20:0241 days 20 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0xc48e307d6969ade25ea283abf64f83880667882a0.049393135925664429 ETH
0xc95a14cea5ff6fe4e3191e331f56580cc137780d68e678e2bad9c6f485ad67591810263882024-02-15 14:20:0241 days 20 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.049393135925664429 ETH
0xf23f7ab0b3f41e1d26daabd5f1d2cfe15b4944d3a2c53dbcd3243bc41410b8c11810262272024-02-15 14:19:2141 days 20 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0xc48e307d6969ade25ea283abf64f83880667882a0.072607633304253015 ETH
0xf23f7ab0b3f41e1d26daabd5f1d2cfe15b4944d3a2c53dbcd3243bc41410b8c11810262272024-02-15 14:19:2141 days 20 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.072607633304253015 ETH
0x3912d7ce4e3d0382b578f5d5726cb4808c3bd5fcf9a30e8de8eb7883706e91981787960962024-02-08 21:18:5548 days 13 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0xa4043ecc57b007ac0fdabb49aa5331d07a943edc0.353503694186464556 ETH
0x3912d7ce4e3d0382b578f5d5726cb4808c3bd5fcf9a30e8de8eb7883706e91981787960962024-02-08 21:18:5548 days 13 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.353503694186464556 ETH
0x63460aceb06c65563821c840e67346b20ce696a5130dfcdab66862884d8b19c51559838292023-12-01 22:57:52117 days 12 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x4c36a46e4f054fbf09f6f643d6d1f40dcfaff1ae2 ETH
0x63460aceb06c65563821c840e67346b20ce696a5130dfcdab66862884d8b19c51559838292023-12-01 22:57:52117 days 12 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab2 ETH
0xc5c519e91c017bedaf85e93994e35050f33bba8a200800bed3a4dc1e63032ce31503534322023-11-14 14:31:22134 days 20 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x0b018a79e7dc9786ab6163cc4156342a157373f20.000799289840409713 ETH
0xc5c519e91c017bedaf85e93994e35050f33bba8a200800bed3a4dc1e63032ce31503534322023-11-14 14:31:22134 days 20 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.000799289840409713 ETH
0xd0c468353ba9868c6af212f8f270da90c0659f3d3c7924c07b2e6f529a2b4d091497793162023-11-12 19:48:38136 days 15 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x7f90c8bc0f469c504814f30eabe6dca92bb0a5c40.000589208023719652 ETH
0xd0c468353ba9868c6af212f8f270da90c0659f3d3c7924c07b2e6f529a2b4d091497793162023-11-12 19:48:38136 days 15 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.000589208023719652 ETH
0x2c5a09b36eee5c1d831766e67c69fcff143043bacf4163a197c95fc6075dfa3a1493071092023-11-11 8:52:40138 days 2 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x9b90e8a81507b9ef6f6a260e2280b609f54ea7a50.000699370099231483 ETH
0x2c5a09b36eee5c1d831766e67c69fcff143043bacf4163a197c95fc6075dfa3a1493071092023-11-11 8:52:40138 days 2 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.000699370099231483 ETH
0x03fefdff096c68206254e5a725aa022c560dce6964983100a61f6e25263504991491558042023-11-10 21:49:16138 days 13 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x9581bdcb25f3ace3a0735eb254f72f8eeeef186a0.000632385046310565 ETH
0x03fefdff096c68206254e5a725aa022c560dce6964983100a61f6e25263504991491558042023-11-10 21:49:16138 days 13 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.000632385046310565 ETH
0x0f08927fea1daeb6f6a2eaca961d9f5ea824791fb62fbd741f268d42a142358f1481160172023-11-07 19:13:10141 days 16 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x9b90e8a81507b9ef6f6a260e2280b609f54ea7a50.0000294574436287 ETH
0x0f08927fea1daeb6f6a2eaca961d9f5ea824791fb62fbd741f268d42a142358f1481160172023-11-07 19:13:10141 days 16 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.0000294574436287 ETH
0x0d7d2d905a622f46db1cdb91e0f29e71f1829d0aee1f4916b4814ccc30553ecf1481056652023-11-07 18:28:15141 days 16 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x9581bdcb25f3ace3a0735eb254f72f8eeeef186a0.000198735753565633 ETH
0x0d7d2d905a622f46db1cdb91e0f29e71f1829d0aee1f4916b4814ccc30553ecf1481056652023-11-07 18:28:15141 days 16 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.000198735753565633 ETH
0x3cd5219b1bb5ee1465690cb586cd75bdcbf032ce1ccad91475b1e21256e59af21461886172023-11-01 22:25:58147 days 12 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0x880938f38b594b9c42b8eadaf8c8231f557e2b663.213305043042456518 ETH
0x3cd5219b1bb5ee1465690cb586cd75bdcbf032ce1ccad91475b1e21256e59af21461886172023-11-01 22:25:58147 days 12 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab3.213305043042456518 ETH
0x42ee50229604adf853fc92ad4e411286f48702192b61dd4954b816cf336be31b1394635312023-10-10 20:46:36169 days 14 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab 0x41eb15d64fdb684e07e11cf31f3642eebcd4f1f30.066643068401993807 ETH
0x42ee50229604adf853fc92ad4e411286f48702192b61dd4954b816cf336be31b1394635312023-10-10 20:46:36169 days 14 hrs ago Wrapped Ether 0x37407f3178ffe07a6cf5c847f8f680fecf319fab0.066643068401993807 ETH
0xc59d56757db36a9f9c04eb8662fa9f7d4a59d779c896b074240c356052759b5c1394057712023-10-10 16:22:56169 days 18 hrs ago 0x37407f3178ffe07a6cf5c847f8f680fecf319fab 0x41eb15d64fdb684e07e11cf31f3642eebcd4f1f30.082108311654652764 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
bZxProtocol

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 17 : Protocol.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;
pragma experimental ABIEncoderV2;

import "State.sol";


contract bZxProtocol is State {

    function()
        external
        payable
    {
        if (gasleft() <= 2300) {
            return;
        }

        address target = logicTargets[msg.sig];
        require(target != address(0), "target not active");

        bytes memory data = msg.data;
        assembly {
            let result := delegatecall(gas, target, add(data, 0x20), mload(data), 0, 0)
            let size := returndatasize
            let ptr := mload(0x40)
            returndatacopy(ptr, 0, size)
            switch result
            case 0 { revert(ptr, size) }
            default { return(ptr, size) }
        }
    }

    function replaceContract(
        address target)
        external
        onlyOwner
    {
        (bool success,) = target.delegatecall(abi.encodeWithSignature("initialize(address)", target));
        require(success, "setup failed");
    }

    function setTargets(
        string[] calldata sigsArr,
        address[] calldata targetsArr)
        external
        onlyOwner
    {
        require(sigsArr.length == targetsArr.length, "count mismatch");

        for (uint256 i = 0; i < sigsArr.length; i++) {
            _setTarget(bytes4(keccak256(abi.encodePacked(sigsArr[i]))), targetsArr[i]);
        }
    }

    function getTarget(
        string calldata sig)
        external
        view
        returns (address)
    {
        return logicTargets[bytes4(keccak256(abi.encodePacked(sig)))];
    }
}

File 2 of 17 : State.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;


import "Constants.sol";
import "Objects.sol";
import "EnumerableBytes32Set.sol";
import "ReentrancyGuard.sol";
import "Ownable.sol";
import "SafeMath.sol";


contract State is Constants, Objects, ReentrancyGuard, Ownable {
    using SafeMath for uint256;
    using EnumerableBytes32Set for EnumerableBytes32Set.Bytes32Set;

    address public priceFeeds;                                                              // handles asset reference price lookups
    address public swapsImpl;                                                               // handles asset swaps using dex liquidity

    mapping (bytes4 => address) public logicTargets;                                        // implementations of protocol functions

    mapping (bytes32 => Loan) public loans;                                                 // loanId => Loan
    mapping (bytes32 => LoanParams) public loanParams;                                      // loanParamsId => LoanParams

    mapping (address => mapping (bytes32 => Order)) public lenderOrders;                    // lender => orderParamsId => Order
    mapping (address => mapping (bytes32 => Order)) public borrowerOrders;                  // borrower => orderParamsId => Order

    mapping (bytes32 => mapping (address => bool)) public delegatedManagers;                // loanId => delegated => approved

    // Interest
    mapping (address => mapping (address => LenderInterest)) public lenderInterest;         // lender => loanToken => LenderInterest object
    mapping (bytes32 => LoanInterest) public loanInterest;                                  // loanId => LoanInterest object

    // Internals
    EnumerableBytes32Set.Bytes32Set internal logicTargetsSet;                               // implementations set
    EnumerableBytes32Set.Bytes32Set internal activeLoansSet;                                // active loans set

    mapping (address => EnumerableBytes32Set.Bytes32Set) internal lenderLoanSets;           // lender loans set
    mapping (address => EnumerableBytes32Set.Bytes32Set) internal borrowerLoanSets;         // borrow loans set
    mapping (address => EnumerableBytes32Set.Bytes32Set) internal userLoanParamSets;        // user loan params set

    address public feesController;                                                          // address controlling fee withdrawals

    uint256 public lendingFeePercent = 10 ether; // 10% fee                                 // fee taken from lender interest payments
    mapping (address => uint256) public lendingFeeTokensHeld;                               // total interest fees received and not withdrawn per asset
    mapping (address => uint256) public lendingFeeTokensPaid;                               // total interest fees withdraw per asset (lifetime fees = lendingFeeTokensHeld + lendingFeeTokensPaid)

    uint256 public tradingFeePercent = 0.15 ether; // 0.15% fee                             // fee paid for each trade
    mapping (address => uint256) public tradingFeeTokensHeld;                               // total trading fees received and not withdrawn per asset
    mapping (address => uint256) public tradingFeeTokensPaid;                               // total trading fees withdraw per asset (lifetime fees = tradingFeeTokensHeld + tradingFeeTokensPaid)

    uint256 public borrowingFeePercent = 0.09 ether; // 0.09% fee                           // origination fee paid for each loan
    mapping (address => uint256) public borrowingFeeTokensHeld;                             // total borrowing fees received and not withdrawn per asset
    mapping (address => uint256) public borrowingFeeTokensPaid;                             // total borrowing fees withdraw per asset (lifetime fees = borrowingFeeTokensHeld + borrowingFeeTokensPaid)

    uint256 public protocolTokenHeld;                                                       // current protocol token deposit balance
    uint256 public protocolTokenPaid;                                                       // lifetime total payout of protocol token

    uint256 public affiliateFeePercent = 30 ether; // 30% fee share                         // fee share for affiliate program

    mapping (address => mapping (address => uint256)) public liquidationIncentivePercent;   // percent discount on collateral for liquidators per loanToken and collateralToken

    mapping (address => address) public loanPoolToUnderlying;                               // loanPool => underlying
    mapping (address => address) public underlyingToLoanPool;                               // underlying => loanPool
    EnumerableBytes32Set.Bytes32Set internal loanPoolsSet;                                  // loan pools set

    mapping (address => bool) public supportedTokens;                                       // supported tokens for swaps

    uint256 public maxDisagreement = 5 ether;                                               // % disagreement between swap rate and reference rate

    uint256 public sourceBufferPercent = 5 ether;                                           // used to estimate kyber swap source amount

    uint256 public maxSwapSize = 1500 ether;                                                // maximum supported swap size in ETH


    function _setTarget(
        bytes4 sig,
        address target)
        internal
    {
        logicTargets[sig] = target;

        if (target != address(0)) {
            logicTargetsSet.addBytes32(bytes32(sig));
        } else {
            logicTargetsSet.removeBytes32(bytes32(sig));
        }
    }
}

File 3 of 17 : Constants.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;

import "IWethERC20.sol";


contract Constants {

    uint256 internal constant WEI_PRECISION = 10**18;
    uint256 internal constant WEI_PERCENT_PRECISION = 10**20;

    uint256 internal constant DAYS_IN_A_YEAR = 365;
    uint256 internal constant ONE_MONTH = 2628000; // approx. seconds in a month

    string internal constant UserRewardsID = "UserRewards";
    string internal constant LoanDepositValueID = "LoanDepositValue";

    IWethERC20 public constant wethToken = IWethERC20(0x82aF49447D8a07e3bd95BD0d56f35241523fBab1); // arbitrum
    address public constant bzrxTokenAddress = address(0); // arbitrum
    address public constant vbzrxTokenAddress = address(0); // arbitrum
}

File 4 of 17 : IWethERC20.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity >=0.5.0 <0.6.0;

import "IWeth.sol";
import "IERC20.sol";


contract IWethERC20 is IWeth, IERC20 {}

File 5 of 17 : IWeth.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity >=0.5.0 <0.6.0;


interface IWeth {
    function deposit() external payable;
    function withdraw(uint256 wad) external;
}

File 6 of 17 : IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 7 of 17 : Objects.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;

import "LoanStruct.sol";
import "LoanParamsStruct.sol";
import "OrderStruct.sol";
import "LenderInterestStruct.sol";
import "LoanInterestStruct.sol";


contract Objects is
    LoanStruct,
    LoanParamsStruct,
    OrderStruct,
    LenderInterestStruct,
    LoanInterestStruct
{}

File 8 of 17 : LoanStruct.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;


contract LoanStruct {
    struct Loan {
        bytes32 id;                 // id of the loan
        bytes32 loanParamsId;       // the linked loan params id
        bytes32 pendingTradesId;    // the linked pending trades id
        uint256 principal;          // total borrowed amount outstanding
        uint256 collateral;         // total collateral escrowed for the loan
        uint256 startTimestamp;     // loan start time
        uint256 endTimestamp;       // for active loans, this is the expected loan end time, for in-active loans, is the actual (past) end time
        uint256 startMargin;        // initial margin when the loan opened
        uint256 startRate;          // reference rate when the loan opened for converting collateralToken to loanToken
        address borrower;           // borrower of this loan
        address lender;             // lender of this loan
        bool active;                // if false, the loan has been fully closed
    }
}

File 9 of 17 : LoanParamsStruct.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;


contract LoanParamsStruct {
    struct LoanParams {
        bytes32 id;                 // id of loan params object
        bool active;                // if false, this object has been disabled by the owner and can't be used for future loans
        address owner;              // owner of this object
        address loanToken;          // the token being loaned
        address collateralToken;    // the required collateral token
        uint256 minInitialMargin;   // the minimum allowed initial margin
        uint256 maintenanceMargin;  // an unhealthy loan when current margin is at or below this value
        uint256 maxLoanTerm;        // the maximum term for new loans (0 means there's no max term)
    }
}

File 10 of 17 : OrderStruct.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;


contract OrderStruct {
    struct Order {
        uint256 lockedAmount;           // escrowed amount waiting for a counterparty
        uint256 interestRate;           // interest rate defined by the creator of this order
        uint256 minLoanTerm;            // minimum loan term allowed
        uint256 maxLoanTerm;            // maximum loan term allowed
        uint256 createdTimestamp;       // timestamp when this order was created
        uint256 expirationTimestamp;    // timestamp when this order expires
    }
}

File 11 of 17 : LenderInterestStruct.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;


contract LenderInterestStruct {
    struct LenderInterest {
        uint256 principalTotal;     // total borrowed amount outstanding of asset
        uint256 owedPerDay;         // interest owed per day for all loans of asset
        uint256 owedTotal;          // total interest owed for all loans of asset (assuming they go to full term)
        uint256 paidTotal;          // total interest paid so far for asset
        uint256 updatedTimestamp;   // last update
    }
}

File 12 of 17 : LoanInterestStruct.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;


contract LoanInterestStruct {
    struct LoanInterest {
        uint256 owedPerDay;         // interest owed per day for loan
        uint256 depositTotal;       // total escrowed interest for loan
        uint256 updatedTimestamp;   // last update
    }
}

File 13 of 17 : EnumerableBytes32Set.sol
/**
 * Copyright 2017-2021, bZxDao. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0.
 */

pragma solidity 0.5.17;

/**
 * @dev Library for managing loan sets
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * Include with `using EnumerableBytes32Set for EnumerableBytes32Set.Bytes32Set;`.
 *
 */
library EnumerableBytes32Set {

    struct Bytes32Set {
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) index;
        bytes32[] values;
    }

    /**
     * @dev Add an address value to a set. O(1).
     * Returns false if the value was already in the set.
     */
    function addAddress(Bytes32Set storage set, address addrvalue)
        internal
        returns (bool)
    {
        bytes32 value;
        assembly {
            value := addrvalue
        }
        return addBytes32(set, value);
    }

    /**
     * @dev Add a value to a set. O(1).
     * Returns false if the value was already in the set.
     */
    function addBytes32(Bytes32Set storage set, bytes32 value)
        internal
        returns (bool)
    {
        if (!contains(set, value)){
            set.index[value] = set.values.push(value);
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes an address value from a set. O(1).
     * Returns false if the value was not present in the set.
     */
    function removeAddress(Bytes32Set storage set, address addrvalue)
        internal
        returns (bool)
    {
        bytes32 value;
        assembly {
            value := addrvalue
        }
        return removeBytes32(set, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     * Returns false if the value was not present in the set.
     */
    function removeBytes32(Bytes32Set storage set, bytes32 value)
        internal
        returns (bool)
    {
        if (contains(set, value)){
            uint256 toDeleteIndex = set.index[value] - 1;
            uint256 lastIndex = set.values.length - 1;

            // If the element we're deleting is the last one, we can just remove it without doing a swap
            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set.values[lastIndex];

                // Move the last value to the index where the deleted value is
                set.values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set.index[lastValue] = toDeleteIndex + 1; // All indexes are 1-based
            }

            // Delete the index entry for the deleted value
            delete set.index[value];

            // Delete the old entry for the moved value
            set.values.pop();

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value)
        internal
        view
        returns (bool)
    {
        return set.index[value] != 0;
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function containsAddress(Bytes32Set storage set, address addrvalue)
        internal
        view
        returns (bool)
    {
        bytes32 value;
        assembly {
            value := addrvalue
        }
        return set.index[value] != 0;
    }

    /**
     * @dev Returns an array with all values in the set. O(N).
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.

     * WARNING: This function may run out of gas on large sets: use {length} and
     * {get} instead in these cases.
     */
    function enumerate(Bytes32Set storage set, uint256 start, uint256 count)
        internal
        view
        returns (bytes32[] memory output)
    {
        uint256 end = start + count;
        require(end >= start, "addition overflow");
        end = set.values.length < end ? set.values.length : end;
        if (end == 0 || start >= end) {
            return output;
        }

        output = new bytes32[](end-start);
        for (uint256 i = start; i < end; i++) {
            output[i-start] = set.values[i];
        }
        return output;
    }

    /**
     * @dev Returns the number of elements on the set. O(1).
     */
    function length(Bytes32Set storage set)
        internal
        view
        returns (uint256)
    {
        return set.values.length;
    }

   /** @dev Returns the element stored at position `index` in the set. O(1).
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function get(Bytes32Set storage set, uint256 index)
        internal
        view
        returns (bytes32)
    {
        return set.values[index];
    }

   /** @dev Returns the element stored at position `index` in the set. O(1).
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function getAddress(Bytes32Set storage set, uint256 index)
        internal
        view
        returns (address)
    {
        bytes32 value = set.values[index];
        address addrvalue;
        assembly {
            addrvalue := value
        }
        return addrvalue;
    }
}

File 14 of 17 : ReentrancyGuard.sol
pragma solidity >=0.5.0 <0.6.0;


/**
 * @title Helps contracts guard against reentrancy attacks.
 * @author Remco Bloemen <remco@2Ï€.com>, Eenae <[email protected]>
 * @dev If you mark a function `nonReentrant`, you should also
 * mark it `external`.
 */
contract ReentrancyGuard {

    /// @dev Constant for unlocked guard state - non-zero to prevent extra gas costs.
    /// See: https://github.com/OpenZeppelin/openzeppelin-solidity/issues/1056
    uint256 internal constant REENTRANCY_GUARD_FREE = 1;

    /// @dev Constant for locked guard state
    uint256 internal constant REENTRANCY_GUARD_LOCKED = 2;

    /**
    * @dev We use a single lock for the whole contract.
    */
    uint256 internal reentrancyLock = REENTRANCY_GUARD_FREE;

    /**
    * @dev Prevents a contract from calling itself, directly or indirectly.
    * If you mark a function `nonReentrant`, you should also
    * mark it `external`. Calling one `nonReentrant` function from
    * another is not supported. Instead, you can implement a
    * `private` function doing the actual work, and an `external`
    * wrapper marked as `nonReentrant`.
    */
    modifier nonReentrant() {
        require(reentrancyLock == REENTRANCY_GUARD_FREE, "nonReentrant");
        reentrancyLock = REENTRANCY_GUARD_LOCKED;
        _;
        reentrancyLock = REENTRANCY_GUARD_FREE;
    }

}

File 15 of 17 : Ownable.sol
pragma solidity ^0.5.0;

import "Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 16 of 17 : Context.sol
pragma solidity ^0.5.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 17 of 17 : SafeMath.sol
pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"affiliateFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"borrowerOrders","outputs":[{"internalType":"uint256","name":"lockedAmount","type":"uint256"},{"internalType":"uint256","name":"interestRate","type":"uint256"},{"internalType":"uint256","name":"minLoanTerm","type":"uint256"},{"internalType":"uint256","name":"maxLoanTerm","type":"uint256"},{"internalType":"uint256","name":"createdTimestamp","type":"uint256"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowingFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"borrowingFeeTokensHeld","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"borrowingFeeTokensPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bzrxTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"delegatedManagers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feesController","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"sig","type":"string"}],"name":"getTarget","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"lenderInterest","outputs":[{"internalType":"uint256","name":"principalTotal","type":"uint256"},{"internalType":"uint256","name":"owedPerDay","type":"uint256"},{"internalType":"uint256","name":"owedTotal","type":"uint256"},{"internalType":"uint256","name":"paidTotal","type":"uint256"},{"internalType":"uint256","name":"updatedTimestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"lenderOrders","outputs":[{"internalType":"uint256","name":"lockedAmount","type":"uint256"},{"internalType":"uint256","name":"interestRate","type":"uint256"},{"internalType":"uint256","name":"minLoanTerm","type":"uint256"},{"internalType":"uint256","name":"maxLoanTerm","type":"uint256"},{"internalType":"uint256","name":"createdTimestamp","type":"uint256"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lendingFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lendingFeeTokensHeld","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lendingFeeTokensPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"liquidationIncentivePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"loanInterest","outputs":[{"internalType":"uint256","name":"owedPerDay","type":"uint256"},{"internalType":"uint256","name":"depositTotal","type":"uint256"},{"internalType":"uint256","name":"updatedTimestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"loanParams","outputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"loanToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"uint256","name":"minInitialMargin","type":"uint256"},{"internalType":"uint256","name":"maintenanceMargin","type":"uint256"},{"internalType":"uint256","name":"maxLoanTerm","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"loanPoolToUnderlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"loans","outputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"bytes32","name":"loanParamsId","type":"bytes32"},{"internalType":"bytes32","name":"pendingTradesId","type":"bytes32"},{"internalType":"uint256","name":"principal","type":"uint256"},{"internalType":"uint256","name":"collateral","type":"uint256"},{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"endTimestamp","type":"uint256"},{"internalType":"uint256","name":"startMargin","type":"uint256"},{"internalType":"uint256","name":"startRate","type":"uint256"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"address","name":"lender","type":"address"},{"internalType":"bool","name":"active","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"logicTargets","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxDisagreement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxSwapSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceFeeds","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"protocolTokenHeld","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"protocolTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"replaceContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string[]","name":"sigsArr","type":"string[]"},{"internalType":"address[]","name":"targetsArr","type":"address[]"}],"name":"setTargets","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sourceBufferPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"swapsImpl","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradingFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tradingFeeTokensHeld","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tradingFeeTokensPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"underlyingToLoanPool","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vbzrxTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wethToken","outputs":[{"internalType":"contract IWethERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

60806040526001600055678ac7230489e80000601455670214e8348c4f000060175567013fbe85edc90000601a556801a055690d9db80000601f55674563918244f40000602655674563918244f40000602755685150ae84a8cdf00000602855600061006f6100c260201b60201c565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100c6565b3390565b611761806100d56000396000f3fe60806040526004361061023b5760003560e01c80637a8faeb81161012e578063c4a90815116100ab578063e8f627641161006f578063e8f627641461072a578063edab119f1461073f578063f27451ac14610754578063f2fde38b14610774578063fb08fdaa146107945761023b565b8063c4a9081514610669578063cb6eacd1146106a1578063d473c2da146106d5578063d485045e146106ea578063da1b620b1461070a5761023b565b8063a012d827116100f2578063a012d827146105f4578063ab2c9d75146103f3578063ae0a853014610614578063b30643d914610629578063b7e15241146106495761023b565b80637a8faeb8146105755780638da5cb5b1461058a5780638dc48ba51461059f5780638f32d59b146105bf57806392d894f8146105d45761023b565b80634699f846116101bc57806368c4ac261161018057806368c4ac2614610501578063691bfee814610521578063715018a6146105365780637420ca3e1461054b57806378d849ed146105605761023b565b80634699f846146104555780634b57b0be1461046a5780634f28cac21461048c578063569fc1fb146104a157806362fff3f6146104d05761023b565b80633432423c116102035780633432423c146103b35780633452d2d4146103d357806339cd381e146103f35780634115a2b6146104085780634203e395146104355761023b565b8063065d810f146102f457806317548b791461032f578063218b39c61461035c5780632a3240271461037c5780632f4707641461039e575b6108fc5a11610249576102f2565b600080356001600160e01b0319168152600460205260409020546001600160a01b0316806102925760405162461bcd60e51b815260040161028990611547565b60405180910390fd5b60606000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509384935091505060208401855af43d604051816000823e8280156102ee578282f35b8282fd5b005b34801561030057600080fd5b5061031461030f36600461111e565b6107b4565b60405161032696959493929190611619565b60405180910390f35b34801561033b57600080fd5b5061034f61034a3660046111fb565b6107f4565b60405161032691906113f3565b34801561036857600080fd5b5061034f6103773660046110be565b61080f565b34801561038857600080fd5b5061039161082a565b6040516103269190611597565b3480156103aa57600080fd5b50610391610830565b3480156103bf57600080fd5b506103146103ce36600461111e565b610836565b3480156103df57600080fd5b506103916103ee3660046110be565b610876565b3480156103ff57600080fd5b5061034f610888565b34801561041457600080fd5b506104286104233660046111dc565b61088d565b6040516103269190611401565b34801561044157600080fd5b506103916104503660046110be565b6108ad565b34801561046157600080fd5b506103916108bf565b34801561047657600080fd5b5061047f6108c5565b6040516103269190611539565b34801561049857600080fd5b506103916108dd565b3480156104ad57600080fd5b506104c16104bc3660046111be565b6108e3565b604051610326939291906115a5565b3480156104dc57600080fd5b506104f06104eb3660046110e4565b610904565b6040516103269594939291906115cd565b34801561050d57600080fd5b5061042861051c3660046110be565b61093e565b34801561052d57600080fd5b50610391610953565b34801561054257600080fd5b506102f2610959565b34801561055757600080fd5b5061034f6109c7565b34801561056c57600080fd5b5061034f6109d6565b34801561058157600080fd5b506103916109e5565b34801561059657600080fd5b5061034f6109eb565b3480156105ab57600080fd5b5061034f6105ba3660046110be565b6109fa565b3480156105cb57600080fd5b50610428610a15565b3480156105e057600080fd5b506103916105ef3660046110be565b610a3b565b34801561060057600080fd5b506102f261060f36600461114e565b610a4d565b34801561062057600080fd5b50610391610b51565b34801561063557600080fd5b506103916106443660046110be565b610b57565b34801561065557600080fd5b506103916106643660046110be565b610b69565b34801561067557600080fd5b506106896106843660046111be565b610b7b565b6040516103269c9b9a99989796959493929190611486565b3480156106ad57600080fd5b506106c16106bc3660046111be565b610bee565b60405161032698979695949392919061140f565b3480156106e157600080fd5b50610391610c45565b3480156106f657600080fd5b506103916107053660046110be565b610c4b565b34801561071657600080fd5b5061034f610725366004611219565b610c5d565b34801561073657600080fd5b5061034f610cb8565b34801561074b57600080fd5b50610391610cc7565b34801561076057600080fd5b5061039161076f3660046110e4565b610ccd565b34801561078057600080fd5b506102f261078f3660046110be565b610ce8565b3480156107a057600080fd5b506102f26107af3660046110be565b610d18565b6008602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b6004602052600090815260409020546001600160a01b031681565b6022602052600090815260409020546001600160a01b031681565b60175481565b601e5481565b6007602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b60196020526000908152604090205481565b600081565b600960209081526000928352604080842090915290825290205460ff1681565b60156020526000908152604090205481565b60145481565b7382af49447d8a07e3bd95bd0d56f35241523fbab181565b60285481565b600b6020526000908152604090208054600182015460029092015490919083565b600a602090815260009283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b60256020526000908152604090205460ff1681565b60275481565b610961610a15565b61097d5760405162461bcd60e51b815260040161028990611577565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6003546001600160a01b031681565b6002546001600160a01b031681565b601d5481565b6001546001600160a01b031690565b6021602052600090815260409020546001600160a01b031681565b6001546000906001600160a01b0316610a2c610df3565b6001600160a01b031614905090565b60166020526000908152604090205481565b610a55610a15565b610a715760405162461bcd60e51b815260040161028990611577565b828114610a905760405162461bcd60e51b815260040161028990611567565b60005b83811015610b4a57610b42858583818110610aaa57fe5b602002820190508035601e1936849003018112610ac657600080fd5b9091016020810191503567ffffffffffffffff811115610ae557600080fd5b36819003821315610af557600080fd5b604051602001610b069291906113e6565b60405160208183030381529060405280519060200120848484818110610b2857fe5b9050602002016020610b3d91908101906110be565b610df7565b600101610a93565b5050505050565b601f5481565b601c6020526000908152604090205481565b601b6020526000908152604090205481565b600560208190526000918252604090912080546001820154600283015460038401546004850154958501546006860154600787015460088801546009890154600a9099015497999698959794969593949293919290916001600160a01b039081169190811690600160a01b900460ff168c565b60066020819052600091825260409091208054600182015460028301546003840154600485015460058601549590960154939560ff8416956101009094046001600160a01b03908116959381169492169290919088565b60265481565b60186020526000908152604090205481565b6000600460008484604051602001610c769291906113e6565b60408051601f1981840301815291815281516020928301206001600160e01b03191683529082019290925201600020546001600160a01b031690505b92915050565b6013546001600160a01b031681565b601a5481565b60208080526000928352604080842090915290825290205481565b610cf0610a15565b610d0c5760405162461bcd60e51b815260040161028990611577565b610d1581610e72565b50565b610d20610a15565b610d3c5760405162461bcd60e51b815260040161028990611577565b6000816001600160a01b031682604051602401610d5991906113f3565b60408051601f198184030181529181526020820180516001600160e01b031663189acdbd60e31b17905251610d8e91906113d3565b600060405180830381855af49150503d8060008114610dc9576040519150601f19603f3d011682016040523d82523d6000602084013e610dce565b606091505b5050905080610def5760405162461bcd60e51b815260040161028990611587565b5050565b3390565b6001600160e01b03198216600090815260046020526040902080546001600160a01b0319166001600160a01b03831690811790915515610e5257610e4c600c6001600160e01b0319841663ffffffff610ef416565b50610def565b610e6d600c6001600160e01b0319841663ffffffff610f3c16565b505050565b6001600160a01b038116610e985760405162461bcd60e51b815260040161028990611557565b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610f008383610ffd565b610f345750600180830180548083018083556000928352602080842090920185905584835290859052604090912055610cb2565b506000610cb2565b6000610f488383610ffd565b15610f345760008281526020849052604090205460018401546000199182019101808214610fc0576000856001018281548110610f8157fe5b9060005260206000200154905080866001018481548110610f9e57fe5b6000918252602080832090910192909255918252869052604090206001830190555b60008481526020869052604081205560018501805480610fdc57fe5b60019003818190600052602060002001600090559055600192505050610cb2565b60009081526020919091526040902054151590565b8035610cb2816116f8565b60008083601f84011261102f57600080fd5b50813567ffffffffffffffff81111561104757600080fd5b60208301915083602082028301111561105f57600080fd5b9250929050565b8035610cb28161170c565b8035610cb281611715565b60008083601f84011261108e57600080fd5b50813567ffffffffffffffff8111156110a657600080fd5b60208301915083600182028301111561105f57600080fd5b6000602082840312156110d057600080fd5b60006110dc8484611012565b949350505050565b600080604083850312156110f757600080fd5b60006111038585611012565b925050602061111485828601611012565b9150509250929050565b6000806040838503121561113157600080fd5b600061113d8585611012565b925050602061111485828601611066565b6000806000806040858703121561116457600080fd5b843567ffffffffffffffff81111561117b57600080fd5b6111878782880161101d565b9450945050602085013567ffffffffffffffff8111156111a657600080fd5b6111b28782880161101d565b95989497509550505050565b6000602082840312156111d057600080fd5b60006110dc8484611066565b600080604083850312156111ef57600080fd5b60006111038585611066565b60006020828403121561120d57600080fd5b60006110dc8484611071565b6000806020838503121561122c57600080fd5b823567ffffffffffffffff81111561124357600080fd5b61124f8582860161107c565b92509250509250929050565b61126481611685565b82525050565b61126481611690565b61126481611695565b600061128782611673565b6112918185611677565b93506112a18185602086016116c8565b9290920192915050565b611264816116b1565b60006112c08385611677565b93506112cd8385846116bc565b50500190565b60006112e060118361167c565b70746172676574206e6f742061637469766560781b815260200192915050565b600061130d60268361167c565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015260400192915050565b6000611355600e8361167c565b6d0c6deeadce840dad2e6dac2e8c6d60931b815260200192915050565b600061137f60208361167c565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572815260200192915050565b60006113b8600c8361167c565b6b1cd95d1d5c0819985a5b195960a21b815260200192915050565b60006113df828461127c565b9392505050565b60006110dc8284866112b4565b60208101610cb2828461125b565b60208101610cb2828461126a565b610100810161141e828b611273565b61142b602083018a61126a565b611438604083018961125b565b611445606083018861125b565b611452608083018761125b565b61145f60a0830186611273565b61146c60c0830185611273565b61147960e0830184611273565b9998505050505050505050565b6101808101611495828f611273565b6114a2602083018e611273565b6114af604083018d611273565b6114bc606083018c611273565b6114c9608083018b611273565b6114d660a083018a611273565b6114e360c0830189611273565b6114f060e0830188611273565b6114fe610100830187611273565b61150c61012083018661125b565b61151a61014083018561125b565b61152861016083018461126a565b9d9c50505050505050505050505050565b60208101610cb282846112ab565b60208082528101610cb2816112d3565b60208082528101610cb281611300565b60208082528101610cb281611348565b60208082528101610cb281611372565b60208082528101610cb2816113ab565b60208101610cb28284611273565b606081016115b38286611273565b6115c06020830185611273565b6110dc6040830184611273565b60a081016115db8288611273565b6115e86020830187611273565b6115f56040830186611273565b6116026060830185611273565b61160f6080830184611273565b9695505050505050565b60c081016116278289611273565b6116346020830188611273565b6116416040830187611273565b61164e6060830186611273565b61165b6080830185611273565b61166860a0830184611273565b979650505050505050565b5190565b919050565b90815260200190565b6000610cb2826116a5565b151590565b90565b6001600160e01b03191690565b6001600160a01b031690565b6000610cb282611685565b82818337506000910152565b60005b838110156116e35781810151838201526020016116cb565b838111156116f2576000848401525b50505050565b61170181611685565b8114610d1557600080fd5b61170181611695565b6117018161169856fea365627a7a723158208c1080318a6ff7e88fe5c7b5ea2ea30b6e138ef3b8e9a847b42afc8cee229fa36c6578706572696d656e74616cf564736f6c63430005110040

Deployed Bytecode

0x60806040526004361061023b5760003560e01c80637a8faeb81161012e578063c4a90815116100ab578063e8f627641161006f578063e8f627641461072a578063edab119f1461073f578063f27451ac14610754578063f2fde38b14610774578063fb08fdaa146107945761023b565b8063c4a9081514610669578063cb6eacd1146106a1578063d473c2da146106d5578063d485045e146106ea578063da1b620b1461070a5761023b565b8063a012d827116100f2578063a012d827146105f4578063ab2c9d75146103f3578063ae0a853014610614578063b30643d914610629578063b7e15241146106495761023b565b80637a8faeb8146105755780638da5cb5b1461058a5780638dc48ba51461059f5780638f32d59b146105bf57806392d894f8146105d45761023b565b80634699f846116101bc57806368c4ac261161018057806368c4ac2614610501578063691bfee814610521578063715018a6146105365780637420ca3e1461054b57806378d849ed146105605761023b565b80634699f846146104555780634b57b0be1461046a5780634f28cac21461048c578063569fc1fb146104a157806362fff3f6146104d05761023b565b80633432423c116102035780633432423c146103b35780633452d2d4146103d357806339cd381e146103f35780634115a2b6146104085780634203e395146104355761023b565b8063065d810f146102f457806317548b791461032f578063218b39c61461035c5780632a3240271461037c5780632f4707641461039e575b6108fc5a11610249576102f2565b600080356001600160e01b0319168152600460205260409020546001600160a01b0316806102925760405162461bcd60e51b815260040161028990611547565b60405180910390fd5b60606000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525084519495509384935091505060208401855af43d604051816000823e8280156102ee578282f35b8282fd5b005b34801561030057600080fd5b5061031461030f36600461111e565b6107b4565b60405161032696959493929190611619565b60405180910390f35b34801561033b57600080fd5b5061034f61034a3660046111fb565b6107f4565b60405161032691906113f3565b34801561036857600080fd5b5061034f6103773660046110be565b61080f565b34801561038857600080fd5b5061039161082a565b6040516103269190611597565b3480156103aa57600080fd5b50610391610830565b3480156103bf57600080fd5b506103146103ce36600461111e565b610836565b3480156103df57600080fd5b506103916103ee3660046110be565b610876565b3480156103ff57600080fd5b5061034f610888565b34801561041457600080fd5b506104286104233660046111dc565b61088d565b6040516103269190611401565b34801561044157600080fd5b506103916104503660046110be565b6108ad565b34801561046157600080fd5b506103916108bf565b34801561047657600080fd5b5061047f6108c5565b6040516103269190611539565b34801561049857600080fd5b506103916108dd565b3480156104ad57600080fd5b506104c16104bc3660046111be565b6108e3565b604051610326939291906115a5565b3480156104dc57600080fd5b506104f06104eb3660046110e4565b610904565b6040516103269594939291906115cd565b34801561050d57600080fd5b5061042861051c3660046110be565b61093e565b34801561052d57600080fd5b50610391610953565b34801561054257600080fd5b506102f2610959565b34801561055757600080fd5b5061034f6109c7565b34801561056c57600080fd5b5061034f6109d6565b34801561058157600080fd5b506103916109e5565b34801561059657600080fd5b5061034f6109eb565b3480156105ab57600080fd5b5061034f6105ba3660046110be565b6109fa565b3480156105cb57600080fd5b50610428610a15565b3480156105e057600080fd5b506103916105ef3660046110be565b610a3b565b34801561060057600080fd5b506102f261060f36600461114e565b610a4d565b34801561062057600080fd5b50610391610b51565b34801561063557600080fd5b506103916106443660046110be565b610b57565b34801561065557600080fd5b506103916106643660046110be565b610b69565b34801561067557600080fd5b506106896106843660046111be565b610b7b565b6040516103269c9b9a99989796959493929190611486565b3480156106ad57600080fd5b506106c16106bc3660046111be565b610bee565b60405161032698979695949392919061140f565b3480156106e157600080fd5b50610391610c45565b3480156106f657600080fd5b506103916107053660046110be565b610c4b565b34801561071657600080fd5b5061034f610725366004611219565b610c5d565b34801561073657600080fd5b5061034f610cb8565b34801561074b57600080fd5b50610391610cc7565b34801561076057600080fd5b5061039161076f3660046110e4565b610ccd565b34801561078057600080fd5b506102f261078f3660046110be565b610ce8565b3480156107a057600080fd5b506102f26107af3660046110be565b610d18565b6008602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b6004602052600090815260409020546001600160a01b031681565b6022602052600090815260409020546001600160a01b031681565b60175481565b601e5481565b6007602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600590950154939492939192909186565b60196020526000908152604090205481565b600081565b600960209081526000928352604080842090915290825290205460ff1681565b60156020526000908152604090205481565b60145481565b7382af49447d8a07e3bd95bd0d56f35241523fbab181565b60285481565b600b6020526000908152604090208054600182015460029092015490919083565b600a602090815260009283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b60256020526000908152604090205460ff1681565b60275481565b610961610a15565b61097d5760405162461bcd60e51b815260040161028990611577565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6003546001600160a01b031681565b6002546001600160a01b031681565b601d5481565b6001546001600160a01b031690565b6021602052600090815260409020546001600160a01b031681565b6001546000906001600160a01b0316610a2c610df3565b6001600160a01b031614905090565b60166020526000908152604090205481565b610a55610a15565b610a715760405162461bcd60e51b815260040161028990611577565b828114610a905760405162461bcd60e51b815260040161028990611567565b60005b83811015610b4a57610b42858583818110610aaa57fe5b602002820190508035601e1936849003018112610ac657600080fd5b9091016020810191503567ffffffffffffffff811115610ae557600080fd5b36819003821315610af557600080fd5b604051602001610b069291906113e6565b60405160208183030381529060405280519060200120848484818110610b2857fe5b9050602002016020610b3d91908101906110be565b610df7565b600101610a93565b5050505050565b601f5481565b601c6020526000908152604090205481565b601b6020526000908152604090205481565b600560208190526000918252604090912080546001820154600283015460038401546004850154958501546006860154600787015460088801546009890154600a9099015497999698959794969593949293919290916001600160a01b039081169190811690600160a01b900460ff168c565b60066020819052600091825260409091208054600182015460028301546003840154600485015460058601549590960154939560ff8416956101009094046001600160a01b03908116959381169492169290919088565b60265481565b60186020526000908152604090205481565b6000600460008484604051602001610c769291906113e6565b60408051601f1981840301815291815281516020928301206001600160e01b03191683529082019290925201600020546001600160a01b031690505b92915050565b6013546001600160a01b031681565b601a5481565b60208080526000928352604080842090915290825290205481565b610cf0610a15565b610d0c5760405162461bcd60e51b815260040161028990611577565b610d1581610e72565b50565b610d20610a15565b610d3c5760405162461bcd60e51b815260040161028990611577565b6000816001600160a01b031682604051602401610d5991906113f3565b60408051601f198184030181529181526020820180516001600160e01b031663189acdbd60e31b17905251610d8e91906113d3565b600060405180830381855af49150503d8060008114610dc9576040519150601f19603f3d011682016040523d82523d6000602084013e610dce565b606091505b5050905080610def5760405162461bcd60e51b815260040161028990611587565b5050565b3390565b6001600160e01b03198216600090815260046020526040902080546001600160a01b0319166001600160a01b03831690811790915515610e5257610e4c600c6001600160e01b0319841663ffffffff610ef416565b50610def565b610e6d600c6001600160e01b0319841663ffffffff610f3c16565b505050565b6001600160a01b038116610e985760405162461bcd60e51b815260040161028990611557565b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000610f008383610ffd565b610f345750600180830180548083018083556000928352602080842090920185905584835290859052604090912055610cb2565b506000610cb2565b6000610f488383610ffd565b15610f345760008281526020849052604090205460018401546000199182019101808214610fc0576000856001018281548110610f8157fe5b9060005260206000200154905080866001018481548110610f9e57fe5b6000918252602080832090910192909255918252869052604090206001830190555b60008481526020869052604081205560018501805480610fdc57fe5b60019003818190600052602060002001600090559055600192505050610cb2565b60009081526020919091526040902054151590565b8035610cb2816116f8565b60008083601f84011261102f57600080fd5b50813567ffffffffffffffff81111561104757600080fd5b60208301915083602082028301111561105f57600080fd5b9250929050565b8035610cb28161170c565b8035610cb281611715565b60008083601f84011261108e57600080fd5b50813567ffffffffffffffff8111156110a657600080fd5b60208301915083600182028301111561105f57600080fd5b6000602082840312156110d057600080fd5b60006110dc8484611012565b949350505050565b600080604083850312156110f757600080fd5b60006111038585611012565b925050602061111485828601611012565b9150509250929050565b6000806040838503121561113157600080fd5b600061113d8585611012565b925050602061111485828601611066565b6000806000806040858703121561116457600080fd5b843567ffffffffffffffff81111561117b57600080fd5b6111878782880161101d565b9450945050602085013567ffffffffffffffff8111156111a657600080fd5b6111b28782880161101d565b95989497509550505050565b6000602082840312156111d057600080fd5b60006110dc8484611066565b600080604083850312156111ef57600080fd5b60006111038585611066565b60006020828403121561120d57600080fd5b60006110dc8484611071565b6000806020838503121561122c57600080fd5b823567ffffffffffffffff81111561124357600080fd5b61124f8582860161107c565b92509250509250929050565b61126481611685565b82525050565b61126481611690565b61126481611695565b600061128782611673565b6112918185611677565b93506112a18185602086016116c8565b9290920192915050565b611264816116b1565b60006112c08385611677565b93506112cd8385846116bc565b50500190565b60006112e060118361167c565b70746172676574206e6f742061637469766560781b815260200192915050565b600061130d60268361167c565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015260400192915050565b6000611355600e8361167c565b6d0c6deeadce840dad2e6dac2e8c6d60931b815260200192915050565b600061137f60208361167c565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572815260200192915050565b60006113b8600c8361167c565b6b1cd95d1d5c0819985a5b195960a21b815260200192915050565b60006113df828461127c565b9392505050565b60006110dc8284866112b4565b60208101610cb2828461125b565b60208101610cb2828461126a565b610100810161141e828b611273565b61142b602083018a61126a565b611438604083018961125b565b611445606083018861125b565b611452608083018761125b565b61145f60a0830186611273565b61146c60c0830185611273565b61147960e0830184611273565b9998505050505050505050565b6101808101611495828f611273565b6114a2602083018e611273565b6114af604083018d611273565b6114bc606083018c611273565b6114c9608083018b611273565b6114d660a083018a611273565b6114e360c0830189611273565b6114f060e0830188611273565b6114fe610100830187611273565b61150c61012083018661125b565b61151a61014083018561125b565b61152861016083018461126a565b9d9c50505050505050505050505050565b60208101610cb282846112ab565b60208082528101610cb2816112d3565b60208082528101610cb281611300565b60208082528101610cb281611348565b60208082528101610cb281611372565b60208082528101610cb2816113ab565b60208101610cb28284611273565b606081016115b38286611273565b6115c06020830185611273565b6110dc6040830184611273565b60a081016115db8288611273565b6115e86020830187611273565b6115f56040830186611273565b6116026060830185611273565b61160f6080830184611273565b9695505050505050565b60c081016116278289611273565b6116346020830188611273565b6116416040830187611273565b61164e6060830186611273565b61165b6080830185611273565b61166860a0830184611273565b979650505050505050565b5190565b919050565b90815260200190565b6000610cb2826116a5565b151590565b90565b6001600160e01b03191690565b6001600160a01b031690565b6000610cb282611685565b82818337506000910152565b60005b838110156116e35781810151838201526020016116cb565b838111156116f2576000848401525b50505050565b61170181611685565b8114610d1557600080fd5b61170181611695565b6117018161169856fea365627a7a723158208c1080318a6ff7e88fe5c7b5ea2ea30b6e138ef3b8e9a847b42afc8cee229fa36c6578706572696d656e74616cf564736f6c63430005110040

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.