ETH Price: $3,327.72 (-3.87%)

Token

Unit Protocol (DUCK)
 

Overview

Max Total Supply

1,018,892,666.327790687645873089 DUCK

Holders

3,047 (0.00%)

Market

Price

$0.00 @ 0.000000 ETH (-4.91%)

Onchain Market Cap

$230,188.23

Circulating Supply Market Cap

$101,937.00

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
autodidact.eth
Balance
0.000066654829411973 DUCK

Value
$0.00 ( ~0 Eth) [0.0000%]
0x9Cfba3f2F16b3Fe56cFF8E390b6A0f937001a278
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Unit protocol is a decentralized borrowing protocol that allows using a variety of tokens as collateral.

Market

Volume (24H):$1,136.83
Market Capitalization:$101,937.00
Circulating Supply:452,220,037.00 DUCK
Market Data Source: Coinmarketcap

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.8

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.8
from vyper.interfaces import ERC20

implements: ERC20


event Transfer:
    sender: indexed(address)
    receiver: indexed(address)
    value: uint256


event Approval:
    owner: indexed(address)
    spender: indexed(address)
    value: uint256


name: public(String[64])
symbol: public(String[32])
decimals: public(uint256)
balanceOf: public(HashMap[address, uint256])
allowances: HashMap[address, HashMap[address, uint256]]
totalSupply: public(uint256)
COL: constant(address) = 0xC76FB75950536d98FA62ea968E1D6B45ffea2A55
DEAD: constant(address) = 0x000000000000000000000000000000000000dEaD
RATIO: constant(uint256) = 100  # 1 DUCK equals 100 COL


@external
def __init__():
    self.name = 'Unit Protocol'
    self.symbol = 'DUCK'
    self.decimals = 18


@external
def quack():
    """
    Migrate and burn COL for DUCK. Quack quack.
    """
    cols: uint256 = ERC20(COL).balanceOf(msg.sender)
    ducks: uint256 = cols / RATIO
    assert ERC20(COL).transferFrom(msg.sender, DEAD, cols)  # dev: not approved
    self.totalSupply += ducks
    self.balanceOf[msg.sender] += ducks
    log Transfer(ZERO_ADDRESS, msg.sender, ducks)


@view
@external
def allowance(owner: address, spender: address) -> uint256:
    return self.allowances[owner][spender]


@external
def transfer(receiver: address, amount: uint256) -> bool:
    assert receiver not in [self, ZERO_ADDRESS]
    self.balanceOf[msg.sender] -= amount
    self.balanceOf[receiver] += amount
    log Transfer(msg.sender, receiver, amount)
    return True


@external
def transferFrom(owner: address, receiver: address, amount: uint256) -> bool:
    assert receiver not in [self, ZERO_ADDRESS]
    self.balanceOf[owner] -= amount
    self.balanceOf[receiver] += amount
    if owner != msg.sender and self.allowances[owner][msg.sender] != MAX_UINT256:
        self.allowances[owner][msg.sender] -= amount
        log Approval(owner, msg.sender, self.allowances[owner][msg.sender])
    log Transfer(owner, receiver, amount)
    return True


@external
def approve(spender: address, amount: uint256) -> bool:
    self.allowances[msg.sender][spender] = amount
    log Approval(msg.sender, spender, amount)
    return True


@external
def burn(amount: uint256):
    self.totalSupply -= amount
    self.balanceOf[msg.sender] -= amount
    log Transfer(msg.sender, ZERO_ADDRESS, amount)

Contract Security Audit

Contract ABI

[{"name":"Transfer","inputs":[{"type":"address","name":"sender","indexed":true},{"type":"address","name":"receiver","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"spender","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"name":"quack","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":75951},{"name":"allowance","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"owner"},{"type":"address","name":"spender"}],"stateMutability":"view","type":"function","gas":1521},{"name":"transfer","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"receiver"},{"type":"uint256","name":"amount"}],"stateMutability":"nonpayable","type":"function","gas":75264},{"name":"transferFrom","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"owner"},{"type":"address","name":"receiver"},{"type":"uint256","name":"amount"}],"stateMutability":"nonpayable","type":"function","gas":115850},{"name":"approve","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"spender"},{"type":"uint256","name":"amount"}],"stateMutability":"nonpayable","type":"function","gas":37824},{"name":"burn","outputs":[],"inputs":[{"type":"uint256","name":"amount"}],"stateMutability":"nonpayable","type":"function","gas":74564},{"name":"name","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":7643},{"name":"symbol","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":6696},{"name":"decimals","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1301},{"name":"balanceOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":1546},{"name":"totalSupply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1361}]

600d610140527f556e69742050726f746f636f6c000000000000000000000000000000000000006101605261014080600060c052602060c020602082510161012060006002818352015b8261012051602002111561005c5761007e565b61012051602002850151610120518501555b8151600101808352811415610049575b5050505050506004610140527f4455434b000000000000000000000000000000000000000000000000000000006101605261014080600160c052602060c020602082510161012060006002818352015b826101205160200211156100e157610103565b61012051602002850151610120518501555b81516001018083528114156100ce575b50505050505060126002556108cb56341561000a57600080fd5b6004361015610018576107b2565b600035601c526362f1402960005114156101755760206101e060246370a0823161016052336101805261017c73c76fb75950536d98fa62ea968e1d6b45ffea2a555afa61006457600080fd5b601f3d1161007157600080fd5b6000506101e051610140526101405160648082049050905061016052602061024060646323b872dd61018052336101a05261dead6101c052610140516101e05261019c600073c76fb75950536d98fa62ea968e1d6b45ffea2a555af16100d657600080fd5b601f3d116100e357600080fd5b600050610240516100f357600080fd5b600580546101605181818301101561010a57600080fd5b8082019050905081555060033360e05260c052604060c02080546101605181818301101561013757600080fd5b8082019050905081555061016051610180523360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610180a3005b63dd62ed3e60005114156101cd5760043560a01c1561019357600080fd5b60243560a01c156101a357600080fd5b600460043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b63a9059cbb60005114156102e25760043560a01c156101eb57600080fd5b306101605260006101805260006101405261014061012060006002818352015b6101205160200261016001516004351415610229576001835261023a565b5b815160010180835281141561020b575b505050610140511561024b57600080fd5b60033360e05260c052604060c02080546024358082101561026b57600080fd5b80820390509050815550600360043560e05260c052604060c020805460243581818301101561029957600080fd5b8082019050905081555060243561014052600435337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f350005b6323b872dd60005114156104e75760043560a01c1561030057600080fd5b60243560a01c1561031057600080fd5b306101605260006101805260006101405261014061012060006002818352015b610120516020026101600151602435141561034e576001835261035f565b5b8151600101808352811415610330575b505050610140511561037057600080fd5b600360043560e05260c052604060c02080546044358082101561039257600080fd5b80820390509050815550600360243560e05260c052604060c02080546044358181830110156103c057600080fd5b80820190509050815550336004351815610419577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460043560e05260c052604060c0203360e05260c052604060c02054141561041c565b60005b156104a657600460043560e05260c052604060c0203360e05260c052604060c02080546044358082101561044f57600080fd5b80820390509050815550600460043560e05260c052604060c0203360e05260c052604060c0205461014052336004357f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a35b604435610140526024356004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f350005b63095ea7b360005114156105645760043560a01c1561050557600080fd5b60243560043360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b6342966c6860005114156105ed57600580546004358082101561058657600080fd5b8082039050905081555060033360e05260c052604060c0208054600435808210156105b057600080fd5b80820390509050815550600435610140526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3005b6306fdde0360005114156106965760008060c052602060c020610180602082540161012060006003818352015b8261012051602002111561062d5761064f565b61012051850154610120516020028501525b815160010180835281141561061a575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b6395d89b41600051141561073f5760018060c052602060c020610180602082540161012060006002818352015b826101205160200211156106d6576106f8565b61012051850154610120516020028501525b81516001018083528114156106c3575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b63313ce567600051141561075b5760025460005260206000f350005b6370a0823160005114156107955760043560a01c1561077957600080fd5b600360043560e05260c052604060c0205460005260206000f350005b6318160ddd60005114156107b15760055460005260206000f350005b5b60006000fd5b6101136108cb036101136000396101136108cb036000f3

Deployed Bytecode

0x341561000a57600080fd5b6004361015610018576107b2565b600035601c526362f1402960005114156101755760206101e060246370a0823161016052336101805261017c73c76fb75950536d98fa62ea968e1d6b45ffea2a555afa61006457600080fd5b601f3d1161007157600080fd5b6000506101e051610140526101405160648082049050905061016052602061024060646323b872dd61018052336101a05261dead6101c052610140516101e05261019c600073c76fb75950536d98fa62ea968e1d6b45ffea2a555af16100d657600080fd5b601f3d116100e357600080fd5b600050610240516100f357600080fd5b600580546101605181818301101561010a57600080fd5b8082019050905081555060033360e05260c052604060c02080546101605181818301101561013757600080fd5b8082019050905081555061016051610180523360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610180a3005b63dd62ed3e60005114156101cd5760043560a01c1561019357600080fd5b60243560a01c156101a357600080fd5b600460043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b63a9059cbb60005114156102e25760043560a01c156101eb57600080fd5b306101605260006101805260006101405261014061012060006002818352015b6101205160200261016001516004351415610229576001835261023a565b5b815160010180835281141561020b575b505050610140511561024b57600080fd5b60033360e05260c052604060c02080546024358082101561026b57600080fd5b80820390509050815550600360043560e05260c052604060c020805460243581818301101561029957600080fd5b8082019050905081555060243561014052600435337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f350005b6323b872dd60005114156104e75760043560a01c1561030057600080fd5b60243560a01c1561031057600080fd5b306101605260006101805260006101405261014061012060006002818352015b610120516020026101600151602435141561034e576001835261035f565b5b8151600101808352811415610330575b505050610140511561037057600080fd5b600360043560e05260c052604060c02080546044358082101561039257600080fd5b80820390509050815550600360243560e05260c052604060c02080546044358181830110156103c057600080fd5b80820190509050815550336004351815610419577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600460043560e05260c052604060c0203360e05260c052604060c02054141561041c565b60005b156104a657600460043560e05260c052604060c0203360e05260c052604060c02080546044358082101561044f57600080fd5b80820390509050815550600460043560e05260c052604060c0203360e05260c052604060c0205461014052336004357f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a35b604435610140526024356004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f350005b63095ea7b360005114156105645760043560a01c1561050557600080fd5b60243560043360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b6342966c6860005114156105ed57600580546004358082101561058657600080fd5b8082039050905081555060033360e05260c052604060c0208054600435808210156105b057600080fd5b80820390509050815550600435610140526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3005b6306fdde0360005114156106965760008060c052602060c020610180602082540161012060006003818352015b8261012051602002111561062d5761064f565b61012051850154610120516020028501525b815160010180835281141561061a575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b6395d89b41600051141561073f5760018060c052602060c020610180602082540161012060006002818352015b826101205160200211156106d6576106f8565b61012051850154610120516020028501525b81516001018083528114156106c3575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b63313ce567600051141561075b5760025460005260206000f350005b6370a0823160005114156107955760043560a01c1561077957600080fd5b600360043560e05260c052604060c0205460005260206000f350005b6318160ddd60005114156107b15760055460005260206000f350005b5b60006000fd

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.