Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 24437487 | 10 days ago | 0.61511532 ETH | ||||
| Transfer | 24437487 | 10 days ago | 0.02096818 ETH | ||||
| Transfer | 24437487 | 10 days ago | 2.25180418 ETH | ||||
| Transfer | 24437474 | 10 days ago | 0.58859932 ETH | ||||
| Transfer | 24437474 | 10 days ago | 0.01119311 ETH | ||||
| Transfer | 24437468 | 10 days ago | 0.02296716 ETH | ||||
| Transfer | 24437468 | 10 days ago | 0.00012715 ETH | ||||
| Transfer | 24437468 | 10 days ago | 4.46059442 ETH | ||||
| Transfer | 23719713 | 111 days ago | 0.06793346 ETH | ||||
| Transfer | 23719713 | 111 days ago | 6.72541314 ETH | ||||
| Transfer | 23719713 | 111 days ago | 0.7851794 ETH | ||||
| Transfer | 23678428 | 116 days ago | 0.00847374 ETH | ||||
| Transfer | 23678428 | 116 days ago | 0.83890065 ETH | ||||
| Transfer | 23678428 | 116 days ago | 0.07502442 ETH | ||||
| Transfer | 23675938 | 117 days ago | 0.02641352 ETH | ||||
| Transfer | 23675938 | 117 days ago | 2.5040897 ETH | ||||
| Transfer | 23675938 | 117 days ago | 0.11084961 ETH | ||||
| Transfer | 23675894 | 117 days ago | 1.33 ETH | ||||
| Transfer | 23657853 | 119 days ago | 0.77234997 ETH | ||||
| Transfer | 23598221 | 128 days ago | 1.1 ETH | ||||
| Transfer | 23598167 | 128 days ago | 33 ETH | ||||
| Transfer | 23552800 | 134 days ago | 0.80677827 ETH | ||||
| Transfer | 23548411 | 135 days ago | 1 ETH | ||||
| Transfer | 23547352 | 135 days ago | 0.5 ETH | ||||
| Transfer | 23547280 | 135 days ago | 0.56 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ActivePool
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./Interfaces/IActivePool.sol";
import "./Interfaces/IDefaultPool.sol";
import "./Interfaces/IStabilityPoolManager.sol";
import "./Interfaces/IStabilityPool.sol";
import "./Interfaces/ICollSurplusPool.sol";
import "./Interfaces/IDeposit.sol";
import "./Dependencies/CheckContract.sol";
import "./Dependencies/SafetyTransfer.sol";
import "./Dependencies/Initializable.sol";
/*
* The Active Pool holds the collaterals and DCHF debt (but not DCHF tokens) for all active troves.
*
* When a trove is liquidated, it's collateral and DCHF debt are transferred from the Active Pool, to either the
* Stability Pool, the Default Pool, or both, depending on the liquidation conditions.
*
*/
contract ActivePool is
Ownable,
ReentrancyGuard,
CheckContract,
Initializable,
IActivePool
{
using SafeERC20 for IERC20;
using SafeMath for uint256;
string public constant NAME = "ActivePool";
address constant ETH_REF_ADDRESS = address(0);
address public borrowerOperationsAddress;
address public troveManagerAddress;
address public troveManagerHelpersAddress;
IDefaultPool public defaultPool;
ICollSurplusPool public collSurplusPool;
IStabilityPoolManager public stabilityPoolManager;
bool public isInitialized;
mapping(address => uint256) internal assetsBalance;
mapping(address => uint256) internal DCHFDebts;
// --- Contract setters ---
function setAddresses(
address _borrowerOperationsAddress,
address _troveManagerAddress,
address _troveManagerHelpersAddress,
address _stabilityManagerAddress,
address _defaultPoolAddress,
address _collSurplusPoolAddress
) external initializer onlyOwner {
require(!isInitialized, "Already initialized");
checkContract(_borrowerOperationsAddress);
checkContract(_troveManagerAddress);
checkContract(_troveManagerHelpersAddress);
checkContract(_stabilityManagerAddress);
checkContract(_defaultPoolAddress);
checkContract(_collSurplusPoolAddress);
isInitialized = true;
borrowerOperationsAddress = _borrowerOperationsAddress;
troveManagerAddress = _troveManagerAddress;
troveManagerHelpersAddress = _troveManagerHelpersAddress;
stabilityPoolManager = IStabilityPoolManager(_stabilityManagerAddress);
defaultPool = IDefaultPool(_defaultPoolAddress);
collSurplusPool = ICollSurplusPool(_collSurplusPoolAddress);
emit BorrowerOperationsAddressChanged(_borrowerOperationsAddress);
emit TroveManagerAddressChanged(_troveManagerAddress);
emit StabilityPoolAddressChanged(_stabilityManagerAddress);
emit DefaultPoolAddressChanged(_defaultPoolAddress);
renounceOwnership();
}
// --- Getters for public variables. Required by IPool interface ---
/*
* Returns the ETH state variable.
*
*Not necessarily equal to the the contract's raw ETH balance - ether can be forcibly sent to contracts.
*/
function getAssetBalance(address _asset) external view override returns (uint256) {
return assetsBalance[_asset];
}
function getDCHFDebt(address _asset) external view override returns (uint256) {
return DCHFDebts[_asset];
}
// --- Pool functionality ---
function sendAsset(
address _asset,
address _account,
uint256 _amount
) external override nonReentrant callerIsBOorTroveMorSP {
if (stabilityPoolManager.isStabilityPool(msg.sender)) {
assert(address(stabilityPoolManager.getAssetStabilityPool(_asset)) == msg.sender);
}
uint256 safetyTransferAmount = SafetyTransfer.decimalsCorrection(_asset, _amount);
if (safetyTransferAmount == 0) return;
assetsBalance[_asset] = assetsBalance[_asset].sub(_amount);
if (_asset != ETH_REF_ADDRESS) {
IERC20(_asset).safeTransfer(_account, safetyTransferAmount);
if (isERC20DepositContract(_account)) {
IDeposit(_account).receivedERC20(_asset, _amount);
}
} else {
(bool success, ) = _account.call{ value: _amount }("");
require(success, "ActivePool: sending ETH failed");
}
emit ActivePoolAssetBalanceUpdated(_asset, assetsBalance[_asset]);
emit AssetSent(_account, _asset, safetyTransferAmount);
}
function isERC20DepositContract(address _account) private view returns (bool) {
return (_account == address(defaultPool) ||
_account == address(collSurplusPool) ||
stabilityPoolManager.isStabilityPool(_account));
}
function increaseDCHFDebt(address _asset, uint256 _amount)
external
override
callerIsBOorTroveM
{
DCHFDebts[_asset] = DCHFDebts[_asset].add(_amount);
emit ActivePoolDCHFDebtUpdated(_asset, DCHFDebts[_asset]);
}
function decreaseDCHFDebt(address _asset, uint256 _amount)
external
override
callerIsBOorTroveMorSP
{
DCHFDebts[_asset] = DCHFDebts[_asset].sub(_amount);
emit ActivePoolDCHFDebtUpdated(_asset, DCHFDebts[_asset]);
}
// --- 'require' functions ---
modifier callerIsBorrowerOperationOrDefaultPool() {
require(
msg.sender == borrowerOperationsAddress || msg.sender == address(defaultPool),
"ActivePool: Caller is neither BO nor Default Pool"
);
_;
}
modifier callerIsBOorTroveMorSP() {
require(
msg.sender == borrowerOperationsAddress ||
msg.sender == troveManagerAddress ||
msg.sender == troveManagerHelpersAddress ||
stabilityPoolManager.isStabilityPool(msg.sender),
"ActivePool: Caller is neither BorrowerOperations nor TroveManager nor StabilityPool"
);
_;
}
modifier callerIsBOorTroveM() {
require(
msg.sender == borrowerOperationsAddress ||
msg.sender == troveManagerAddress ||
msg.sender == troveManagerHelpersAddress,
"ActivePool: Caller is neither BorrowerOperations nor TroveManager"
);
_;
}
function receivedERC20(address _asset, uint256 _amount)
external
override
callerIsBorrowerOperationOrDefaultPool
{
assetsBalance[_asset] = assetsBalance[_asset].add(_amount);
emit ActivePoolAssetBalanceUpdated(_asset, assetsBalance[_asset]);
}
// --- Fallback function ---
receive() external payable callerIsBorrowerOperationOrDefaultPool {
assetsBalance[ETH_REF_ADDRESS] = assetsBalance[ETH_REF_ADDRESS].add(msg.value);
emit ActivePoolAssetBalanceUpdated(ETH_REF_ADDRESS, assetsBalance[ETH_REF_ADDRESS]);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "./IPool.sol";
interface IActivePool is IPool {
// --- Events ---
event BorrowerOperationsAddressChanged(address _newBorrowerOperationsAddress);
event TroveManagerAddressChanged(address _newTroveManagerAddress);
event ActivePoolDCHFDebtUpdated(address _asset, uint256 _DCHFDebt);
event ActivePoolAssetBalanceUpdated(address _asset, uint256 _balance);
// --- Functions ---
function sendAsset(
address _asset,
address _account,
uint256 _amount
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "./IPool.sol";
interface IDefaultPool is IPool {
// --- Events ---
event TroveManagerAddressChanged(address _newTroveManagerAddress);
event DefaultPoolDCHFDebtUpdated(address _asset, uint256 _DCHFDebt);
event DefaultPoolAssetBalanceUpdated(address _asset, uint256 _balance);
// --- Functions ---
function sendAssetToActivePool(address _asset, uint256 _amount) external;
}pragma solidity ^0.8.14;
import "./IStabilityPool.sol";
interface IStabilityPoolManager {
event StabilityPoolAdded(address asset, address stabilityPool);
event StabilityPoolRemoved(address asset, address stabilityPool);
function isStabilityPool(address stabilityPool) external view returns (bool);
function addStabilityPool(address asset, address stabilityPool) external;
function getAssetStabilityPool(address asset) external view returns (IStabilityPool);
function unsafeGetAssetStabilityPool(address asset) external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "./IDeposit.sol";
interface IStabilityPool is IDeposit {
// --- Events ---
event StabilityPoolAssetBalanceUpdated(uint256 _newBalance);
event StabilityPoolDCHFBalanceUpdated(uint256 _newBalance);
event BorrowerOperationsAddressChanged(address _newBorrowerOperationsAddress);
event TroveManagerAddressChanged(address _newTroveManagerAddress);
event DefaultPoolAddressChanged(address _newDefaultPoolAddress);
event DCHFTokenAddressChanged(address _newDCHFTokenAddress);
event SortedTrovesAddressChanged(address _newSortedTrovesAddress);
event CommunityIssuanceAddressChanged(address _newCommunityIssuanceAddress);
event P_Updated(uint256 _P);
event S_Updated(uint256 _S, uint128 _epoch, uint128 _scale);
event G_Updated(uint256 _G, uint128 _epoch, uint128 _scale);
event EpochUpdated(uint128 _currentEpoch);
event ScaleUpdated(uint128 _currentScale);
event DepositSnapshotUpdated(address indexed _depositor, uint256 _P, uint256 _S, uint256 _G);
event SystemSnapshotUpdated(uint256 _P, uint256 _G);
event UserDepositChanged(address indexed _depositor, uint256 _newDeposit);
event StakeChanged(uint256 _newSystemStake, address _depositor);
event AssetGainWithdrawn(address indexed _depositor, uint256 _Asset, uint256 _DCHFLoss);
event MONPaidToDepositor(address indexed _depositor, uint256 _MON);
event AssetSent(address _to, uint256 _amount);
// --- Functions ---
function NAME() external view returns (string memory name);
/*
* Called only once on init, to set addresses of other Dfranc contracts
* Callable only by owner, renounces ownership at the end
*/
function setAddresses(
address _assetAddress,
address _borrowerOperationsAddress,
address _troveManagerAddress,
address _troveManagerHelperAddress,
address _dchfTokenAddress,
address _sortedTrovesAddress,
address _communityIssuanceAddress,
address _dfrancParamsAddress
) external;
/*
* Initial checks:
* - Frontend is registered or zero address
* - Sender is not a registered frontend
* - _amount is not zero
* ---
* - Triggers a MON issuance, based on time passed since the last issuance. The MON issuance is shared between *all* depositors and front ends
* - Tags the deposit with the provided front end tag param, if it's a new deposit
* - Sends depositor's accumulated gains (MON, ETH) to depositor
* - Sends the tagged front end's accumulated MON gains to the tagged front end
* - Increases deposit and tagged front end's stake, and takes new snapshots for each.
*/
function provideToSP(uint256 _amount) external;
/*
* Initial checks:
* - _amount is zero or there are no under collateralized troves left in the system
* - User has a non zero deposit
* ---
* - Triggers a MON issuance, based on time passed since the last issuance. The MON issuance is shared between *all* depositors and front ends
* - Removes the deposit's front end tag if it is a full withdrawal
* - Sends all depositor's accumulated gains (MON, ETH) to depositor
* - Sends the tagged front end's accumulated MON gains to the tagged front end
* - Decreases deposit and tagged front end's stake, and takes new snapshots for each.
*
* If _amount > userDeposit, the user withdraws all of their compounded deposit.
*/
function withdrawFromSP(uint256 _amount) external;
/*
* Initial checks:
* - User has a non zero deposit
* - User has an open trove
* - User has some ETH gain
* ---
* - Triggers a MON issuance, based on time passed since the last issuance. The MON issuance is shared between *all* depositors and front ends
* - Sends all depositor's MON gain to depositor
* - Sends all tagged front end's MON gain to the tagged front end
* - Transfers the depositor's entire ETH gain from the Stability Pool to the caller's trove
* - Leaves their compounded deposit in the Stability Pool
* - Updates snapshots for deposit and tagged front end stake
*/
function withdrawAssetGainToTrove(address _upperHint, address _lowerHint) external;
/*
* Initial checks:
* - Caller is TroveManager
* ---
* Cancels out the specified debt against the DCHF contained in the Stability Pool (as far as possible)
* and transfers the Trove's ETH collateral from ActivePool to StabilityPool.
* Only called by liquidation functions in the TroveManager.
*/
function offset(uint256 _debt, uint256 _coll) external;
/*
* Returns the total amount of ETH held by the pool, accounted in an internal variable instead of `balance`,
* to exclude edge cases like ETH received from a self-destruct.
*/
function getAssetBalance() external view returns (uint256);
/*
* Returns DCHF held in the pool. Changes when users deposit/withdraw, and when Trove debt is offset.
*/
function getTotalDCHFDeposits() external view returns (uint256);
/*
* Calculates the ETH gain earned by the deposit since its last snapshots were taken.
*/
function getDepositorAssetGain(address _depositor) external view returns (uint256);
/*
* Calculate the MON gain earned by a deposit since its last snapshots were taken.
* If not tagged with a front end, the depositor gets a 100% cut of what their deposit earned.
* Otherwise, their cut of the deposit's earnings is equal to the kickbackRate, set by the front end through
* which they made their deposit.
*/
function getDepositorMONGain(address _depositor) external view returns (uint256);
/*
* Return the user's compounded deposit.
*/
function getCompoundedDCHFDeposit(address _depositor) external view returns (uint256);
/*
* Return the front end's compounded stake.
*
* The front end's compounded stake is equal to the sum of its depositors' compounded deposits.
*/
function getCompoundedTotalStake() external view returns (uint256);
function getNameBytes() external view returns (bytes32);
function getAssetType() external view returns (address);
/*
* Fallback function
* Only callable by Active Pool, it just accounts for ETH received
* receive() external payable;
*/
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "./IDeposit.sol";
interface ICollSurplusPool is IDeposit {
// --- Events ---
event BorrowerOperationsAddressChanged(address _newBorrowerOperationsAddress);
event TroveManagerAddressChanged(address _newTroveManagerAddress);
event ActivePoolAddressChanged(address _newActivePoolAddress);
event CollBalanceUpdated(address indexed _account, uint256 _newBalance);
event AssetSent(address _to, uint256 _amount);
// --- Contract setters ---
function setAddresses(
address _borrowerOperationsAddress,
address _troveManagerAddress,
address _troveManagerHelpersAddress,
address _activePoolAddress
) external;
function getAssetBalance(address _asset) external view returns (uint256);
function getCollateral(address _asset, address _account) external view returns (uint256);
function accountSurplus(
address _asset,
address _account,
uint256 _amount
) external;
function claimColl(address _asset, address _account) external;
}pragma solidity ^0.8.14;
interface IDeposit {
function receivedERC20(address _asset, uint256 _amount) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
contract CheckContract {
function checkContract(address _account) internal view {
require(_account != address(0), "Account cannot be zero address");
uint256 size;
assembly {
size := extcodesize(_account)
}
require(size > 0, "Account code size cannot be zero");
}
}import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./ERC20Decimals.sol";
library SafetyTransfer {
using SafeMath for uint256;
//_amount is in ether (1e18) and we want to convert it to the token decimal
function decimalsCorrection(address _token, uint256 _amount)
internal
view
returns (uint256)
{
if (_token == address(0)) return _amount;
if (_amount == 0) return 0;
uint8 decimals = ERC20Decimals(_token).decimals();
if (decimals < 18) {
return _amount.div(10**(18 - decimals));
} else {
return _amount.mul(10**(decimals - 18));
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/utils/Address.sol";
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
* initialization step. This is essential to configure modules that are added through upgrades and that require
* initialization.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Internal function that returns the initialized version. Returns `_initialized`
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Internal function that returns the initialized version. Returns `_initializing`
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "./IDeposit.sol";
// Common interface for the Pools.
interface IPool is IDeposit {
// --- Events ---
event AssetBalanceUpdated(uint256 _newBalance);
event DCHFBalanceUpdated(uint256 _newBalance);
event ActivePoolAddressChanged(address _newActivePoolAddress);
event DefaultPoolAddressChanged(address _newDefaultPoolAddress);
event AssetAddressChanged(address _assetAddress);
event StabilityPoolAddressChanged(address _newStabilityPoolAddress);
event AssetSent(address _to, address indexed _asset, uint256 _amount);
// --- Functions ---
function getAssetBalance(address _asset) external view returns (uint256);
function getDCHFDebt(address _asset) external view returns (uint256);
function increaseDCHFDebt(address _asset, uint256 _amount) external;
function decreaseDCHFDebt(address _asset, uint256 _amount) external;
}pragma solidity ^0.8.14;
interface ERC20Decimals {
function decimals() external view returns (uint8);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newActivePoolAddress","type":"address"}],"name":"ActivePoolAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"ActivePoolAssetBalanceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"_DCHFDebt","type":"uint256"}],"name":"ActivePoolDCHFDebtUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_assetAddress","type":"address"}],"name":"AssetAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newBalance","type":"uint256"}],"name":"AssetBalanceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"AssetSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newBorrowerOperationsAddress","type":"address"}],"name":"BorrowerOperationsAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newBalance","type":"uint256"}],"name":"DCHFBalanceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newDefaultPoolAddress","type":"address"}],"name":"DefaultPoolAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newStabilityPoolAddress","type":"address"}],"name":"StabilityPoolAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newTroveManagerAddress","type":"address"}],"name":"TroveManagerAddressChanged","type":"event"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowerOperationsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collSurplusPool","outputs":[{"internalType":"contract ICollSurplusPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"decreaseDCHFDebt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultPool","outputs":[{"internalType":"contract IDefaultPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getAssetBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getDCHFDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseDCHFDebt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"receivedERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sendAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_borrowerOperationsAddress","type":"address"},{"internalType":"address","name":"_troveManagerAddress","type":"address"},{"internalType":"address","name":"_troveManagerHelpersAddress","type":"address"},{"internalType":"address","name":"_stabilityManagerAddress","type":"address"},{"internalType":"address","name":"_defaultPoolAddress","type":"address"},{"internalType":"address","name":"_collSurplusPoolAddress","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stabilityPoolManager","outputs":[{"internalType":"contract IStabilityPoolManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"troveManagerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"troveManagerHelpersAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608060405234801561001057600080fd5b5061001a33610023565b60018055610073565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611a3a806100826000396000f3fe60806040526004361061010d5760003560e01c806387c3338111610095578063cda775f911610064578063cda775f914610415578063d1234da714610435578063eb16f0041461046b578063f2fde38b1461048b578063fb24e5f7146104ab57600080fd5b806387c333811461036e5780638da5cb5b1461038e578063a3f4df7e146103ac578063b7f8cf9b146103ef57600080fd5b80635373433f116100dc5780635373433f146102b55780635a4d28bb146102f95780636cfb6bf9146103195780636df996d014610339578063715018a61461035957600080fd5b80632f2b4e9014610205578063392e53cd146102425780633cc742251461027357806347878f151461029357600080fd5b36610200576002546201000090046001600160a01b031633148061013b57506005546001600160a01b031633145b6101605760405162461bcd60e51b815260040161015790611551565b60405180910390fd5b6000805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c75461019590346104cb565b6000808052600860209081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c783905560408051928352908201929092527fd9d22224b27bb4fd824c68076d2a2f5ecbe57af6aadc3564516e4d14dd0930f9910160405180910390a1005b600080fd5b34801561021157600080fd5b50600754610225906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b5060075461026390600160a01b900460ff1681565b6040519015158152602001610239565b34801561027f57600080fd5b50600554610225906001600160a01b031681565b34801561029f57600080fd5b506102b36102ae3660046115b7565b6104e0565b005b3480156102c157600080fd5b506102eb6102d03660046115f8565b6001600160a01b031660009081526008602052604090205490565b604051908152602001610239565b34801561030557600080fd5b50600354610225906001600160a01b031681565b34801561032557600080fd5b506102b3610334366004611615565b610929565b34801561034557600080fd5b506102b3610354366004611697565b610c5f565b34801561036557600080fd5b506102b3610d96565b34801561037a57600080fd5b50600454610225906001600160a01b031681565b34801561039a57600080fd5b506000546001600160a01b0316610225565b3480156103b857600080fd5b506103e26040518060400160405280600a8152602001691058dd1a5d99541bdbdb60b21b81525081565b60405161023991906116f3565b3480156103fb57600080fd5b50600254610225906201000090046001600160a01b031681565b34801561042157600080fd5b50600654610225906001600160a01b031681565b34801561044157600080fd5b506102eb6104503660046115f8565b6001600160a01b031660009081526009602052604090205490565b34801561047757600080fd5b506102b3610486366004611697565b610dcc565b34801561049757600080fd5b506102b36104a63660046115f8565b610e86565b3480156104b757600080fd5b506102b36104c6366004611697565b610f21565b60006104d7828461173c565b90505b92915050565b6002600154036105325760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610157565b60026001819055546201000090046001600160a01b031633148061056057506003546001600160a01b031633145b8061057557506004546001600160a01b031633145b806105e75750600754604051633c5f6d8f60e21b81523360048201526001600160a01b039091169063f17db63c90602401602060405180830381865afa1580156105c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e79190611754565b6106035760405162461bcd60e51b815260040161015790611776565b600754604051633c5f6d8f60e21b81523360048201526001600160a01b039091169063f17db63c90602401602060405180830381865afa15801561064b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066f9190611754565b156106f85760075460405163065c20bb60e41b81526001600160a01b038581166004830152339216906365c20bb090602401602060405180830381865afa1580156106be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e291906117ef565b6001600160a01b0316146106f8576106f861180c565b60006107048483611010565b9050806000036107145750610920565b6001600160a01b03841660009081526008602052604090205461073790836110f1565b6001600160a01b038516600081815260086020526040902091909155156107e25761076c6001600160a01b03851684836110fd565b61077583611154565b156107dd57604051633ac5bc0160e21b81526001600160a01b0385811660048301526024820184905284169063eb16f00490604401600060405180830381600087803b1580156107c457600080fd5b505af11580156107d8573d6000803e3d6000fd5b505050505b610887565b6000836001600160a01b03168360405160006040518083038185875af1925050503d806000811461082f576040519150601f19603f3d011682016040523d82523d6000602084013e610834565b606091505b50509050806108855760405162461bcd60e51b815260206004820152601e60248201527f416374697665506f6f6c3a2073656e64696e6720455448206661696c656400006044820152606401610157565b505b6001600160a01b038416600081815260086020908152604091829020548251938452908301527fd9d22224b27bb4fd824c68076d2a2f5ecbe57af6aadc3564516e4d14dd0930f9910160405180910390a1604080516001600160a01b038581168252602082018490528616917ff89c3306c782ffbbe4593aa5673e97e9ad6a8c65d240405e8986363fada66392910160405180910390a2505b50506001805550565b600254610100900460ff16158080156109495750600254600160ff909116105b806109635750303b158015610963575060025460ff166001145b6109c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610157565b6002805460ff1916600117905580156109e9576002805461ff0019166101001790555b6000546001600160a01b03163314610a135760405162461bcd60e51b815260040161015790611822565b600754600160a01b900460ff1615610a635760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610157565b610a6c876111f4565b610a75866111f4565b610a7e856111f4565b610a87846111f4565b610a90836111f4565b610a99826111f4565b600780546002805462010000600160b01b031916620100006001600160a01b038c811691820292909217909255600380546001600160a01b03199081168c8416179091556004805482168b8416179055600160a01b6001600160a81b03199094168983161793909317909355600580548316878516179055600680549092169285169290921790556040519081527f3ca631ffcd2a9b5d9ae18543fc82f58eb4ca33af9e6ab01b7a8e95331e6ed9859060200160405180910390a16040516001600160a01b03871681527f143219c9e69b09e07e095fcc889b43d8f46ca892bba65f08dc3a0050869a56789060200160405180910390a16040516001600160a01b03851681527f82966d27eea39b038ee0fa30cd16532bb24f6e65d31cb58fb227aa5766cdcc7f9060200160405180910390a16040516001600160a01b03841681527f5ee0cae2f063ed938bb55046f6a932fb6ae792bf43624806bb90abe68a50be9b9060200160405180910390a1610c10610d96565b8015610c56576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6002546201000090046001600160a01b0316331480610c8857506003546001600160a01b031633145b80610c9d57506004546001600160a01b031633145b610d195760405162461bcd60e51b815260206004820152604160248201527f416374697665506f6f6c3a2043616c6c6572206973206e65697468657220426f60448201527f72726f7765724f7065726174696f6e73206e6f722054726f76654d616e6167656064820152603960f91b608482015260a401610157565b6001600160a01b038216600090815260096020526040902054610d3c90826104cb565b6001600160a01b03831660008181526009602090815260409182902084905581519283528201929092527f792adde77f7d6a9f260ac83294dc199f36af314595e1e3018c7e13f4ff0d682f91015b60405180910390a15050565b6000546001600160a01b03163314610dc05760405162461bcd60e51b815260040161015790611822565b610dca600061129d565b565b6002546201000090046001600160a01b0316331480610df557506005546001600160a01b031633145b610e115760405162461bcd60e51b815260040161015790611551565b6001600160a01b038216600090815260086020526040902054610e3490826104cb565b6001600160a01b03831660008181526008602090815260409182902084905581519283528201929092527fd9d22224b27bb4fd824c68076d2a2f5ecbe57af6aadc3564516e4d14dd0930f99101610d8a565b6000546001600160a01b03163314610eb05760405162461bcd60e51b815260040161015790611822565b6001600160a01b038116610f155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610157565b610f1e8161129d565b50565b6002546201000090046001600160a01b0316331480610f4a57506003546001600160a01b031633145b80610f5f57506004546001600160a01b031633145b80610fd15750600754604051633c5f6d8f60e21b81523360048201526001600160a01b039091169063f17db63c90602401602060405180830381865afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd19190611754565b610fed5760405162461bcd60e51b815260040161015790611776565b6001600160a01b038216600090815260096020526040902054610d3c90826110f1565b60006001600160a01b0383166110275750806104da565b81600003611037575060006104da565b6000836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611077573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109b9190611857565b905060128160ff1610156110d1576110c96110b782601261187a565b6110c290600a611981565b84906112ed565b9150506104da565b6110c96110df60128361187a565b6110ea90600a611981565b84906112f9565b60006104d78284611990565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261114f908490611305565b505050565b6005546000906001600160a01b038381169116148061118057506006546001600160a01b038381169116145b806104da5750600754604051633c5f6d8f60e21b81526001600160a01b0384811660048301529091169063f17db63c90602401602060405180830381865afa1580156111d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104da9190611754565b6001600160a01b03811661124a5760405162461bcd60e51b815260206004820152601e60248201527f4163636f756e742063616e6e6f74206265207a65726f206164647265737300006044820152606401610157565b803b806112995760405162461bcd60e51b815260206004820181905260248201527f4163636f756e7420636f64652073697a652063616e6e6f74206265207a65726f6044820152606401610157565b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006104d782846119a7565b60006104d782846119c9565b600061135a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113d79092919063ffffffff16565b80519091501561114f57808060200190518101906113789190611754565b61114f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610157565b60606113e684846000856113f0565b90505b9392505050565b6060824710156114515760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610157565b843b61149f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610157565b600080866001600160a01b031685876040516114bb91906119e8565b60006040518083038185875af1925050503d80600081146114f8576040519150601f19603f3d011682016040523d82523d6000602084013e6114fd565b606091505b509150915061150d828286611518565b979650505050505050565b606083156115275750816113e9565b8251156115375782518084602001fd5b8160405162461bcd60e51b815260040161015791906116f3565b60208082526031908201527f416374697665506f6f6c3a2043616c6c6572206973206e65697468657220424f604082015270081b9bdc88111959985d5b1d08141bdbdb607a1b606082015260800190565b6001600160a01b0381168114610f1e57600080fd5b6000806000606084860312156115cc57600080fd5b83356115d7816115a2565b925060208401356115e7816115a2565b929592945050506040919091013590565b60006020828403121561160a57600080fd5b81356113e9816115a2565b60008060008060008060c0878903121561162e57600080fd5b8635611639816115a2565b95506020870135611649816115a2565b94506040870135611659816115a2565b93506060870135611669816115a2565b92506080870135611679816115a2565b915060a0870135611689816115a2565b809150509295509295509295565b600080604083850312156116aa57600080fd5b82356116b5816115a2565b946020939093013593505050565b60005b838110156116de5781810151838201526020016116c6565b838111156116ed576000848401525b50505050565b60208152600082518060208401526117128160408501602087016116c3565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561174f5761174f611726565b500190565b60006020828403121561176657600080fd5b815180151581146113e957600080fd5b60208082526053908201527f416374697665506f6f6c3a2043616c6c6572206973206e65697468657220426f60408201527f72726f7765724f7065726174696f6e73206e6f722054726f76654d616e6167656060820152721c881b9bdc8814dd18589a5b1a5d1e541bdbdb606a1b608082015260a00190565b60006020828403121561180157600080fd5b81516113e9816115a2565b634e487b7160e01b600052600160045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561186957600080fd5b815160ff811681146113e957600080fd5b600060ff821660ff84168082101561189457611894611726565b90039392505050565b600181815b808511156118d85781600019048211156118be576118be611726565b808516156118cb57918102915b93841c93908002906118a2565b509250929050565b6000826118ef575060016104da565b816118fc575060006104da565b8160018114611912576002811461191c57611938565b60019150506104da565b60ff84111561192d5761192d611726565b50506001821b6104da565b5060208310610133831016604e8410600b841016171561195b575081810a6104da565b611965838361189d565b806000190482111561197957611979611726565b029392505050565b60006104d760ff8416836118e0565b6000828210156119a2576119a2611726565b500390565b6000826119c457634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119e3576119e3611726565b500290565b600082516119fa8184602087016116c3565b919091019291505056fea2646970667358221220b7c9dcf8965e82fe44368e49c43c62c84c863465074dbdfbb9ee39794cae7ee164736f6c634300080e0033
Deployed Bytecode
0x60806040526004361061010d5760003560e01c806387c3338111610095578063cda775f911610064578063cda775f914610415578063d1234da714610435578063eb16f0041461046b578063f2fde38b1461048b578063fb24e5f7146104ab57600080fd5b806387c333811461036e5780638da5cb5b1461038e578063a3f4df7e146103ac578063b7f8cf9b146103ef57600080fd5b80635373433f116100dc5780635373433f146102b55780635a4d28bb146102f95780636cfb6bf9146103195780636df996d014610339578063715018a61461035957600080fd5b80632f2b4e9014610205578063392e53cd146102425780633cc742251461027357806347878f151461029357600080fd5b36610200576002546201000090046001600160a01b031633148061013b57506005546001600160a01b031633145b6101605760405162461bcd60e51b815260040161015790611551565b60405180910390fd5b6000805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c75461019590346104cb565b6000808052600860209081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c783905560408051928352908201929092527fd9d22224b27bb4fd824c68076d2a2f5ecbe57af6aadc3564516e4d14dd0930f9910160405180910390a1005b600080fd5b34801561021157600080fd5b50600754610225906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b5060075461026390600160a01b900460ff1681565b6040519015158152602001610239565b34801561027f57600080fd5b50600554610225906001600160a01b031681565b34801561029f57600080fd5b506102b36102ae3660046115b7565b6104e0565b005b3480156102c157600080fd5b506102eb6102d03660046115f8565b6001600160a01b031660009081526008602052604090205490565b604051908152602001610239565b34801561030557600080fd5b50600354610225906001600160a01b031681565b34801561032557600080fd5b506102b3610334366004611615565b610929565b34801561034557600080fd5b506102b3610354366004611697565b610c5f565b34801561036557600080fd5b506102b3610d96565b34801561037a57600080fd5b50600454610225906001600160a01b031681565b34801561039a57600080fd5b506000546001600160a01b0316610225565b3480156103b857600080fd5b506103e26040518060400160405280600a8152602001691058dd1a5d99541bdbdb60b21b81525081565b60405161023991906116f3565b3480156103fb57600080fd5b50600254610225906201000090046001600160a01b031681565b34801561042157600080fd5b50600654610225906001600160a01b031681565b34801561044157600080fd5b506102eb6104503660046115f8565b6001600160a01b031660009081526009602052604090205490565b34801561047757600080fd5b506102b3610486366004611697565b610dcc565b34801561049757600080fd5b506102b36104a63660046115f8565b610e86565b3480156104b757600080fd5b506102b36104c6366004611697565b610f21565b60006104d7828461173c565b90505b92915050565b6002600154036105325760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610157565b60026001819055546201000090046001600160a01b031633148061056057506003546001600160a01b031633145b8061057557506004546001600160a01b031633145b806105e75750600754604051633c5f6d8f60e21b81523360048201526001600160a01b039091169063f17db63c90602401602060405180830381865afa1580156105c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e79190611754565b6106035760405162461bcd60e51b815260040161015790611776565b600754604051633c5f6d8f60e21b81523360048201526001600160a01b039091169063f17db63c90602401602060405180830381865afa15801561064b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066f9190611754565b156106f85760075460405163065c20bb60e41b81526001600160a01b038581166004830152339216906365c20bb090602401602060405180830381865afa1580156106be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e291906117ef565b6001600160a01b0316146106f8576106f861180c565b60006107048483611010565b9050806000036107145750610920565b6001600160a01b03841660009081526008602052604090205461073790836110f1565b6001600160a01b038516600081815260086020526040902091909155156107e25761076c6001600160a01b03851684836110fd565b61077583611154565b156107dd57604051633ac5bc0160e21b81526001600160a01b0385811660048301526024820184905284169063eb16f00490604401600060405180830381600087803b1580156107c457600080fd5b505af11580156107d8573d6000803e3d6000fd5b505050505b610887565b6000836001600160a01b03168360405160006040518083038185875af1925050503d806000811461082f576040519150601f19603f3d011682016040523d82523d6000602084013e610834565b606091505b50509050806108855760405162461bcd60e51b815260206004820152601e60248201527f416374697665506f6f6c3a2073656e64696e6720455448206661696c656400006044820152606401610157565b505b6001600160a01b038416600081815260086020908152604091829020548251938452908301527fd9d22224b27bb4fd824c68076d2a2f5ecbe57af6aadc3564516e4d14dd0930f9910160405180910390a1604080516001600160a01b038581168252602082018490528616917ff89c3306c782ffbbe4593aa5673e97e9ad6a8c65d240405e8986363fada66392910160405180910390a2505b50506001805550565b600254610100900460ff16158080156109495750600254600160ff909116105b806109635750303b158015610963575060025460ff166001145b6109c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610157565b6002805460ff1916600117905580156109e9576002805461ff0019166101001790555b6000546001600160a01b03163314610a135760405162461bcd60e51b815260040161015790611822565b600754600160a01b900460ff1615610a635760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610157565b610a6c876111f4565b610a75866111f4565b610a7e856111f4565b610a87846111f4565b610a90836111f4565b610a99826111f4565b600780546002805462010000600160b01b031916620100006001600160a01b038c811691820292909217909255600380546001600160a01b03199081168c8416179091556004805482168b8416179055600160a01b6001600160a81b03199094168983161793909317909355600580548316878516179055600680549092169285169290921790556040519081527f3ca631ffcd2a9b5d9ae18543fc82f58eb4ca33af9e6ab01b7a8e95331e6ed9859060200160405180910390a16040516001600160a01b03871681527f143219c9e69b09e07e095fcc889b43d8f46ca892bba65f08dc3a0050869a56789060200160405180910390a16040516001600160a01b03851681527f82966d27eea39b038ee0fa30cd16532bb24f6e65d31cb58fb227aa5766cdcc7f9060200160405180910390a16040516001600160a01b03841681527f5ee0cae2f063ed938bb55046f6a932fb6ae792bf43624806bb90abe68a50be9b9060200160405180910390a1610c10610d96565b8015610c56576002805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6002546201000090046001600160a01b0316331480610c8857506003546001600160a01b031633145b80610c9d57506004546001600160a01b031633145b610d195760405162461bcd60e51b815260206004820152604160248201527f416374697665506f6f6c3a2043616c6c6572206973206e65697468657220426f60448201527f72726f7765724f7065726174696f6e73206e6f722054726f76654d616e6167656064820152603960f91b608482015260a401610157565b6001600160a01b038216600090815260096020526040902054610d3c90826104cb565b6001600160a01b03831660008181526009602090815260409182902084905581519283528201929092527f792adde77f7d6a9f260ac83294dc199f36af314595e1e3018c7e13f4ff0d682f91015b60405180910390a15050565b6000546001600160a01b03163314610dc05760405162461bcd60e51b815260040161015790611822565b610dca600061129d565b565b6002546201000090046001600160a01b0316331480610df557506005546001600160a01b031633145b610e115760405162461bcd60e51b815260040161015790611551565b6001600160a01b038216600090815260086020526040902054610e3490826104cb565b6001600160a01b03831660008181526008602090815260409182902084905581519283528201929092527fd9d22224b27bb4fd824c68076d2a2f5ecbe57af6aadc3564516e4d14dd0930f99101610d8a565b6000546001600160a01b03163314610eb05760405162461bcd60e51b815260040161015790611822565b6001600160a01b038116610f155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610157565b610f1e8161129d565b50565b6002546201000090046001600160a01b0316331480610f4a57506003546001600160a01b031633145b80610f5f57506004546001600160a01b031633145b80610fd15750600754604051633c5f6d8f60e21b81523360048201526001600160a01b039091169063f17db63c90602401602060405180830381865afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd19190611754565b610fed5760405162461bcd60e51b815260040161015790611776565b6001600160a01b038216600090815260096020526040902054610d3c90826110f1565b60006001600160a01b0383166110275750806104da565b81600003611037575060006104da565b6000836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611077573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109b9190611857565b905060128160ff1610156110d1576110c96110b782601261187a565b6110c290600a611981565b84906112ed565b9150506104da565b6110c96110df60128361187a565b6110ea90600a611981565b84906112f9565b60006104d78284611990565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261114f908490611305565b505050565b6005546000906001600160a01b038381169116148061118057506006546001600160a01b038381169116145b806104da5750600754604051633c5f6d8f60e21b81526001600160a01b0384811660048301529091169063f17db63c90602401602060405180830381865afa1580156111d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104da9190611754565b6001600160a01b03811661124a5760405162461bcd60e51b815260206004820152601e60248201527f4163636f756e742063616e6e6f74206265207a65726f206164647265737300006044820152606401610157565b803b806112995760405162461bcd60e51b815260206004820181905260248201527f4163636f756e7420636f64652073697a652063616e6e6f74206265207a65726f6044820152606401610157565b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006104d782846119a7565b60006104d782846119c9565b600061135a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113d79092919063ffffffff16565b80519091501561114f57808060200190518101906113789190611754565b61114f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610157565b60606113e684846000856113f0565b90505b9392505050565b6060824710156114515760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610157565b843b61149f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610157565b600080866001600160a01b031685876040516114bb91906119e8565b60006040518083038185875af1925050503d80600081146114f8576040519150601f19603f3d011682016040523d82523d6000602084013e6114fd565b606091505b509150915061150d828286611518565b979650505050505050565b606083156115275750816113e9565b8251156115375782518084602001fd5b8160405162461bcd60e51b815260040161015791906116f3565b60208082526031908201527f416374697665506f6f6c3a2043616c6c6572206973206e65697468657220424f604082015270081b9bdc88111959985d5b1d08141bdbdb607a1b606082015260800190565b6001600160a01b0381168114610f1e57600080fd5b6000806000606084860312156115cc57600080fd5b83356115d7816115a2565b925060208401356115e7816115a2565b929592945050506040919091013590565b60006020828403121561160a57600080fd5b81356113e9816115a2565b60008060008060008060c0878903121561162e57600080fd5b8635611639816115a2565b95506020870135611649816115a2565b94506040870135611659816115a2565b93506060870135611669816115a2565b92506080870135611679816115a2565b915060a0870135611689816115a2565b809150509295509295509295565b600080604083850312156116aa57600080fd5b82356116b5816115a2565b946020939093013593505050565b60005b838110156116de5781810151838201526020016116c6565b838111156116ed576000848401525b50505050565b60208152600082518060208401526117128160408501602087016116c3565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561174f5761174f611726565b500190565b60006020828403121561176657600080fd5b815180151581146113e957600080fd5b60208082526053908201527f416374697665506f6f6c3a2043616c6c6572206973206e65697468657220426f60408201527f72726f7765724f7065726174696f6e73206e6f722054726f76654d616e6167656060820152721c881b9bdc8814dd18589a5b1a5d1e541bdbdb606a1b608082015260a00190565b60006020828403121561180157600080fd5b81516113e9816115a2565b634e487b7160e01b600052600160045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561186957600080fd5b815160ff811681146113e957600080fd5b600060ff821660ff84168082101561189457611894611726565b90039392505050565b600181815b808511156118d85781600019048211156118be576118be611726565b808516156118cb57918102915b93841c93908002906118a2565b509250929050565b6000826118ef575060016104da565b816118fc575060006104da565b8160018114611912576002811461191c57611938565b60019150506104da565b60ff84111561192d5761192d611726565b50506001821b6104da565b5060208310610133831016604e8410600b841016171561195b575081810a6104da565b611965838361189d565b806000190482111561197957611979611726565b029392505050565b60006104d760ff8416836118e0565b6000828210156119a2576119a2611726565b500390565b6000826119c457634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119e3576119e3611726565b500290565b600082516119fa8184602087016116c3565b919091019291505056fea2646970667358221220b7c9dcf8965e82fe44368e49c43c62c84c863465074dbdfbb9ee39794cae7ee164736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$233,997.47
Net Worth in ETH
120.072549
Token Allocations
WBTC
79.68%
ETH
20.32%
BLUESPARROW
0.00%
Multichain Portfolio | 34 Chains
Loading...
Loading
Loading...
Loading
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.