ETH Price: $2,003.21 (+0.74%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set_management176356932023-07-06 15:28:23625 days ago1688657303IN
0x929401e3...2BaB04478
0 ETH0.0017430437.06320762
Approve176345392023-07-06 11:34:35625 days ago1688643275IN
0x929401e3...2BaB04478
0 ETH0.0015186231.26090603
Approve176344162023-07-06 11:08:59625 days ago1688641739IN
0x929401e3...2BaB04478
0 ETH0.0011750621.89832051
Approve176343522023-07-06 10:56:11625 days ago1688640971IN
0x929401e3...2BaB04478
0 ETH0.0011250323.16460998
Approve176343482023-07-06 10:55:23625 days ago1688640923IN
0x929401e3...2BaB04478
0 ETH0.001206624.81147593
Approve176343442023-07-06 10:54:35625 days ago1688640875IN
0x929401e3...2BaB04478
0 ETH0.0011413823.4829459

Latest 12 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer214725272024-12-24 13:08:3588 days ago1735045715
0x929401e3...2BaB04478
50 ETH
Receive_native214725272024-12-24 13:08:3588 days ago1735045715
0x929401e3...2BaB04478
50 ETH
Transfer210297912024-10-23 17:30:11150 days ago1729704611
0x929401e3...2BaB04478
50 ETH
Transfer210297912024-10-23 17:30:11150 days ago1729704611
0x929401e3...2BaB04478
50 ETH
Transfer209190442024-10-08 6:24:11165 days ago1728368651
0x929401e3...2BaB04478
50 ETH
Receive_native209190442024-10-08 6:24:11165 days ago1728368651
0x929401e3...2BaB04478
50 ETH
Transfer204934722024-08-09 20:36:11225 days ago1723235771
0x929401e3...2BaB04478
50 ETH
Receive_native204934722024-08-09 20:36:11225 days ago1723235771
0x929401e3...2BaB04478
50 ETH
Transfer204770182024-08-07 13:33:11227 days ago1723037591
0x929401e3...2BaB04478
100 ETH
Receive_native204770182024-08-07 13:33:11227 days ago1723037591
0x929401e3...2BaB04478
100 ETH
Transfer179137892023-08-14 14:49:23586 days ago1692024563
0x929401e3...2BaB04478
210.18315187 ETH
Transfer178570232023-08-06 16:11:23594 days ago1691338283
0x929401e3...2BaB04478
210.18315187 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Protocol Owned Liquidity

Compiler Version
vyper:0.3.7

Optimization Enabled:
N/A

Other Settings:
paris EvmVersion, GNU AGPLv3 license

Contract Source Code (Vyper language format)

# @version 0.3.7
"""
@title Protocol Owned Liquidity
@author 0xkorin, Yearn Finance
@license Copyright (c) Yearn Finance, 2023 - all rights reserved
@notice
    Contract to manage the protocol owned liquidity.
    Actual operations are implemented in individual modules, this contract only serves to 
    manage its permissions. Modules can be approved to mint or burn yETH, receive ETH and receive tokens.
    yETH can only be minted up to the debt ceiling, which is determined by the amount of ETH deposited
"""

from vyper.interfaces import ERC20

interface Token:
    def mint(_account: address, _amount: uint256): nonpayable
    def burn(_account: address, _amount: uint256): nonpayable

token: public(immutable(address))
management: public(address)
pending_management: public(address)
available: public(uint256)
debt: public(uint256)
native_allowance: public(HashMap[address, uint256])
mint_allowance: public(HashMap[address, uint256])
burn_allowance: public(HashMap[address, uint256])
killed: public(bool)

NATIVE: constant(address) = 0x0000000000000000000000000000000000000000
MINT: constant(address)   = 0x0000000000000000000000000000000000000001
BURN: constant(address)   = 0x0000000000000000000000000000000000000002

event Mint:
    account: indexed(address)
    amount: uint256

event Burn:
    account: indexed(address)
    amount: uint256

event Approve:
    token: indexed(address)
    spender: indexed(address)
    amount: uint256

event PendingManagement:
    management: indexed(address)

event SetManagement:
    management: indexed(address)

event Kill: pass

@external
def __init__(_token: address):
    """
    @notice Constructor
    @param _token yETH token address
    """
    token = _token
    self.management = msg.sender

@external
@payable
def __default__():
    """
    @notice Receive ETH and raise debt ceiling
    """
    self.available += msg.value
    pass

@external
@payable
def receive_native():
    """
    @notice Receive ETH without raising the debt ceiling
    @dev Modules should use this when sending back previously received ETH
    """
    pass

@external
def send_native(_receiver: address, _amount: uint256):
    """
    @notice Send ETH
    @param _receiver Account to send the ETH to
    @param _amount Amount of ETH to send
    @dev Requires prior permission by management
    """
    assert _amount > 0
    self.native_allowance[msg.sender] -= _amount
    raw_call(_receiver, b"", value=_amount)

@external
def mint(_amount: uint256):
    """
    @notice Mint yETH
    @param _amount Amount of ETH to mint
    @dev Cannot mint more than the debt ceiling
    @dev Requires prior permission by management
    """
    assert _amount > 0
    assert not self.killed
    self.mint_allowance[msg.sender] -= _amount
    debt: uint256 = self.debt + _amount
    assert debt <= self.available
    self.debt = debt
    Token(token).mint(self, _amount)
    log Mint(msg.sender, _amount)

@external
def burn(_amount: uint256):
    """
    @notice Burn yETH
    @param _amount Amount of yETH to burn
    @dev Requires prior permission by management
    """
    assert _amount > 0
    self.burn_allowance[msg.sender] -= _amount
    self.debt -= _amount
    Token(token).burn(self, _amount)
    log Burn(msg.sender, _amount)

# MANAGEMENT FUNCTIONS

@external
def set_management(_management: address):
    """
    @notice 
        Set the pending management address.
        Needs to be accepted by that account separately to transfer management over
    @param _management New pending management address
    """
    assert msg.sender == self.management
    self.pending_management = _management
    log PendingManagement(_management)

@external
def accept_management():
    """
    @notice 
        Accept management role.
        Can only be called by account previously marked as pending management by current management
    """
    assert msg.sender == self.pending_management
    self.pending_management = empty(address)
    self.management = msg.sender
    log SetManagement(msg.sender)

@external
def approve(_token: address, _spender: address, _amount: uint256):
    """
    @notice Approve `_spender` to spend `_amount` of `_token` from the POL
    @param _token
        Token to give approval for.
        Use special designated values to set minting/burning/native allowances
    @param _spender Account to give approvel to
    @param _amount Amount of tokens to approve
    """
    self._approve(_token, _spender, _amount)

@external
def increase_allowance(_token: address, _spender: address, _amount: uint256):
    """
    @notice Increase `_spender`s allowance to spend `_token` by `_amount`
    @param _token 
        Token to give increase in allowance for.
        Use special designated values to set minting/burning/native allowances
    @param _spender Account to increase in allowance of
    @param _amount Amount to increase allowance by
    """
    allowance: uint256 = 0
    if _token == NATIVE:
        allowance = self.native_allowance[_spender]
    elif _token == MINT:
        allowance = self.mint_allowance[_spender]
    elif _token == BURN:
        allowance = self.burn_allowance[_spender]
    else:
        allowance = ERC20(_token).allowance(self, _spender)

    self._approve(_token, _spender, allowance + _amount)

@external
def decrease_allowance(_token: address, _spender: address, _amount: uint256):
    """
    @notice Decrease `_spender`s allowance to spend `_token` by `_amount`
    @param _token
        Token to decrease allowance for.
        Use special designated values to set minting/burning/native allowances
    @param _spender Account to decrease allowance of
    @param _amount Amount to decrease allowance by
    @dev If decrease is larger than current allowance, it will be set to zero
    """
    allowance: uint256 = 0
    if _token == NATIVE:
        allowance = self.native_allowance[_spender]
    elif _token == MINT:
        allowance = self.mint_allowance[_spender]
    elif _token == BURN:
        allowance = self.burn_allowance[_spender]
    else:
        allowance = ERC20(_token).allowance(self, _spender)

    if _amount > allowance:
        allowance = 0
    else:
        allowance -= _amount
    self._approve(_token, _spender, allowance)

@internal
def _approve(_token: address, _spender: address, _amount: uint256):
    """
    @notice Approve `_spender` to spend `_amount` of `_token` from the POL
    @param _token
        Token to give approval for.
        Use special designated values to set minting/burning/native allowances
    @param _spender Account to give approvel to
    @param _amount Amount of tokens to approve
    """
    assert msg.sender == self.management
    if _token == NATIVE:
        self.native_allowance[_spender] = _amount
    elif _token == MINT:
        self.mint_allowance[_spender] = _amount
    elif _token == BURN:
        self.burn_allowance[_spender] = _amount
    else:
        ERC20(_token).approve(_spender, _amount)
    log Approve(_token, _spender, _amount)

@external
def kill():
    """
    @notice Kill the POL, permanently disabling yETH minting
    """
    assert msg.sender == self.management
    self.killed = True
    log Kill()

Contract Security Audit

Contract ABI

API
[{"name":"Mint","inputs":[{"name":"account","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Burn","inputs":[{"name":"account","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approve","inputs":[{"name":"token","type":"address","indexed":true},{"name":"spender","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"PendingManagement","inputs":[{"name":"management","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"SetManagement","inputs":[{"name":"management","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"Kill","inputs":[],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_token","type":"address"}],"outputs":[]},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"function","name":"receive_native","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"send_native","inputs":[{"name":"_receiver","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"burn","inputs":[{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_management","inputs":[{"name":"_management","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"accept_management","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_token","type":"address"},{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"increase_allowance","inputs":[{"name":"_token","type":"address"},{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"decrease_allowance","inputs":[{"name":"_token","type":"address"},{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"kill","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"management","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"pending_management","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"available","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"debt","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"native_allowance","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"mint_allowance","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"burn_allowance","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"killed","inputs":[],"outputs":[{"name":"","type":"bool"}]}]

60206109096000396000518060a01c6109045760405234610904576040516108cc52336000556108cc610037610000396108ec610000f36003361161000c576107b0565b60003560e01c63123302eb811861002757600436106108ba57005b63beec2e0a81186100a357604436106108ba576004358060a01c6108ba57604052346108ba57602435156108ba57600433602052600052604060002080546024358082038281116108ba579050905081555060006060526060506000600060605160806024356040515af16100a1573d600060003e3d6000fd5b005b63a0712d68811861018657602436106108ba57346108ba57600435156108ba576007546108ba57600533602052600052604060002080546004358082038281116108ba57905090508155506003546004358082018281106108ba5790509050604052600254604051116108ba5760405160035560206108cc6000396000516340c10f196060523060805260043560a052803b156108ba57600060606044607c6000855af1610156573d600060003e3d6000fd5b50337f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688560043560605260206060a2005b6342966c68811861025157602436106108ba57346108ba57600435156108ba57600633602052600052604060002080546004358082038281116108ba57905090508155506003546004358082038281116108ba579050905060035560206108cc600039600051639dc29fac60405230606052600435608052803b156108ba57600060406044605c6000855af1610221573d600060003e3d6000fd5b50337fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca560043560405260206040a2005b63fd066ecc81186102b157602436106108ba576004358060a01c6108ba57604052346108ba5760005433186108ba576040516001556040517fe7b5cc087e6e47e33e86bdfe4720b7e849891938b18ff6e0c3f92299de79e60c60006060a2005b63759be10c811861030457600436106108ba57346108ba5760015433186108ba57600060015533600055337fafe23f9e1f603b288748a507d5a993957e9f14313a5889d5a070851299939d5960006040a2005b63e1f21c67811861035857606436106108ba576004358060a01c6108ba57610120526024358060a01c6108ba5761014052346108ba5761012051604052610140516060526044356080526103566107c7565b005b63d479f5d5811861047c57606436106108ba576004358060a01c6108ba57610120526024358060a01c6108ba5761014052346108ba57600061016052610120516103b7576004610140516020526000526040600020546101605261044c565b600161012051186103dd576005610140516020526000526040600020546101605261044c565b60026101205118610403576006610140516020526000526040600020546101605261044c565b6101205163dd62ed3e61018052306101a052610140516101c0526020610180604461019c845afa610439573d600060003e3d6000fd5b60203d106108ba57610180905051610160525b6101205160405261014051606052610160516044358082018281106108ba579050905060805261047a6107c7565b005b63ac7fd92e81186105c057606436106108ba576004358060a01c6108ba57610120526024358060a01c6108ba5761014052346108ba57600061016052610120516104db5760046101405160205260005260406000205461016052610570565b600161012051186105015760056101405160205260005260406000205461016052610570565b600261012051186105275760066101405160205260005260406000205461016052610570565b6101205163dd62ed3e61018052306101a052610140516101c0526020610180604461019c845afa61055d573d600060003e3d6000fd5b60203d106108ba57610180905051610160525b610160516044351161059a57610160516044358082038281116108ba5790509050610160526105a1565b6000610160525b6101205160405261014051606052610160516080526105be6107c7565b005b6341c0e1b5811861060e57600436106108ba57346108ba5760005433186108ba5760016007557fbe26733c2bf6ff3ea5ba8cfe744422bd49052ff9ed5685c9e81e6f9321dbaddd60006040a1005b63fc0c546a811861063a57600436106108ba57346108ba5760206108cc60003960005160405260206040f35b6388a8d602811861065e57600436106108ba57346108ba5760005460405260206040f35b63770817ec811861068257600436106108ba57346108ba5760015460405260206040f35b6348a0d75481186106a657600436106108ba57346108ba5760025460405260206040f35b630dca59c181186106ca57600436106108ba57346108ba5760035460405260206040f35b6307ff96da811861070a57602436106108ba576004358060a01c6108ba57604052346108ba57600460405160205260005260406000205460605260206060f35b63936f1647811861074a57602436106108ba576004358060a01c6108ba57604052346108ba57600560405160205260005260406000205460605260206060f35b63c1e63d6b811861078a57602436106108ba576004358060a01c6108ba57604052346108ba57600660405160205260005260406000205460605260206060f35b631f3a0e4181186107ae57600436106108ba57346108ba5760075460405260206040f35b505b600254348082018281106108ba5790509050600255005b60005433186108ba576040516107f0576080516004606051602052600052604060002055610886565b600160405118610813576080516005606051602052600052604060002055610886565b600260405118610836576080516006606051602052600052604060002055610886565b60405163095ea7b360a05260605160c05260805160e052602060a0604460bc6000855af1610869573d600060003e3d6000fd5b60203d106108ba5760a0518060011c6108ba576101005261010050505b6060516040517f6e11fb1b7f119e3f2fa29896ef5fdf8b8a2d0d4df6fe90ba8668e7d8b2ffa25e60805160a052602060a0a3565b600080fda165767970657283000307000b005b600080fd0000000000000000000000001bed97cbc3c24a4fb5c069c6e311a967386131f7

Deployed Bytecode

0x6003361161000c576107b0565b60003560e01c63123302eb811861002757600436106108ba57005b63beec2e0a81186100a357604436106108ba576004358060a01c6108ba57604052346108ba57602435156108ba57600433602052600052604060002080546024358082038281116108ba579050905081555060006060526060506000600060605160806024356040515af16100a1573d600060003e3d6000fd5b005b63a0712d68811861018657602436106108ba57346108ba57600435156108ba576007546108ba57600533602052600052604060002080546004358082038281116108ba57905090508155506003546004358082018281106108ba5790509050604052600254604051116108ba5760405160035560206108cc6000396000516340c10f196060523060805260043560a052803b156108ba57600060606044607c6000855af1610156573d600060003e3d6000fd5b50337f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688560043560605260206060a2005b6342966c68811861025157602436106108ba57346108ba57600435156108ba57600633602052600052604060002080546004358082038281116108ba57905090508155506003546004358082038281116108ba579050905060035560206108cc600039600051639dc29fac60405230606052600435608052803b156108ba57600060406044605c6000855af1610221573d600060003e3d6000fd5b50337fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca560043560405260206040a2005b63fd066ecc81186102b157602436106108ba576004358060a01c6108ba57604052346108ba5760005433186108ba576040516001556040517fe7b5cc087e6e47e33e86bdfe4720b7e849891938b18ff6e0c3f92299de79e60c60006060a2005b63759be10c811861030457600436106108ba57346108ba5760015433186108ba57600060015533600055337fafe23f9e1f603b288748a507d5a993957e9f14313a5889d5a070851299939d5960006040a2005b63e1f21c67811861035857606436106108ba576004358060a01c6108ba57610120526024358060a01c6108ba5761014052346108ba5761012051604052610140516060526044356080526103566107c7565b005b63d479f5d5811861047c57606436106108ba576004358060a01c6108ba57610120526024358060a01c6108ba5761014052346108ba57600061016052610120516103b7576004610140516020526000526040600020546101605261044c565b600161012051186103dd576005610140516020526000526040600020546101605261044c565b60026101205118610403576006610140516020526000526040600020546101605261044c565b6101205163dd62ed3e61018052306101a052610140516101c0526020610180604461019c845afa610439573d600060003e3d6000fd5b60203d106108ba57610180905051610160525b6101205160405261014051606052610160516044358082018281106108ba579050905060805261047a6107c7565b005b63ac7fd92e81186105c057606436106108ba576004358060a01c6108ba57610120526024358060a01c6108ba5761014052346108ba57600061016052610120516104db5760046101405160205260005260406000205461016052610570565b600161012051186105015760056101405160205260005260406000205461016052610570565b600261012051186105275760066101405160205260005260406000205461016052610570565b6101205163dd62ed3e61018052306101a052610140516101c0526020610180604461019c845afa61055d573d600060003e3d6000fd5b60203d106108ba57610180905051610160525b610160516044351161059a57610160516044358082038281116108ba5790509050610160526105a1565b6000610160525b6101205160405261014051606052610160516080526105be6107c7565b005b6341c0e1b5811861060e57600436106108ba57346108ba5760005433186108ba5760016007557fbe26733c2bf6ff3ea5ba8cfe744422bd49052ff9ed5685c9e81e6f9321dbaddd60006040a1005b63fc0c546a811861063a57600436106108ba57346108ba5760206108cc60003960005160405260206040f35b6388a8d602811861065e57600436106108ba57346108ba5760005460405260206040f35b63770817ec811861068257600436106108ba57346108ba5760015460405260206040f35b6348a0d75481186106a657600436106108ba57346108ba5760025460405260206040f35b630dca59c181186106ca57600436106108ba57346108ba5760035460405260206040f35b6307ff96da811861070a57602436106108ba576004358060a01c6108ba57604052346108ba57600460405160205260005260406000205460605260206060f35b63936f1647811861074a57602436106108ba576004358060a01c6108ba57604052346108ba57600560405160205260005260406000205460605260206060f35b63c1e63d6b811861078a57602436106108ba576004358060a01c6108ba57604052346108ba57600660405160205260005260406000205460605260206060f35b631f3a0e4181186107ae57600436106108ba57346108ba5760075460405260206040f35b505b600254348082018281106108ba5790509050600255005b60005433186108ba576040516107f0576080516004606051602052600052604060002055610886565b600160405118610813576080516005606051602052600052604060002055610886565b600260405118610836576080516006606051602052600052604060002055610886565b60405163095ea7b360a05260605160c05260805160e052602060a0604460bc6000855af1610869573d600060003e3d6000fd5b60203d106108ba5760a0518060011c6108ba576101005261010050505b6060516040517f6e11fb1b7f119e3f2fa29896ef5fdf8b8a2d0d4df6fe90ba8668e7d8b2ffa25e60805160a052602060a0a3565b600080fda165767970657283000307000b0000000000000000000000001bed97cbc3c24a4fb5c069c6e311a967386131f7

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001bed97cbc3c24a4fb5c069c6e311a967386131f7

-----Decoded View---------------
Arg [0] : _token (address): 0x1BED97CBC3c24A4fb5C069C6E311a967386131f7

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001bed97cbc3c24a4fb5c069c6e311a967386131f7


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  ]
[ 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.