Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 82 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Approve | 24594091 | 27 hrs ago | IN | 0 ETH | 0.0000025 | ||||
| Approve | 24522708 | 11 days ago | IN | 0 ETH | 0.00000699 | ||||
| Approve | 24458538 | 20 days ago | IN | 0 ETH | 0.00000145 | ||||
| Approve | 24451673 | 20 days ago | IN | 0 ETH | 0.00000669 | ||||
| Approve | 24431591 | 23 days ago | IN | 0 ETH | 0.00000249 | ||||
| Approve | 24417933 | 25 days ago | IN | 0 ETH | 0.00000218 | ||||
| Approve | 24400892 | 28 days ago | IN | 0 ETH | 0.00001223 | ||||
| Approve | 24400856 | 28 days ago | IN | 0 ETH | 0.00001039 | ||||
| Approve | 24393771 | 29 days ago | IN | 0 ETH | 0.00007609 | ||||
| Approve | 24038936 | 78 days ago | IN | 0 ETH | 0.0000018 | ||||
| Approve | 23877941 | 101 days ago | IN | 0 ETH | 0.00000805 | ||||
| Approve | 23771949 | 116 days ago | IN | 0 ETH | 0.00002343 | ||||
| Approve | 23728104 | 122 days ago | IN | 0 ETH | 0.00012411 | ||||
| Approve | 23706505 | 125 days ago | IN | 0 ETH | 0.00000439 | ||||
| Approve | 23521800 | 151 days ago | IN | 0 ETH | 0.00001771 | ||||
| Approve | 23519784 | 151 days ago | IN | 0 ETH | 0.00013625 | ||||
| Approve | 23490580 | 155 days ago | IN | 0 ETH | 0.00007537 | ||||
| Approve | 23479796 | 156 days ago | IN | 0 ETH | 0.00000617 | ||||
| Approve | 23469971 | 158 days ago | IN | 0 ETH | 0.00038138 | ||||
| Approve | 23446832 | 161 days ago | IN | 0 ETH | 0.00006015 | ||||
| Approve | 23392770 | 169 days ago | IN | 0 ETH | 0.00001351 | ||||
| Approve | 23341997 | 176 days ago | IN | 0 ETH | 0.00001474 | ||||
| Approve | 23335647 | 177 days ago | IN | 0 ETH | 0.00000709 | ||||
| Deposit | 23335528 | 177 days ago | IN | 0 ETH | 0.00007811 | ||||
| Approve | 23308610 | 180 days ago | IN | 0 ETH | 0.00001466 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Liquid locker
Compiler Version
vyper:0.3.10
Contract Source Code (Vyper language format)
# @version 0.3.10
"""
@title Liquid locker
@author 1up
@license GNU AGPLv3
@notice
Tokenization of protocol's voting escrow position.
Mints a fixed amount of tokens per token locked in the voting escrow.
Intended to be a proxy operator.
"""
from vyper.interfaces import ERC20
implements: ERC20
interface Proxy:
def modify_lock(_amount: uint256, _unlock_time: uint256): nonpayable
interface YearnVotingEscrow:
def locked(_account: address) -> uint256: view
token: public(immutable(ERC20))
voting_escrow: public(immutable(YearnVotingEscrow))
proxy: public(immutable(Proxy))
totalSupply: public(uint256)
balanceOf: public(HashMap[address, uint256])
allowance: public(HashMap[address, HashMap[address, uint256]])
decimals: public(constant(uint8)) = 18
name: public(constant(String[14])) = "1UP Locked YFI"
symbol: public(constant(String[5])) = "upYFI"
event Transfer:
sender: indexed(address)
receiver: indexed(address)
value: uint256
event Approval:
owner: indexed(address)
spender: indexed(address)
value: uint256
SCALE: constant(uint256) = 69_420
WEEK: constant(uint256) = 7 * 24 * 60 * 60
LOCK_TIME: constant(uint256) = 500 * WEEK
@external
def __init__(_token: address, _voting_escrow: address, _proxy: address):
"""
@notice Constructor
@param _token Token to be locked in the voting escrow
@param _voting_escrow Voting escrow
@param _proxy Proxy
"""
token = ERC20(_token)
voting_escrow = YearnVotingEscrow(_voting_escrow)
proxy = Proxy(_proxy)
log Transfer(empty(address), msg.sender, 0)
@external
def deposit(_amount: uint256, _receiver: address = msg.sender) -> uint256:
"""
@notice Deposit tokens into the protocol's ve position and mint liquid locker tokens
@param _amount Amount of tokens to add to the lock
@param _receiver Recipient of newly minted liquid locker tokens
@return Amount of tokens minted to the recipient
"""
minted: uint256 = _amount * SCALE
self._mint(minted, _receiver)
assert token.transferFrom(msg.sender, proxy.address, _amount, default_return_value=True)
proxy.modify_lock(_amount, block.timestamp + LOCK_TIME)
return minted
@external
def mint(_receiver: address = msg.sender) -> uint256:
"""
@notice Mint liquid locker tokens for any new tokens in the ve lock
@param _receiver Receiver of newly minted liquid locker tokens
@return Amount of tokens minted to the recipient
"""
excess: uint256 = voting_escrow.locked(proxy.address) * SCALE - self.totalSupply
self._mint(excess, _receiver)
return excess
@internal
def _mint(_amount: uint256, _receiver: address):
"""
@notice Mint an amount of liquid locker tokens
"""
assert _amount > 0
assert _receiver != empty(address) and _receiver != self
self.totalSupply += _amount
self.balanceOf[_receiver] += _amount
log Transfer(empty(address), _receiver, _amount)
@external
def extend_lock():
"""
@notice Extend the duration of the protocol's ve lock
"""
proxy.modify_lock(0, block.timestamp + LOCK_TIME)
@external
def transfer(_to: address, _value: uint256) -> bool:
"""
@notice Transfer tokens
@param _to Receiver of tokens
@param _value Amount of tokens to transfer
"""
assert _to != empty(address) and _to != self
if _value > 0:
self.balanceOf[msg.sender] -= _value
self.balanceOf[_to] += _value
log Transfer(msg.sender, _to, _value)
return True
@external
def transferFrom(_from: address, _to: address, _value: uint256) -> bool:
"""
@notice Transfer tokens from another user
@param _from User to transfer tokens from
@param _to Receiver of tokens
@param _value Amount of tokens to transfer
@dev Requires prior set allowance
"""
assert _to != empty(address) and _to != self
if _value > 0:
allowance: uint256 = self.allowance[_from][msg.sender]
if allowance < max_value(uint256):
self.allowance[_from][msg.sender] = allowance - _value
self.balanceOf[_from] -= _value
self.balanceOf[_to] += _value
log Transfer(_from, _to, _value)
return True
@external
def approve(_spender: address, _value: uint256) -> bool:
"""
@notice Approve another user to spend your tokens
@param _spender Spender
@param _value Amount of tokens allowed to be spent
"""
assert _spender != empty(address)
self.allowance[msg.sender][_spender] = _value
log Approval(msg.sender, _spender, _value)
return TrueContract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"name":"Transfer","inputs":[{"name":"sender","type":"address","indexed":true},{"name":"receiver","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true},{"name":"spender","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_token","type":"address"},{"name":"_voting_escrow","type":"address"},{"name":"_proxy","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_amount","type":"uint256"},{"name":"_receiver","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_receiver","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"extend_lock","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"voting_escrow","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"proxy","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8"}]},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}]}]Contract Creation Code
61083a5150346100985760206108ac5f395f518060a01c6100985760405260206108cc5f395f518060a01c6100985760605260206108ec5f395f518060a01c610098576080526040516107fa5260605161081a5260805161083a52335f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f60a052602060a0a36107fa61009c6100003961085a610000f35b5f80fd5f3560e01c6002600e820660011b6107de01601e395f51565b63fc0c546a811861003657346107da5760206107fa60403960206040f35b63e61680d4811861074957346107da57602061083a5f395f5163622b6d966040525f60605242631206420081018181106107da579050608052803b156107da575f60406044605c5f855af161008d573d5f5f3e3d5ffd5b5000610749565b63dfe05031811861074957346107da57602061081a60403960206040f3610749565b63ec55688981186100d457346107da57602061083a60403960206040f35b6370a082318118610749576024361034176107da576004358060a01c6107da5760405260016040516020525f5260405f205460605260206060f3610749565b6318160ddd811861012e57346107da575f5460405260206040f35b63313ce567811861074957346107da57601260405260206040f3610749565b63dd62ed3e8118610749576044361034176107da576004358060a01c6107da576040526024358060a01c6107da5760605260026040516020525f5260405f20806060516020525f5260405f2090505460805260206080f3610749565b6306fdde03811861022757346107da57602080608052600e6040527f315550204c6f636b65642059464900000000000000000000000000000000000060605260408160800181518152602082015160208201528051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506080f35b636e553f658118610343576044361034176107da576024358060a01c6107da5760a0525b60043562010f2c81028162010f2c8204186107da57905060c05260c05160405260a05160605261027961074d565b60206107fa5f395f516323b872dd60e0523361010052602061083a6101203960043561014052602060e0606460fc5f855af16102b7573d5f5f3e3d5ffd5b3d6102ce57803b156107da576001610160526102e6565b60203d106107da5760e0518060011c6107da57610160525b610160905051156107da57602061083a5f395f5163622b6d9660e0526004356101005242631206420081018181106107da57905061012052803b156107da575f60e0604460fc5f855af161033c573d5f5f3e3d5ffd5b50602060c0f35b63a9059cbb8118610749576044361034176107da576004358060a01c6107da57604052604051156103795730604051141561037b565b5f5b156107da57602435156103cf576001336020525f5260405f2080546024358082038281116107da579050905081555060016040516020525f5260405f2080546024358082018281106107da57905090508155505b604051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3600160605260206060f3610749565b6395d89b41811861048c57346107da5760208060805260056040527f757059464900000000000000000000000000000000000000000000000000000060605260408160800181518152602082015160208201528051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506080f35b631249c58b811861074957346107da573360a05261064156610749565b63b6b55f2581186104c7576024361034176107da573360a05261024b565b6323b872dd8118610749576064361034176107da576004358060a01c6107da576040526024358060a01c6107da576060526060511561050b5730606051141561050d565b5f5b156107da57604435156105dc5760026040516020525f5260405f2080336020525f5260405f209050546080527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60805114610593576080516044358082038281116107da579050905060026040516020525f5260405f2080336020525f5260405f209050555b60016040516020525f5260405f2080546044358082038281116107da579050905081555060016060516020525f5260405f2080546044358082018281106107da57905090508155505b6060516040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60443560805260206080a3600160805260206080f3610749565b636a6278428118610749576024361034176107da576004358060a01c6107da5760a0525b602061081a5f395f5163cbf9fe5f60e052602061083a61010039602060e0602460fc845afa610672573d5f5f3e3d5ffd5b60203d106107da5760e090505162010f2c81028162010f2c8204186107da5790505f548082038281116107da579050905060c05260c05160405260a0516060526106ba61074d565b602060c0f3610749565b63095ea7b38118610749576044361034176107da576004358060a01c6107da57604052604051156107da576024356002336020525f5260405f20806040516020525f5260405f20905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b5f5ffd5b604051156107da57606051156107685730606051141561076a565b5f5b156107da575f546040518082018281106107da57905090505f5560016060516020525f5260405f2080546040518082018281106107da57905090508155506060515f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160805260206080a3565b5f80fd074906c4074901a900180113014d00b6061d04a9074900940749040e841907fa81181c1860a16576797065728300030a00160000000000000000000000000bc529c00c6401aef6d220be8c6ea1667f6ad93e00000000000000000000000090c1f9220d90d3966fbee24045edd73e1d588ad5000000000000000000000000242521ca01f330f050a65ff5b8ebbe92198ae64f
Deployed Bytecode
0x5f3560e01c6002600e820660011b6107de01601e395f51565b63fc0c546a811861003657346107da5760206107fa60403960206040f35b63e61680d4811861074957346107da57602061083a5f395f5163622b6d966040525f60605242631206420081018181106107da579050608052803b156107da575f60406044605c5f855af161008d573d5f5f3e3d5ffd5b5000610749565b63dfe05031811861074957346107da57602061081a60403960206040f3610749565b63ec55688981186100d457346107da57602061083a60403960206040f35b6370a082318118610749576024361034176107da576004358060a01c6107da5760405260016040516020525f5260405f205460605260206060f3610749565b6318160ddd811861012e57346107da575f5460405260206040f35b63313ce567811861074957346107da57601260405260206040f3610749565b63dd62ed3e8118610749576044361034176107da576004358060a01c6107da576040526024358060a01c6107da5760605260026040516020525f5260405f20806060516020525f5260405f2090505460805260206080f3610749565b6306fdde03811861022757346107da57602080608052600e6040527f315550204c6f636b65642059464900000000000000000000000000000000000060605260408160800181518152602082015160208201528051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506080f35b636e553f658118610343576044361034176107da576024358060a01c6107da5760a0525b60043562010f2c81028162010f2c8204186107da57905060c05260c05160405260a05160605261027961074d565b60206107fa5f395f516323b872dd60e0523361010052602061083a6101203960043561014052602060e0606460fc5f855af16102b7573d5f5f3e3d5ffd5b3d6102ce57803b156107da576001610160526102e6565b60203d106107da5760e0518060011c6107da57610160525b610160905051156107da57602061083a5f395f5163622b6d9660e0526004356101005242631206420081018181106107da57905061012052803b156107da575f60e0604460fc5f855af161033c573d5f5f3e3d5ffd5b50602060c0f35b63a9059cbb8118610749576044361034176107da576004358060a01c6107da57604052604051156103795730604051141561037b565b5f5b156107da57602435156103cf576001336020525f5260405f2080546024358082038281116107da579050905081555060016040516020525f5260405f2080546024358082018281106107da57905090508155505b604051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3600160605260206060f3610749565b6395d89b41811861048c57346107da5760208060805260056040527f757059464900000000000000000000000000000000000000000000000000000060605260408160800181518152602082015160208201528051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506080f35b631249c58b811861074957346107da573360a05261064156610749565b63b6b55f2581186104c7576024361034176107da573360a05261024b565b6323b872dd8118610749576064361034176107da576004358060a01c6107da576040526024358060a01c6107da576060526060511561050b5730606051141561050d565b5f5b156107da57604435156105dc5760026040516020525f5260405f2080336020525f5260405f209050546080527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60805114610593576080516044358082038281116107da579050905060026040516020525f5260405f2080336020525f5260405f209050555b60016040516020525f5260405f2080546044358082038281116107da579050905081555060016060516020525f5260405f2080546044358082018281106107da57905090508155505b6060516040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60443560805260206080a3600160805260206080f3610749565b636a6278428118610749576024361034176107da576004358060a01c6107da5760a0525b602061081a5f395f5163cbf9fe5f60e052602061083a61010039602060e0602460fc845afa610672573d5f5f3e3d5ffd5b60203d106107da5760e090505162010f2c81028162010f2c8204186107da5790505f548082038281116107da579050905060c05260c05160405260a0516060526106ba61074d565b602060c0f3610749565b63095ea7b38118610749576044361034176107da576004358060a01c6107da57604052604051156107da576024356002336020525f5260405f20806040516020525f5260405f20905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b5f5ffd5b604051156107da57606051156107685730606051141561076a565b5f5b156107da575f546040518082018281106107da57905090505f5560016060516020525f5260405f2080546040518082018281106107da57905090508155506060515f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160805260206080a3565b5f80fd074906c4074901a900180113014d00b6061d04a9074900940749040e0000000000000000000000000bc529c00c6401aef6d220be8c6ea1667f6ad93e00000000000000000000000090c1f9220d90d3966fbee24045edd73e1d588ad5000000000000000000000000242521ca01f330f050a65ff5b8ebbe92198ae64f
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000bc529c00c6401aef6d220be8c6ea1667f6ad93e00000000000000000000000090c1f9220d90d3966fbee24045edd73e1d588ad5000000000000000000000000242521ca01f330f050a65ff5b8ebbe92198ae64f
-----Decoded View---------------
Arg [0] : _token (address): 0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e
Arg [1] : _voting_escrow (address): 0x90c1f9220d90d3966FbeE24045EDd73E1d588aD5
Arg [2] : _proxy (address): 0x242521ca01f330F050a65FF5B8Ebbe92198Ae64F
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000bc529c00c6401aef6d220be8c6ea1667f6ad93e
Arg [1] : 00000000000000000000000090c1f9220d90d3966fbee24045edd73e1d588ad5
Arg [2] : 000000000000000000000000242521ca01f330f050a65ff5b8ebbe92198ae64f
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.