ETH Price: $3,190.17 (+0.22%)
Gas: 3 Gwei

Contract

0x61b7379Fe7D3367969D7C37F644A7CE0643A7F68
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Goblin110193132020-10-09 5:10:061385 days ago1602220206IN
0x61b7379F...0643A7F68
0 ETH0.001758250
Set Params110139032020-10-08 8:35:401386 days ago1602146140IN
0x61b7379F...0643A7F68
0 ETH0.0018493361
Set Goblin110103142020-10-07 18:58:421387 days ago1602097122IN
0x61b7379F...0643A7F68
0 ETH0.0016101252
Set Goblin110095852020-10-07 16:11:061387 days ago1602087066IN
0x61b7379F...0643A7F68
0 ETH0.0075927690
Set Goblin110088802020-10-07 13:28:121387 days ago1602077292IN
0x61b7379F...0643A7F68
0 ETH0.0031214637
Set Goblin110088702020-10-07 13:26:011387 days ago1602077161IN
0x61b7379F...0643A7F68
0 ETH0.0031214637
Set Goblin110088692020-10-07 13:25:591387 days ago1602077159IN
0x61b7379F...0643A7F68
0 ETH0.0031214637
Set Goblin110072022020-10-07 7:12:351387 days ago1602054755IN
0x61b7379F...0643A7F68
0 ETH0.0040494748.00000145
0x60806040110071432020-10-07 6:59:131387 days ago1602053953IN
 Contract Creation
0 ETH0.0258279544

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xBEF2D458...053b606f9
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
SimpleBankConfig

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2020-10-07
*/

// File: openzeppelin-solidity-2.3.0/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;

/**
 * @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 aplied to your functions to restrict their use to
 * the owner.
 */
contract Ownable {
    address private _owner;

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

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

    /**
     * @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 msg.sender == _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: contracts/BankConfig.sol

pragma solidity 0.5.16;

interface BankConfig {
    /// @dev Return minimum ETH debt size per position.
    function minDebtSize() external view returns (uint256);

    /// @dev Return the interest rate per second, using 1e18 as denom.
    function getInterestRate(uint256 debt, uint256 floating) external view returns (uint256);

    /// @dev Return the bps rate for reserve pool.
    function getReservePoolBps() external view returns (uint256);

    /// @dev Return the bps rate for Avada Kill caster.
    function getKillBps() external view returns (uint256);

    /// @dev Return whether the given address is a goblin.
    function isGoblin(address goblin) external view returns (bool);

    /// @dev Return whether the given goblin accepts more debt. Revert on non-goblin.
    function acceptDebt(address goblin) external view returns (bool);

    /// @dev Return the work factor for the goblin + ETH debt, using 1e4 as denom. Revert on non-goblin.
    function workFactor(address goblin, uint256 debt) external view returns (uint256);

    /// @dev Return the kill factor for the goblin + ETH debt, using 1e4 as denom. Revert on non-goblin.
    function killFactor(address goblin, uint256 debt) external view returns (uint256);
}

// File: contracts/SimpleBankConfig.sol

pragma solidity 0.5.16;



contract SimpleBankConfig is BankConfig, Ownable {
    /// @notice Configuration for each goblin.
    struct GoblinConfig {
        bool isGoblin;
        bool acceptDebt;
        uint256 workFactor;
        uint256 killFactor;
    }

    /// The minimum ETH debt size per position.
    uint256 public minDebtSize;
    /// The interest rate per second, multiplied by 1e18.
    uint256 public interestRate;
    /// The portion of interests allocated to the reserve pool.
    uint256 public getReservePoolBps;
    /// The reward for successfully killing a position.
    uint256 public getKillBps;
    /// Mapping for goblin address to its configuration.
    mapping (address => GoblinConfig) goblins;

    constructor(
        uint256 _minDebtSize,
        uint256 _interestRate,
        uint256 _reservePoolBps,
        uint256 _killBps
    ) public {
        setParams(_minDebtSize, _interestRate, _reservePoolBps, _killBps);
    }

    /// @dev Set all the basic parameters. Must only be called by the owner.
    /// @param _minDebtSize The new minimum debt size value.
    /// @param _interestRate The new interest rate per second value.
    /// @param _reservePoolBps The new interests allocated to the reserve pool value.
    /// @param _killBps The new reward for killing a position value.
    function setParams(
        uint256 _minDebtSize,
        uint256 _interestRate,
        uint256 _reservePoolBps,
        uint256 _killBps
    ) public onlyOwner {
        minDebtSize = _minDebtSize;
        interestRate = _interestRate;
        getReservePoolBps = _reservePoolBps;
        getKillBps = _killBps;
    }

    /// @dev Set the configuration for the given goblin. Must only be called by the owner.
    /// @param goblin The goblin address to set configuration.
    /// @param _isGoblin Whether the given address is a valid goblin.
    /// @param _acceptDebt Whether the goblin is accepting new debts.
    /// @param _workFactor The work factor value for this goblin.
    /// @param _killFactor The kill factor value for this goblin.
    function setGoblin(
        address goblin,
        bool _isGoblin,
        bool _acceptDebt,
        uint256 _workFactor,
        uint256 _killFactor
    ) public onlyOwner {
        goblins[goblin] = GoblinConfig({
            isGoblin: _isGoblin,
            acceptDebt: _acceptDebt,
            workFactor: _workFactor,
            killFactor: _killFactor
        });
    }

    /// @dev Return the interest rate per second, using 1e18 as denom.
    function getInterestRate(uint256 /* debt */, uint256 /* floating */) external view returns (uint256) {
        return interestRate;
    }

    /// @dev Return whether the given address is a goblin.
    function isGoblin(address goblin) external view returns (bool) {
        return goblins[goblin].isGoblin;
    }

    /// @dev Return whether the given goblin accepts more debt. Revert on non-goblin.
    function acceptDebt(address goblin) external view returns (bool) {
        require(goblins[goblin].isGoblin, "!goblin");
        return goblins[goblin].acceptDebt;
    }

    /// @dev Return the work factor for the goblin + ETH debt, using 1e4 as denom. Revert on non-goblin.
    function workFactor(address goblin, uint256 /* debt */) external view returns (uint256) {
        require(goblins[goblin].isGoblin, "!goblin");
        return goblins[goblin].workFactor;
    }

    /// @dev Return the kill factor for the goblin + ETH debt, using 1e4 as denom. Revert on non-goblin.
    function killFactor(address goblin, uint256 /* debt */) external view returns (uint256) {
        require(goblins[goblin].isGoblin, "!goblin");
        return goblins[goblin].killFactor;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_minDebtSize","type":"uint256"},{"internalType":"uint256","name":"_interestRate","type":"uint256"},{"internalType":"uint256","name":"_reservePoolBps","type":"uint256"},{"internalType":"uint256","name":"_killBps","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"goblin","type":"address"}],"name":"acceptDebt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getInterestRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getKillBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReservePoolBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"interestRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"goblin","type":"address"}],"name":"isGoblin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"goblin","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"killFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minDebtSize","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":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"goblin","type":"address"},{"internalType":"bool","name":"_isGoblin","type":"bool"},{"internalType":"bool","name":"_acceptDebt","type":"bool"},{"internalType":"uint256","name":"_workFactor","type":"uint256"},{"internalType":"uint256","name":"_killFactor","type":"uint256"}],"name":"setGoblin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_minDebtSize","type":"uint256"},{"internalType":"uint256","name":"_interestRate","type":"uint256"},{"internalType":"uint256","name":"_reservePoolBps","type":"uint256"},{"internalType":"uint256","name":"_killBps","type":"uint256"}],"name":"setParams","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"goblin","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"workFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f45760003560e01c80637c3a00fd11610097578063ad58e57311610066578063ad58e57314610256578063c6dfa13f14610282578063e1ed4286146102a5578063f2fde38b146102ad576100f4565b80637c3a00fd146101f35780637ece45e8146101fb5780638da5cb5b1461022a5780638f32d59b1461024e576100f4565b806313f6321b116100d357806313f6321b1461017357806328ae433e1461019f578063309e9022146101a7578063715018a6146101eb576100f4565b80620237f0146100f9578063045d84ed1461013357806309956f6614610159575b600080fd5b61011f6004803603602081101561010f57600080fd5b50356001600160a01b03166102d3565b604080519115158252519081900360200190f35b61011f6004803603602081101561014957600080fd5b50356001600160a01b031661034e565b61016161036c565b60408051918252519081900360200190f35b6101616004803603604081101561018957600080fd5b506001600160a01b038135169060200135610372565b6101616103e9565b6101e9600480360360a08110156101bd57600080fd5b506001600160a01b038135169060208101351515906040810135151590606081013590608001356103ef565b005b6101e96104aa565b61016161053b565b6101e96004803603608081101561021157600080fd5b5080359060208101359060408101359060600135610541565b61023261059c565b604080516001600160a01b039092168252519081900360200190f35b61011f6105ab565b6101616004803603604081101561026c57600080fd5b506001600160a01b0381351690602001356105bc565b6101616004803603604081101561029857600080fd5b5080359060200135610633565b61016161063b565b6101e9600480360360208110156102c357600080fd5b50356001600160a01b0316610641565b6001600160a01b03811660009081526005602052604081205460ff1661032a576040805162461bcd60e51b815260206004820152600760248201526610b3b7b13634b760c91b604482015290519081900360640190fd5b506001600160a01b0316600090815260056020526040902054610100900460ff1690565b6001600160a01b031660009081526005602052604090205460ff1690565b60035481565b6001600160a01b03821660009081526005602052604081205460ff166103c9576040805162461bcd60e51b815260206004820152600760248201526610b3b7b13634b760c91b604482015290519081900360640190fd5b50506001600160a01b031660009081526005602052604090206002015490565b60045481565b6103f76105ab565b610436576040805162461bcd60e51b8152602060048201819052602482015260008051602061075b833981519152604482015290519081900360640190fd5b6040805160808101825294151585529215156020808601918252858501938452606086019283526001600160a01b03909616600090815260059096529290942092518354925115156101000261ff001991151560ff1990941693909317169190911782555160018201559051600290910155565b6104b26105ab565b6104f1576040805162461bcd60e51b8152602060048201819052602482015260008051602061075b833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60025481565b6105496105ab565b610588576040805162461bcd60e51b8152602060048201819052602482015260008051602061075b833981519152604482015290519081900360640190fd5b600193909355600291909155600355600455565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6001600160a01b03821660009081526005602052604081205460ff16610613576040805162461bcd60e51b815260206004820152600760248201526610b3b7b13634b760c91b604482015290519081900360640190fd5b50506001600160a01b031660009081526005602052604090206001015490565b505060025490565b60015481565b6106496105ab565b610688576040805162461bcd60e51b8152602060048201819052602482015260008051602061075b833981519152604482015290519081900360640190fd5b61069181610694565b50565b6001600160a01b0381166106d95760405162461bcd60e51b81526004018080602001828103825260268152602001806107356026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a723158201c25d0d7b8f965632085a9795d9570dff4d82e21242de2887587c11d41f5e63f64736f6c63430005100032

Deployed Bytecode Sourcemap

3847:3780:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3847:3780:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6834:172;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6834:172:0;-1:-1:-1;;;;;6834:172:0;;:::i;:::-;;;;;;;;;;;;;;;;;;6626:113;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6626:113:0;-1:-1:-1;;;;;6626:113:0;;:::i;4335:32::-;;;:::i;:::-;;;;;;;;;;;;;;;;7429:195;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;7429:195:0;;;;;;;;:::i;4431:25::-;;;:::i;5949:390::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;5949:390:0;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1724:140;;;:::i;4236:27::-;;;:::i;5180:329::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;5180:329:0;;;;;;;;;;;;;;;;;:::i;913:79::-;;;:::i;:::-;;;;-1:-1:-1;;;;;913:79:0;;;;;;;;;;;;;;1279:92;;;:::i;7120:195::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;7120:195:0;;;;;;;;:::i;6419:139::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6419:139:0;;;;;;;:::i;4144:26::-;;;:::i;2019:109::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2019:109:0;-1:-1:-1;;;;;2019:109:0;;:::i;6834:172::-;-1:-1:-1;;;;;6918:15:0;;6893:4;6918:15;;;:7;:15;;;;;:24;;;6910:44;;;;;-1:-1:-1;;;6910:44:0;;;;;;;;;;;;-1:-1:-1;;;6910:44:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6972:15:0;;;;;:7;:15;;;;;:26;;;;;;;6834:172::o;6626:113::-;-1:-1:-1;;;;;6707:15:0;6683:4;6707:15;;;:7;:15;;;;;:24;;;;6626:113::o;4335:32::-;;;;:::o;7429:195::-;-1:-1:-1;;;;;7536:15:0;;7508:7;7536:15;;;:7;:15;;;;;:24;;;7528:44;;;;;-1:-1:-1;;;7528:44:0;;;;;;;;;;;;-1:-1:-1;;;7528:44:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;7590:15:0;;;;;:7;:15;;;;;:26;;;;7429:195::o;4431:25::-;;;;:::o;5949:390::-;1125:9;:7;:9::i;:::-;1117:54;;;;;-1:-1:-1;;;1117:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1117:54:0;;;;;;;;;;;;;;;6158:173;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6140:15:0;;;-1:-1:-1;6140:15:0;;;:7;:15;;;;;;;:191;;;;;;;;;;-1:-1:-1;;6140:191:0;;;-1:-1:-1;;6140:191:0;;;;;;;;;;;;;;;;;;;;;;;;;;5949:390::o;1724:140::-;1125:9;:7;:9::i;:::-;1117:54;;;;;-1:-1:-1;;;1117:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1117:54:0;;;;;;;;;;;;;;;1823:1;1807:6;;1786:40;;-1:-1:-1;;;;;1807:6:0;;;;1786:40;;1823:1;;1786:40;1854:1;1837:19;;-1:-1:-1;;;;;;1837:19:0;;;1724:140::o;4236:27::-;;;;:::o;5180:329::-;1125:9;:7;:9::i;:::-;1117:54;;;;;-1:-1:-1;;;1117:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1117:54:0;;;;;;;;;;;;;;;5358:11;:26;;;;5395:12;:28;;;;5434:17;:35;5480:10;:21;5180:329::o;913:79::-;951:7;978:6;-1:-1:-1;;;;;978:6:0;913:79;:::o;1279:92::-;1319:4;1357:6;-1:-1:-1;;;;;1357:6:0;1343:10;:20;;1279:92::o;7120:195::-;-1:-1:-1;;;;;7227:15:0;;7199:7;7227:15;;;:7;:15;;;;;:24;;;7219:44;;;;;-1:-1:-1;;;7219:44:0;;;;;;;;;;;;-1:-1:-1;;;7219:44:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;7281:15:0;;;;;:7;:15;;;;;:26;;;;7120:195::o;6419:139::-;-1:-1:-1;;6538:12:0;;;6419:139::o;4144:26::-;;;;:::o;2019:109::-;1125:9;:7;:9::i;:::-;1117:54;;;;;-1:-1:-1;;;1117:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1117:54:0;;;;;;;;;;;;;;;2092:28;2111:8;2092:18;:28::i;:::-;2019:109;:::o;2234:229::-;-1:-1:-1;;;;;2308:22:0;;2300:73;;;;-1:-1:-1;;;2300:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2410:6;;;2389:38;;-1:-1:-1;;;;;2389:38:0;;;;2410:6;;;2389:38;;;2438:6;:17;;-1:-1:-1;;;;;;2438:17:0;-1:-1:-1;;;;;2438:17:0;;;;;;;;;;2234:229::o

Swarm Source

bzzr://1c25d0d7b8f965632085a9795d9570dff4d82e21242de2887587c11d41f5e63f

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

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.