Nexo customer deposit wallet from July 2018: a hardcoded owner appoints a spender, and only the spender can move the ether or tokens it holds.
Historical Significance
Nexo launched in 2018 as a lender taking crypto as collateral, and these wallets are where customers' collateral first landed. The design separates a cold, permanent authority from a hot, replaceable one: the owner key is baked into every wallet and can only name a spender, while the spender key that handles daily sweeps can be rotated without redeploying anything. That split is a common pattern in exchange and custodian deposit systems, shown here in about as few lines as it can be written.
Key Facts
Description
Each copy of this contract is a deposit address deployed by the account Etherscan labels Nexo 3, for the crypto lending platform Nexo. The wallet accepts ether through an empty payable fallback and holds whatever tokens are sent to it until an authorised key moves them.
Authority is split in two. The owner is a constant compiled into the bytecode, an address Etherscan labels Nexo: WBTC Merchant Deposit Address, so it can never change. The owner's only power is setSpender, which records a spender in the contract's single storage slot. The spender, in turn, is the only address that can call send(to, amount) to move ether or sendTokens(token, to, amount) to call transfer on any ERC20. Both take the destination as an argument. The token interface declares transfer with no return value, so the wallet works with tokens that return nothing as well as standard ones.
The first copy dates from 9 July 2018. The source was compiled with solc 0.4.24 with the optimizer on at 200 runs. The runtime code matches the deployed bytecode; only the trailing swarm metadata hash differs, because the EthereumHistory attribution comment changes the source text. Sourcify records this as a partial match and Etherscan shows it as verified.
Source Verified
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Byzantium Era
First Metropolis hard fork. Added zk-SNARK precompiles, REVERT opcode, and staticcall.
Bytecode Overview
Verified Source Available
This contract has verified source code.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
pragma solidity ^0.4.24;
contract ERC20 {
function transfer(address _to, uint256 _value) public;
}
contract NexoDepositWallet {
address public constant owner = 0x65b0BF8Ee4947edD2A500D74E50a3d757DC79de0;
address public spender;
function () public payable {}
function setSpender(address _spender) public {
require(msg.sender == owner);
spender = _spender;
}
function send(address _to, uint256 _amount) public {
require(msg.sender == spender);
_to.transfer(_amount);
}
function sendTokens(address _token, address _to, uint256 _amount) public {
require(msg.sender == spender);
ERC20(_token).transfer(_to, _amount);
}
}