ERC-20
Yearn
Overview
Max Total Supply
70,335,128.21624784170327375 yCRV
Holders
328 (0.00%)
Market
Price
$0.25 @ 0.000086 ETH (+0.04%)
Onchain Market Cap
$17,533,562.77
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000000000000000001 yCRVValue
$0.00 ( ~0 Eth) [0.0000%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.3.7
Contract Source Code (Vyper language format)
# @version 0.3.7 from vyper.interfaces import ERC20 from vyper.interfaces import ERC20Detailed implements: ERC20 implements: ERC20Detailed event Transfer: sender: indexed(address) receiver: indexed(address) value: uint256 event Mint: minter: indexed(address) receiver: indexed(address) burned: indexed(bool) value: uint256 event Approval: owner: indexed(address) spender: indexed(address) value: uint256 event UpdateSweepRecipient: sweep_recipient: indexed(address) YVECRV: constant(address) = 0xc5bDdf9843308380375a611c18B50Fb9341f502A CRV: constant(address) = 0xD533a949740bb3306d119CC777fa900bA034cd52 VOTER: constant(address) = 0xF147b8125d2ef93FB6965Db97D6746952a133934 name: public(String[32]) symbol: public(String[32]) decimals: public(uint8) balanceOf: public(HashMap[address, uint256]) allowance: public(HashMap[address, HashMap[address, uint256]]) totalSupply: public(uint256) burned: public(uint256) sweep_recipient: public(address) @external def __init__(): self.name = "Yearn CRV" self.symbol = "yCRV" self.decimals = 18 self.sweep_recipient = 0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52 @external def transfer(_to : address, _value : uint256) -> bool: """ @dev Transfer token for a specified address @param _to The address to transfer to. @param _value The amount to be transferred. """ 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: """ @dev Transfer tokens from one address to another. @param _from address The address which you want to send tokens from @param _to address The address which you want to transfer to @param _value uint256 the amount of tokens to be transferred """ self.balanceOf[_from] -= _value self.balanceOf[_to] += _value self.allowance[_from][msg.sender] -= _value log Transfer(_from, _to, _value) return True @external def approve(_spender : address, _value : uint256) -> bool: """ @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. @param _spender The address which will spend the funds. @param _value The amount of tokens to be spent. """ self.allowance[msg.sender][_spender] = _value log Approval(msg.sender, _spender, _value) return True @internal def _mint(_to: address, _value: uint256): self.totalSupply += _value self.balanceOf[_to] += _value log Transfer(empty(address), _to, _value) @external def mint(_amount: uint256 = max_value(uint256), _recipient: address = msg.sender) -> uint256: """ @notice Donate any amount of CRV to mint yCRV 1 to 1. Donations are non-redeemable, and will be locked forever. @param _amount The desired amount of CRV to burn and yCRV to mint. @param _recipient The address which minted tokens should be received at. """ assert _recipient not in [self, empty(address)] amount: uint256 = _amount if amount == max_value(uint256): amount = ERC20(CRV).balanceOf(msg.sender) assert amount > 0 assert ERC20(CRV).transferFrom(msg.sender, VOTER, amount) # dev: no allowance self._mint(_recipient, amount) log Mint(msg.sender, _recipient, False, amount) return amount @external def burn_to_mint(_amount: uint256 = max_value(uint256), _recipient: address = msg.sender) -> uint256: """ @dev burn an amount of yveCRV token and mint yCRV token 1 to 1. @param _amount The amount of yveCRV to burn and yCRV to mint. @param _recipient The address which minted tokens should be received at. """ assert _recipient not in [self, empty(address)] amount: uint256 = _amount if amount == max_value(uint256): amount = ERC20(YVECRV).balanceOf(msg.sender) assert amount > 0 assert ERC20(YVECRV).transferFrom(msg.sender, self, amount) # dev: no allowance self.burned += amount self._mint(_recipient, amount) log Mint(msg.sender, _recipient, True, amount) return amount @external def set_sweep_recipient(_proposed_recipient: address): assert msg.sender == self.sweep_recipient self.sweep_recipient = _proposed_recipient log UpdateSweepRecipient(_proposed_recipient) @external def sweep(_token: address, _amount: uint256 = max_value(uint256)): assert msg.sender == self.sweep_recipient assert _token != YVECRV amount: uint256 = _amount if amount == max_value(uint256): amount = ERC20(_token).balanceOf(self) assert amount > 0 assert ERC20(_token).transfer(self.sweep_recipient, amount, default_return_value=True) @external def sweep_yvecrv(): assert msg.sender == self.sweep_recipient excess: uint256 = ERC20(YVECRV).balanceOf(self) - self.burned assert excess > 0 ERC20(YVECRV).transfer(self.sweep_recipient, excess)
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"Mint","inputs":[{"name":"minter","type":"address","indexed":true},{"name":"receiver","type":"address","indexed":true},{"name":"burned","type":"bool","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"},{"name":"UpdateSweepRecipient","inputs":[{"name":"sweep_recipient","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","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":"nonpayable","type":"function","name":"mint","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_amount","type":"uint256"},{"name":"_recipient","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"burn_to_mint","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"burn_to_mint","inputs":[{"name":"_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"burn_to_mint","inputs":[{"name":"_amount","type":"uint256"},{"name":"_recipient","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"set_sweep_recipient","inputs":[{"name":"_proposed_recipient","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"sweep","inputs":[{"name":"_token","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"sweep","inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"sweep_yvecrv","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8"}]},{"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":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"burned","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"sweep_recipient","inputs":[],"outputs":[{"name":"","type":"address"}]}]
Contract Creation Code
34610b575760096040527f596561726e204352560000000000000000000000000000000000000000000000606052604080518060005560208201805160015550505060046040527f79435256000000000000000000000000000000000000000000000000000000006060526040805180600255602082018051600355505050601260045573feb4acf3df3cdea7399794d0869ef76a6efaff52600955610aa96100ad61000039610aa9610000f36003361161000c57610a21565b60003560e01c34610a975763a9059cbb81186100bd5760443610610a97576004358060a01c610a975760405260053360205260005260406000208054602435808203828111610a975790509050815550600560405160205260005260406000208054602435808201828110610a975790509050815550604051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3600160605260206060f35b6323b872dd81186101aa5760643610610a97576004358060a01c610a97576040526024358060a01c610a9757606052600560405160205260005260406000208054604435808203828111610a975790509050815550600560605160205260005260406000208054604435808201828110610a975790509050815550600660405160205260005260406000208033602052600052604060002090508054604435808203828111610a9757905090508155506060516040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60443560805260206080a3600160805260206080f35b63095ea7b381186102295760443610610a97576004358060a01c610a97576040526024356006336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b631249c58b81186102695760043610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a0523360c0526102b3565b63a0712d68811861028b5760243610610a975760043560a0523360c0526102b3565b6394bf804d81186104025760443610610a975760043560a0526024358060a01c610a975760c0525b60c0513081146102c5578015156102c8565b60005b905015610a975760a05160e05260e0511961032b576370a082316101005233610120526020610100602461011c73d533a949740bb3306d119cc777fa900ba034cd525afa61031b573d600060003e3d6000fd5b60203d10610a97576101005160e0525b60e05115610a97576323b872dd61010052336101205273f147b8125d2ef93fb6965db97d6746952a1339346101405260e051610160526020610100606461011c600073d533a949740bb3306d119cc777fa900ba034cd525af1610393573d600060003e3d6000fd5b60203d10610a9757610100518060011c610a9757610180526101805115610a975760c05160405260e0516060526103c8610a27565b600060c051337f6e68020828492dc2cff67ca17a03bb572aae3d0c743a404696b93bc16c0a1a2a60e051610100526020610100a4602060e0f35b635ff2a15f81186104425760043610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a0523360c05261048c565b63dddb637f81186104645760243610610a975760043560a0523360c05261048c565b63795c252181186105de5760443610610a975760043560a0526024358060a01c610a975760c0525b60c05130811461049e578015156104a1565b60005b905015610a975760a05160e05260e05119610504576370a082316101005233610120526020610100602461011c73c5bddf9843308380375a611c18b50fb9341f502a5afa6104f4573d600060003e3d6000fd5b60203d10610a97576101005160e0525b60e05115610a97576323b872dd610100523361012052306101405260e051610160526020610100606461011c600073c5bddf9843308380375a611c18b50fb9341f502a5af1610558573d600060003e3d6000fd5b60203d10610a9757610100518060011c610a9757610180526101805115610a975760085460e051808201828110610a97579050905060085560c05160405260e0516060526105a4610a27565b600160c051337f6e68020828492dc2cff67ca17a03bb572aae3d0c743a404696b93bc16c0a1a2a60e051610100526020610100a4602060e0f35b63304ad66281186106395760243610610a97576004358060a01c610a97576040526009543318610a97576040516009556040517f9e3ed1b4f392c7b0c322e2f6fd1bc5889ab0a01ca356a09f62332acea07beca160006060a2005b6301681a6281186106755760243610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60605261068f565b636ea056a981186107825760443610610a97576024356060525b6004358060a01c610a97576040526009543318610a975773c5bddf9843308380375a611c18b50fb9341f502a60405114610a97576060516080526080511961070b576040516370a0823160a0523060c052602060a0602460bc845afa6106fa573d600060003e3d6000fd5b60203d10610a975760a09050516080525b60805115610a975760405163a9059cbb60a05260095460c05260805160e052602060a0604460bc6000855af1610746573d600060003e3d6000fd5b3d61075d57803b15610a9757600161010052610775565b60203d10610a975760a0518060011c610a9757610100525b61010090505115610a9757005b6318880ddd811861085e5760043610610a97576009543318610a97576370a0823160605230608052602060606024607c73c5bddf9843308380375a611c18b50fb9341f502a5afa6107d8573d600060003e3d6000fd5b60203d10610a9757606051600854808203828111610a97579050905060405260405115610a975763a9059cbb60605260095460805260405160a052602060606044607c600073c5bddf9843308380375a611c18b50fb9341f502a5af1610843573d600060003e3d6000fd5b60203d10610a97576060518060011c610a975760c05260c050005b6306fdde0381186108b65760043610610a97576020806040528060400160005480825260208201600154815250508051806020830101601f82600003163682375050601f19601f825160200101169050810190506040f35b6395d89b41811861090e5760043610610a97576020806040528060400160025480825260208201600354815250508051806020830101601f82600003163682375050601f19601f825160200101169050810190506040f35b63313ce567811861092d5760043610610a975760045460405260206040f35b6370a0823181186109685760243610610a97576004358060a01c610a9757604052600560405160205260005260406000205460605260206060f35b63dd62ed3e81186109c25760443610610a97576004358060a01c610a97576040526024358060a01c610a97576060526006604051602052600052604060002080606051602052600052604060002090505460805260206080f35b6318160ddd81186109e15760043610610a975760075460405260206040f35b6373f425618118610a005760043610610a975760085460405260206040f35b63168861678118610a1f5760043610610a975760095460405260206040f35b505b60006000fd5b600754606051808201828110610a975790509050600755600560405160205260005260406000208054606051808201828110610a97579050905081555060405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60605160805260206080a3565b600080fda165767970657283000307000b005b600080fd
Deployed Bytecode
0x6003361161000c57610a21565b60003560e01c34610a975763a9059cbb81186100bd5760443610610a97576004358060a01c610a975760405260053360205260005260406000208054602435808203828111610a975790509050815550600560405160205260005260406000208054602435808201828110610a975790509050815550604051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60243560605260206060a3600160605260206060f35b6323b872dd81186101aa5760643610610a97576004358060a01c610a97576040526024358060a01c610a9757606052600560405160205260005260406000208054604435808203828111610a975790509050815550600560605160205260005260406000208054604435808201828110610a975790509050815550600660405160205260005260406000208033602052600052604060002090508054604435808203828111610a9757905090508155506060516040517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60443560805260206080a3600160805260206080f35b63095ea7b381186102295760443610610a97576004358060a01c610a97576040526024356006336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b631249c58b81186102695760043610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a0523360c0526102b3565b63a0712d68811861028b5760243610610a975760043560a0523360c0526102b3565b6394bf804d81186104025760443610610a975760043560a0526024358060a01c610a975760c0525b60c0513081146102c5578015156102c8565b60005b905015610a975760a05160e05260e0511961032b576370a082316101005233610120526020610100602461011c73d533a949740bb3306d119cc777fa900ba034cd525afa61031b573d600060003e3d6000fd5b60203d10610a97576101005160e0525b60e05115610a97576323b872dd61010052336101205273f147b8125d2ef93fb6965db97d6746952a1339346101405260e051610160526020610100606461011c600073d533a949740bb3306d119cc777fa900ba034cd525af1610393573d600060003e3d6000fd5b60203d10610a9757610100518060011c610a9757610180526101805115610a975760c05160405260e0516060526103c8610a27565b600060c051337f6e68020828492dc2cff67ca17a03bb572aae3d0c743a404696b93bc16c0a1a2a60e051610100526020610100a4602060e0f35b635ff2a15f81186104425760043610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a0523360c05261048c565b63dddb637f81186104645760243610610a975760043560a0523360c05261048c565b63795c252181186105de5760443610610a975760043560a0526024358060a01c610a975760c0525b60c05130811461049e578015156104a1565b60005b905015610a975760a05160e05260e05119610504576370a082316101005233610120526020610100602461011c73c5bddf9843308380375a611c18b50fb9341f502a5afa6104f4573d600060003e3d6000fd5b60203d10610a97576101005160e0525b60e05115610a97576323b872dd610100523361012052306101405260e051610160526020610100606461011c600073c5bddf9843308380375a611c18b50fb9341f502a5af1610558573d600060003e3d6000fd5b60203d10610a9757610100518060011c610a9757610180526101805115610a975760085460e051808201828110610a97579050905060085560c05160405260e0516060526105a4610a27565b600160c051337f6e68020828492dc2cff67ca17a03bb572aae3d0c743a404696b93bc16c0a1a2a60e051610100526020610100a4602060e0f35b63304ad66281186106395760243610610a97576004358060a01c610a97576040526009543318610a97576040516009556040517f9e3ed1b4f392c7b0c322e2f6fd1bc5889ab0a01ca356a09f62332acea07beca160006060a2005b6301681a6281186106755760243610610a97577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60605261068f565b636ea056a981186107825760443610610a97576024356060525b6004358060a01c610a97576040526009543318610a975773c5bddf9843308380375a611c18b50fb9341f502a60405114610a97576060516080526080511961070b576040516370a0823160a0523060c052602060a0602460bc845afa6106fa573d600060003e3d6000fd5b60203d10610a975760a09050516080525b60805115610a975760405163a9059cbb60a05260095460c05260805160e052602060a0604460bc6000855af1610746573d600060003e3d6000fd5b3d61075d57803b15610a9757600161010052610775565b60203d10610a975760a0518060011c610a9757610100525b61010090505115610a9757005b6318880ddd811861085e5760043610610a97576009543318610a97576370a0823160605230608052602060606024607c73c5bddf9843308380375a611c18b50fb9341f502a5afa6107d8573d600060003e3d6000fd5b60203d10610a9757606051600854808203828111610a97579050905060405260405115610a975763a9059cbb60605260095460805260405160a052602060606044607c600073c5bddf9843308380375a611c18b50fb9341f502a5af1610843573d600060003e3d6000fd5b60203d10610a97576060518060011c610a975760c05260c050005b6306fdde0381186108b65760043610610a97576020806040528060400160005480825260208201600154815250508051806020830101601f82600003163682375050601f19601f825160200101169050810190506040f35b6395d89b41811861090e5760043610610a97576020806040528060400160025480825260208201600354815250508051806020830101601f82600003163682375050601f19601f825160200101169050810190506040f35b63313ce567811861092d5760043610610a975760045460405260206040f35b6370a0823181186109685760243610610a97576004358060a01c610a9757604052600560405160205260005260406000205460605260206060f35b63dd62ed3e81186109c25760443610610a97576004358060a01c610a97576040526024358060a01c610a97576060526006604051602052600052604060002080606051602052600052604060002090505460805260206080f35b6318160ddd81186109e15760043610610a975760075460405260206040f35b6373f425618118610a005760043610610a975760085460405260206040f35b63168861678118610a1f5760043610610a975760095460405260206040f35b505b60006000fd5b600754606051808201828110610a975790509050600755600560405160205260005260406000208054606051808201828110610a97579050905081555060405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60605160805260206080a3565b600080fda165767970657283000307000b
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.