Contract detail
StakedUSDeOFT
Live Robinhood Chain account facts for 0x211cc4dd…5e5fe5d2 with at least 7 observed transactions. The history total is updating as indexing continues.
- Address type
- Smart contract
- Transactions
- 7+ observed
- First indexed block
- #29382
- Latest indexed block
- #55322263
- History coverage
- Recent activity available; total is catching up
- Native balance
- 0 ETH
- Balance observed at
- Block #35691048
- Funding transaction
- 0xe30816f6…35851161 in block #42835
- ERC-20 transfers
- 1
- Emitted events
- 31
- Token tracker
- Staked USDe (sUSDe)
- Verification
- Verified
- Compiler
- v0.8.26+commit.8a97fa7a
- Verification match
- partial
- Creation transaction
- 0x00d7605b…44afb1e8
- Created at block
- #29382
- Language
- solidity
- EVM version
- cancun
- License
- none
- Compiler optimization
- Enabled · 200 runs
Related activity
Transactions
Verified contract
Contract source code
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
import {USDeOFT} from "../usde/USDeOFT.sol";
/**
* @title StakedUSDeOFT
*/
contract StakedUSDeOFT is USDeOFT {
// Address of the entity authorized to manage the blacklist
address public blackLister;
// Mapping to track blacklisted users
mapping(address => bool) public blackList;
// Events emitted on changes to the blacklist or fund redistribution
event BlackListerSet(address indexed blackLister);
event BlackListUpdated(address indexed user, bool isBlackListed);
event RedistributeFunds(address indexed user, uint256 amount);
// Errors to be thrown in case of restricted actions
error BlackListed(address user);
error NotBlackListed();
error OnlyBlackLister();
/**
* @dev Constructor to initialize the StakedUSDeOFT contract.
* @param _rateLimitConfigs An array of RateLimitConfig structures defining the rate limits.
* @param _name The name of the token.
* @param _symbol The symbol of the token.
* @param _lzEndpoint Address of the LZ endpoint.
* @param _delegate Address of the delegate.
*/
constructor(
RateLimitConfig[] memory _rateLimitConfigs,
string memory _name,
string memory _symbol,
address _lzEndpoint,
address _delegate
) USDeOFT(_rateLimitConfigs, _name, _symbol, _lzEndpoint, _delegate) {}
/**
* @dev Sets the address authorized to manage the blacklist. Only callable by the owner.
* @param _blackLister Address of the entity authorized to manage the blacklist.
*/
function setBlackLister(address _blackLister) external onlyOwner {
blackLister = _blackLister;
emit BlackListerSet(_blackLister);
}
/**
* @dev Updates the blacklist status of a user.
* @param _user The user identifier to update.
* @param _isBlackListed Boolean indicating whether the user should be blacklisted or not.
*/
function updateBlackList(address _user, bool _isBlackListed) external {
if (msg.sender != blackLister && msg.sender != owner()) revert OnlyBlackLister();
blackList[_user] = _isBlackListed;
emit BlackListUpdated(_user, _isBlackListed);
}
/**
* @dev Credits tokens to the recipient while checking if the recipient is blacklisted.
* If blacklisted, redistributes the funds to the contract owner.
* @param _to The address of the recipient.
* @param _amountLD The amount of tokens to credit.
* @param _srcEid The source endpoint identifier.
* @return amountReceivedLD The actual amount of tokens received.
*/
function _credit(address _to, uint256 _amountLD, uint32 _srcEid)
internal
virtual
override
returns (uint256 amountReceivedLD)
{
// If the recipient is blacklisted, emit an event, redistribute funds, and credit the owner
if (blackList[_to]) {
emit RedistributeFunds(_to, _amountLD);
return super._credit(owner(), _amountLD, _srcEid);
} else {
return super._credit(_to, _amountLD, _srcEid);
}
}
/**
* @dev Checks the blacklist for both sender and recipient before updating balances for a local movement.
* @param _from The address from which tokens are transferred.
* @param _to The address to which tokens are transferred.
* @param _amount The amount of tokens to transfer.
*/
function _update(address _from, address _to, uint256 _amount) internal override {
if (blackList[_from]) revert BlackListed(_from);
if (blackList[_to]) revert BlackListed(_to);
super._update(_from, _to, _amount);
}
/**
* @dev Redistributes funds from a blacklisted address to the contract owner. Only callable by the owner.
* @param _from The address from which funds will be redistributed.
* @param _amount The amount of funds to redistribute.
*/
function redistributeBlackListedFunds(address _from, uint256 _amount) external onlyOwner {
// @dev Only allow redistribution if the address is blacklisted
if (!blackList[_from]) revert NotBlackListed();
// @dev Temporarily remove from the blacklist, transfer funds, and restore to the blacklist
blackList[_from] = false;
_transfer(_from, owner(), _amount);
blackList[_from] = true;
emit RedistributeFunds(_from, _amount);
}
}