Token TrueFi

Loans 
 

Overview [ERC-20]

Price
$0.06 @ 0.000039 Eth (-15.76%)
Fully Diluted Market Cap
Max Total Supply:
1,441,129,426.98535704 TRU

Holders:
6,293 ( -0.032%)

Transfers:
-

 
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

OVERVIEW

TrueFi is a DeFi protocol for uncollateralized lending powered by the TRU token. TRU Stakers to assess the creditworthiness of the loans

Market

Volume (24H):$2,230,827.00
Market Capitalization:$53,046,964.00
Circulating Supply:836,824,831.00 TRU
Market Data Source: Coinmarketcap

# Exchange Pair Price  24H Volume % Volume
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TimeOwnedUpgradeabilityProxy

Compiler Version
v0.5.13+commit.5b0b510c

Optimization Enabled:
Yes with 20000 runs

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

// File: @trusttoken/trusttokens/contracts/Proxy/OwnedUpgradeabilityProxy.sol

pragma solidity 0.5.13;

/**
 * @title OwnedUpgradeabilityProxy
 * @dev This contract combines an upgradeability proxy with basic authorization control functionalities
 */
contract OwnedUpgradeabilityProxy {
    /**
    * @dev Event to show ownership has been transferred
    * @param previousOwner representing the address of the previous owner
    * @param newOwner representing the address of the new owner
    */
    event ProxyOwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
    * @dev Event to show ownership transfer is pending
    * @param currentOwner representing the address of the current owner
    * @param pendingOwner representing the address of the pending owner
    */
    event NewPendingOwner(address currentOwner, address pendingOwner);
    
    // Storage position of the owner and pendingOwner of the contract
    bytes32 private constant proxyOwnerPosition = 0x6279e8199720cf3557ecd8b58d667c8edc486bd1cf3ad59ea9ebdfcae0d0dfac;//keccak256("trueUSD.proxy.owner");
    bytes32 private constant pendingProxyOwnerPosition = 0x8ddbac328deee8d986ec3a7b933a196f96986cb4ee030d86cc56431c728b83f4;//keccak256("trueUSD.pending.proxy.owner");

    /**
    * @dev the constructor sets the original owner of the contract to the sender account.
    */
    constructor() public {
        _setUpgradeabilityOwner(msg.sender);
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier onlyProxyOwner() {
        require(msg.sender == proxyOwner(), "only Proxy Owner");
        _;
    }

    /**
    * @dev Throws if called by any account other than the pending owner.
    */
    modifier onlyPendingProxyOwner() {
        require(msg.sender == pendingProxyOwner(), "only pending Proxy Owner");
        _;
    }

    /**
    * @dev Tells the address of the owner
    * @return the address of the owner
    */
    function proxyOwner() public view returns (address owner) {
        bytes32 position = proxyOwnerPosition;
        assembly {
            owner := sload(position)
        }
    }

    /**
    * @dev Tells the address of the owner
    * @return the address of the owner
    */
    function pendingProxyOwner() public view returns (address pendingOwner) {
        bytes32 position = pendingProxyOwnerPosition;
        assembly {
            pendingOwner := sload(position)
        }
    }

    /**
    * @dev Sets the address of the owner
    */
    function _setUpgradeabilityOwner(address newProxyOwner) internal {
        bytes32 position = proxyOwnerPosition;
        assembly {
            sstore(position, newProxyOwner)
        }
    }

    /**
    * @dev Sets the address of the owner
    */
    function _setPendingUpgradeabilityOwner(address newPendingProxyOwner) internal {
        bytes32 position = pendingProxyOwnerPosition;
        assembly {
            sstore(position, newPendingProxyOwner)
        }
    }

    /**
    * @dev Allows the current owner to transfer control of the contract to a newOwner.
    *changes the pending owner to newOwner. But doesn't actually transfer
    * @param newOwner The address to transfer ownership to.
    */
    function transferProxyOwnership(address newOwner) external onlyProxyOwner {
        require(newOwner != address(0));
        _setPendingUpgradeabilityOwner(newOwner);
        emit NewPendingOwner(proxyOwner(), newOwner);
    }

    /**
    * @dev Allows the pendingOwner to claim ownership of the proxy
    */
    function claimProxyOwnership() external onlyPendingProxyOwner {
        emit ProxyOwnershipTransferred(proxyOwner(), pendingProxyOwner());
        _setUpgradeabilityOwner(pendingProxyOwner());
        _setPendingUpgradeabilityOwner(address(0));
    }

    /**
    * @dev Allows the proxy owner to upgrade the current version of the proxy.
    * @param implementation representing the address of the new implementation to be set.
    */
    function upgradeTo(address implementation) public onlyProxyOwner {
        address currentImplementation;
        bytes32 position = implementationPosition;
        assembly {
            currentImplementation := sload(position)
        }
        require(currentImplementation != implementation);
        assembly {
          sstore(position, implementation)
        }
        emit Upgraded(implementation);
    }
    /**
    * @dev This event will be emitted every time the implementation gets upgraded
    * @param implementation representing the address of the upgraded implementation
    */
    event Upgraded(address indexed implementation);

    // Storage position of the address of the current implementation
    bytes32 private constant implementationPosition = 0x6e41e0fbe643dfdb6043698bf865aada82dc46b953f754a3468eaa272a362dc7; //keccak256("trueUSD.proxy.implementation");

    function implementation() public view returns (address impl) {
        bytes32 position = implementationPosition;
        assembly {
            impl := sload(position)
        }
    }

    /**
    * @dev Fallback function allowing to perform a delegatecall to the given implementation.
    * This function will return whatever the implementation call returns
    */
    function() external payable {
        bytes32 position = implementationPosition;
        
        assembly {
            let ptr := mload(0x40)
            calldatacopy(ptr, returndatasize, calldatasize)
            let result := delegatecall(gas, sload(position), ptr, calldatasize, returndatasize, returndatasize)
            returndatacopy(ptr, 0, returndatasize)

            switch result
            case 0 { revert(ptr, returndatasize) }
            default { return(ptr, returndatasize) }
        }
    }
}

// File: @trusttoken/trusttokens/contracts/Proxy/TimeOwnedUpgradeabilityProxy.sol

pragma solidity 0.5.13;


/**
 * @title TimeOwnedUpgradeabilityProxy
 * @dev This contract combines an upgradeability proxy with
 * basic authorization control functionalities
 *
 * This contract allows us to specify a time at which the proxy can no longer
 * be upgraded
 */
contract TimeOwnedUpgradeabilityProxy is OwnedUpgradeabilityProxy {

    bytes32 private constant expirationPosition = bytes32(uint256(keccak256('trusttoken.expiration')) - 1);

    /**
    * @dev the constructor sets the original owner of the contract to the sender account.
    */
    constructor() public {
        _setUpgradeabilityOwner(msg.sender);
        // set expiration to ~4 months from now
        _setExpiration(block.timestamp + 124 days);
    }

    /**
     * @dev sets new expiration time
    */
    function setExpiration(uint256 newExpirationTime) external onlyProxyOwner {
        require(block.timestamp < expiration(), "after expiration time");
        require(block.timestamp < newExpirationTime, "new expiration time must be in the future");
        _setExpiration(newExpirationTime);
    }

    function _setExpiration(uint256 newExpirationTime) internal onlyProxyOwner {
        bytes32 position = expirationPosition;
        assembly {
            sstore(position, newExpirationTime)
        }
    }

    function expiration() public view returns (uint256 _expiration) {
        bytes32 position = expirationPosition;
        assembly {
            _expiration := sload(position)
        }
    }

    /**
    * @dev Allows the proxy owner to upgrade the current version of the proxy.
    * @param implementation representing the address of the new implementation to be set.
    */
    function upgradeTo(address implementation) public onlyProxyOwner {
        require(block.timestamp < expiration(), "after expiration date");
        super.upgradeTo(implementation);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"currentOwner","type":"address"},{"indexed":false,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"NewPendingOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"ProxyOwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[],"name":"claimProxyOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"expiration","outputs":[{"internalType":"uint256","name":"_expiration","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"impl","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingProxyOwner","outputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxyOwner","outputs":[{"internalType":"address","name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newExpirationTime","type":"uint256"}],"name":"setExpiration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferProxyOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"upgradeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610023336001600160e01b0361005116565b610035336001600160e01b0361005116565b61004c62a37a0042016001600160e01b0361006316565b61013f565b600080516020610bda83398151915255565b6100746001600160e01b0361012c16565b6001600160a01b0316336001600160a01b0316146100f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b604080517f7472757374746f6b656e2e65787069726174696f6e0000000000000000000000815290519081900360150190206000190155565b600080516020610bda8339815191525490565b610a8c8061014e6000396000f3fe60806040526004361061007b5760003560e01c8063515a20ba1161004e578063515a20ba1461017c5780635c60da1b146101a65780639965b3d6146101bb578063f1739cae146101d05761007b565b8063025313a2146100c05780630add8140146100fe5780633659cfe6146101135780634665096d14610155575b6040517f6e41e0fbe643dfdb6043698bf865aada82dc46b953f754a3468eaa272a362dc790363d82373d3d368385545af43d6000833e8080156100bc573d83f35b3d83fd5b3480156100cc57600080fd5b506100d5610210565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561010a57600080fd5b506100d5610235565b34801561011f57600080fd5b506101536004803603602081101561013657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661025a565b005b34801561016157600080fd5b5061016a61037c565b60408051918252519081900360200190f35b34801561018857600080fd5b506101536004803603602081101561019f57600080fd5b50356103d4565b3480156101b257600080fd5b506100d561054b565b3480156101c757600080fd5b50610153610570565b3480156101dc57600080fd5b50610153600480360360208110156101f357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610695565b7f6279e8199720cf3557ecd8b58d667c8edc486bd1cf3ad59ea9ebdfcae0d0dfac5490565b7f8ddbac328deee8d986ec3a7b933a196f96986cb4ee030d86cc56431c728b83f45490565b610262610210565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102fb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b61030361037c565b421061037057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f61667465722065787069726174696f6e20646174650000000000000000000000604482015290519081900360640190fd5b610379816107ba565b50565b604080517f7472757374746f6b656e2e65787069726174696f6e0000000000000000000000815290519081900360150190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015490565b6103dc610210565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461047557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b61047d61037c565b42106104ea57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f61667465722065787069726174696f6e2074696d650000000000000000000000604482015290519081900360640190fd5b804210610542576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180610a2f6029913960400191505060405180910390fd5b610379816108ee565b7f6e41e0fbe643dfdb6043698bf865aada82dc46b953f754a3468eaa272a362dc75490565b610578610235565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461061157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6f6e6c792070656e64696e672050726f7879204f776e65720000000000000000604482015290519081900360640190fd5b610619610235565b73ffffffffffffffffffffffffffffffffffffffff16610637610210565b73ffffffffffffffffffffffffffffffffffffffff167f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd960405160405180910390a3610689610684610235565b6109e6565b6106936000610a0a565b565b61069d610210565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461073657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661075657600080fd5b61075f81610a0a565b7fb3d55174552271a4f1aaf36b72f50381e892171636b3fb5447fe00e995e7a37b610788610210565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a150565b6107c2610210565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461085b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b7f6e41e0fbe643dfdb6043698bf865aada82dc46b953f754a3468eaa272a362dc780549073ffffffffffffffffffffffffffffffffffffffff80831690841614156108a557600080fd5b82815560405173ffffffffffffffffffffffffffffffffffffffff8416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2505050565b6108f6610210565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461098f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6f6e6c792050726f7879204f776e657200000000000000000000000000000000604482015290519081900360640190fd5b604080517f7472757374746f6b656e2e65787069726174696f6e0000000000000000000000815290519081900360150190207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0155565b7f6279e8199720cf3557ecd8b58d667c8edc486bd1cf3ad59ea9ebdfcae0d0dfac55565b7f8ddbac328deee8d986ec3a7b933a196f96986cb4ee030d86cc56431c728b83f45556fe6e65772065787069726174696f6e2074696d65206d75737420626520696e2074686520667574757265a265627a7a72315820f0711983683a8e75a5cebe0ba1e54123d11ff3519f1af44dd6984e8728864aba64736f6c634300050d00326279e8199720cf3557ecd8b58d667c8edc486bd1cf3ad59ea9ebdfcae0d0dfac

Deployed ByteCode Sourcemap

6307:1646:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5545:4;5539:11;4901:66;;5598:12;5582:14;5539:11;5564:47;5709:14;5693;5679:12;5674:3;5663:8;5657:15;5652:3;5639:85;5761:14;5758:1;5753:3;5738:38;5799:6;5819:38;;;;5893:14;5888:3;5881:27;5819:38;5840:14;5835:3;5828:27;2031:183;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2031:183:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2322:211;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2322:211:0;;;:::i;7760:190::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7760:190:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7760:190:0;;;;:::i;:::-;;7369:195;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7369:195:0;;;:::i;:::-;;;;;;;;;;;;;;;;6841:301;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6841:301:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6841:301:0;;:::i;5021:189::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5021:189:0;;;:::i;3661:254::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3661:254:0;;;:::i;3338:230::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3338:230:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3338:230:0;;;;:::i;2031:183::-;1025:66;2181:15;;2157:50::o;2322:211::-;1186:66;2500:15;;2469:57::o;7760:190::-;1637:12;:10;:12::i;:::-;1623:26;;:10;:26;;;1615:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7862:12;:10;:12::i;:::-;7844:15;:30;7836:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7911:31;7927:14;7911:15;:31::i;:::-;7760:190;:::o;7369:195::-;6444:34;;;;;;;;;;;;;;;;6436:47;;7531:15;;7501:56::o;6841:301::-;1637:12;:10;:12::i;:::-;1623:26;;:10;:26;;;1615:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6952:12;:10;:12::i;:::-;6934:15;:30;6926:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7027:17;7009:15;:35;7001:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7101:33;7116:17;7101:14;:33::i;5021:189::-;4901:66;5177:15;;5154:49::o;3661:254::-;1855:19;:17;:19::i;:::-;1841:33;;:10;:33;;;1833:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3779:19;:17;:19::i;:::-;3739:60;;3765:12;:10;:12::i;:::-;3739:60;;;;;;;;;;;;3810:44;3834:19;:17;:19::i;:::-;3810:23;:44::i;:::-;3865:42;3904:1;3865:30;:42::i;:::-;3661:254::o;3338:230::-;1637:12;:10;:12::i;:::-;1623:26;;:10;:26;;;1615:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3431:22;;;3423:31;;;;;;3465:40;3496:8;3465:30;:40::i;:::-;3521:39;3537:12;:10;:12::i;:::-;3521:39;;;;;;;;;;;;;;;;;;;;;;;;;3338:230;:::o;4111:424::-;1637:12;:10;:12::i;:::-;1623:26;;:10;:26;;;1615:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4901:66;4328:15;;;4372:39;;;;;;;;;4364:48;;;;;;4445:32;;;4503:24;;;;;;;;;;;1681:1;;4111:424;:::o;7150:211::-;1637:12;:10;:12::i;:::-;1623:26;;:10;:26;;;1615:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6444:34;;;;;;;;;;;;;;;;6436:47;;7308:35;7150:211::o;2600:197::-;1025:66;2748:31;2733:57::o;2864:225::-;1186:66;3033:38;3018:64::o

Swarm Source

bzzr://f0711983683a8e75a5cebe0ba1e54123d11ff3519f1af44dd6984e8728864aba

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.