S Price: $0.059786 (+1.38%)
Gas: 55 Gwei

Contract

0x7b611d83Dd6D4cA8FA3d86D1648ed7CE98B251a1

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Register Me561463862025-11-22 19:06:3169 days ago1763838391IN
0x7b611d83...E98B251a1
0 S0.0041953550.0001

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AaveYieldProvider

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at SonicScan.org on 2025-11-22
*/

// Sources flattened with hardhat v2.26.0 https://hardhat.org

// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/utils/introspection/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}


// File @openzeppelin/contracts/interfaces/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)

pragma solidity >=0.4.16;


// File @openzeppelin/contracts/token/ERC20/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}


// File @openzeppelin/contracts/interfaces/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)

pragma solidity >=0.4.16;


// File @openzeppelin/contracts/interfaces/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)

pragma solidity >=0.6.2;


/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}


// File @openzeppelin/contracts/token/ERC20/utils/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;


/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}


// File @openzeppelin/contracts/utils/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * 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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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 making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}


// File contracts/AaveYieldProvider.sol

// Original license: SPDX_License_Identifier: MIT
pragma solidity 0.8.20;



/**
 * @title IPool
 * @notice Interface for Aave V3 Pool
 */
interface IPool {
    function supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode) external;
    function withdraw(address asset, uint256 amount, address to) external returns (uint256);
}

/**
 * @title AaveYieldProvider
 * @notice Integrates with Aave V3 to generate real yield on USDC deposits
 * @dev Uses share-based accounting to fairly distribute Aave interest across vaults
 *      Similar to ERC-4626 vault tokens - each vault gets shares proportional to their contribution
 *      This contract is fully autonomous with no admin controls - trustless by design
 *      Protected against reentrancy attacks with OpenZeppelin's ReentrancyGuard
 */
contract AaveYieldProvider is ReentrancyGuard {
    using SafeERC20 for IERC20;

    // Aave V3 Pool on Sonic Mainnet
    IPool public constant AAVE_POOL = IPool(0x5362dBb1e601abF3a4c14c22ffEdA64042E5eAA3);
    
    // USDC on Sonic Mainnet
    IERC20 public constant USDC = IERC20(0x29219dd400f2Bf60E5a23d13Be72B486D4038894);
    
    // aUSDC (Aave interest-bearing USDC) on Sonic Mainnet
    IERC20 public constant aUSDC = IERC20(0x578Ee1ca3a8E1b54554Da1Bf7C583506C4CD11c6);

    // Share-based accounting to prevent yield theft
    // Each vault gets shares when depositing, redeemable for proportional aUSDC (including interest)
    mapping(address => uint256) public vaultShares;
    uint256 public totalShares;

    event Deposited(address indexed vault, uint256 usdcAmount, uint256 sharesMinted);
    event Withdrawn(address indexed vault, uint256 usdcAmount, uint256 sharesBurned, address receiver);

    /**
     * @notice Deposit USDC into Aave to earn yield
     * @param amount Amount of USDC to deposit
     * @dev Mints shares to vault using ERC-4626 formula with proper rounding protection
     *      This ensures interest is fairly distributed and prevents yield theft
     *      Protected against reentrancy attacks
     */
    function deposit(uint256 amount) external nonReentrant {
        require(amount > 0, "AaveYieldProvider: cannot deposit zero");

        // Transfer USDC from vault to this contract
        USDC.safeTransferFrom(msg.sender, address(this), amount);

        // Get aUSDC balance before deposit
        uint256 aUSDCBefore = aUSDC.balanceOf(address(this));

        // Approve and supply USDC to Aave
        USDC.safeIncreaseAllowance(address(AAVE_POOL), amount);
        AAVE_POOL.supply(address(USDC), amount, address(this), 0);

        // Get aUSDC balance after deposit
        uint256 aUSDCAfter = aUSDC.balanceOf(address(this));
        uint256 aUSDCReceived = aUSDCAfter - aUSDCBefore;
        require(aUSDCReceived > 0, "AaveYieldProvider: no aUSDC received");

        // Calculate shares to mint using ERC-4626 formula with FLOOR rounding
        uint256 sharesToMint;
        if (totalShares == 0) {
            // First deposit: shares = aUSDC received (1:1)
            sharesToMint = aUSDCReceived;
        } else {
            // Subsequent deposits: shares = (aUSDC received * total shares) / aUSDC before deposit
            // Guard against division by zero (shouldn't happen but defensive)
            require(aUSDCBefore > 0, "AaveYieldProvider: invalid aUSDC balance");
            
            // Standard ERC-4626 formula: FLOOR division to prevent over-minting
            // If this would mint zero shares, we revert to protect depositor
            sharesToMint = (aUSDCReceived * totalShares) / aUSDCBefore;
        }

        // Critical: Prevent zero-share minting (would lose user funds)
        // Small deposits that round down to zero shares are rejected
        require(sharesToMint > 0, "AaveYieldProvider: deposit too small, would mint zero shares");

        // Mint shares to vault
        vaultShares[msg.sender] += sharesToMint;
        totalShares += sharesToMint;

        emit Deposited(msg.sender, amount, sharesToMint);
    }

    /**
     * @notice Withdraw USDC from Aave (burns shares, receives USDC + proportional interest)
     * @param amount Amount of USDC to withdraw
     * @param receiver Address to receive USDC
     * @return withdrawn Actual amount withdrawn (includes proportional interest)
     * @dev Burns shares proportional to withdrawal amount with proper rounding
     *      Protected against reentrancy attacks
     */
    function withdraw(uint256 amount, address receiver) external nonReentrant returns (uint256 withdrawn) {
        require(amount > 0, "AaveYieldProvider: cannot withdraw zero");
        require(receiver != address(0), "AaveYieldProvider: receiver cannot be zero address");

        uint256 shares = vaultShares[msg.sender];
        require(shares > 0, "AaveYieldProvider: no shares for caller");
        require(totalShares > 0, "AaveYieldProvider: no total shares");

        // Calculate vault's aUSDC value based on shares
        uint256 totalAUSDC = aUSDC.balanceOf(address(this));
        require(totalAUSDC > 0, "AaveYieldProvider: no assets");
        
        uint256 vaultAUSDC = (totalAUSDC * shares) / totalShares;
        require(vaultAUSDC > 0, "AaveYieldProvider: vault has no assets");

        // Cap withdrawal at vault's total balance
        uint256 toWithdraw = amount > vaultAUSDC ? vaultAUSDC : amount;

        // Withdraw from Aave
        withdrawn = AAVE_POOL.withdraw(address(USDC), toWithdraw, receiver);
        require(withdrawn > 0, "AaveYieldProvider: withdrawal failed");

        // Burn shares proportionally to withdrawal using FLOOR division
        // This slightly favors remaining shareholders (standard practice)
        uint256 sharesToBurn = (withdrawn * shares) / vaultAUSDC;
        
        // Cap at available shares (handles rounding edge cases)
        if (sharesToBurn > shares) {
            sharesToBurn = shares;
        }
        
        // Ensure we burn at least some shares (except for dust amounts)
        if (sharesToBurn == 0 && withdrawn > 0) {
            sharesToBurn = 1; // Minimum share burn for any withdrawal
        }

        vaultShares[msg.sender] -= sharesToBurn;
        totalShares -= sharesToBurn;

        emit Withdrawn(msg.sender, withdrawn, sharesToBurn, receiver);
    }

    /**
     * @notice Get total USDC value for a vault (principal + earned interest)
     * @return Total USDC value based on vault's shares (includes accrued yield from Aave)
     * @dev Share price increases as Aave accrues interest, so value = (aUSDC * shares) / totalShares
     */
    function totalAssets() external view returns (uint256) {
        uint256 shares = vaultShares[msg.sender];
        if (shares == 0 || totalShares == 0) {
            return 0;
        }

        // Vault's USDC value = proportional share of total aUSDC
        // As aUSDC grows with interest, this value increases automatically
        uint256 totalAUSDC = aUSDC.balanceOf(address(this));
        return (totalAUSDC * shares) / totalShares;
    }

    /// @dev Register my contract on Sonic FeeM
    function registerMe() external {
        (bool _success,) = address(0xDC2B0D2Dd2b7759D97D50db4eabDC36973110830).call(
            abi.encodeWithSignature("selfRegister(uint256)", 237)
        );
        require(_success, "FeeM registration failed");
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdcAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMinted","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdcAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurned","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"AAVE_POOL","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aUSDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registerMe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"withdrawn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600160005561100f806100256000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c8063559fda3311610066578063559fda331461010157806389a302711461011c5780639a198d6114610137578063b6b55f2514610141578063d71385841461015457600080fd5b8062f714ce1461009757806301e1d114146100bd57806308a01675146100c55780633a98ef39146100f8575b600080fd5b6100aa6100a5366004610eb5565b610174565b6040519081526020015b60405180910390f35b6100aa61064a565b6100e0735362dbb1e601abf3a4c14c22ffeda64042e5eaa381565b6040516001600160a01b0390911681526020016100b4565b6100aa60025481565b6100e073578ee1ca3a8e1b54554da1bf7c583506c4cd11c681565b6100e07329219dd400f2bf60e5a23d13be72b486d403889481565b61013f61070b565b005b61013f61014f366004610ee1565b6107fc565b6100aa610162366004610efa565b60016020526000908152604090205481565b600061017e610c28565b600083116101e35760405162461bcd60e51b815260206004820152602760248201527f416176655969656c6450726f76696465723a2063616e6e6f74207769746864726044820152666177207a65726f60c81b60648201526084015b60405180910390fd5b6001600160a01b0382166102545760405162461bcd60e51b815260206004820152603260248201527f416176655969656c6450726f76696465723a2072656365697665722063616e6e6044820152716f74206265207a65726f206164647265737360701b60648201526084016101da565b33600090815260016020526040902054806102c15760405162461bcd60e51b815260206004820152602760248201527f416176655969656c6450726f76696465723a206e6f2073686172657320666f726044820152661031b0b63632b960c91b60648201526084016101da565b60006002541161031e5760405162461bcd60e51b815260206004820152602260248201527f416176655969656c6450726f76696465723a206e6f20746f74616c2073686172604482015261657360f01b60648201526084016101da565b6040516370a0823160e01b815230600482015260009073578ee1ca3a8e1b54554da1bf7c583506c4cd11c6906370a0823190602401602060405180830381865afa158015610370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103949190610f1c565b9050600081116103e65760405162461bcd60e51b815260206004820152601c60248201527f416176655969656c6450726f76696465723a206e6f206173736574730000000060448201526064016101da565b6002546000906103f68484610f4b565b6104009190610f62565b9050600081116104615760405162461bcd60e51b815260206004820152602660248201527f416176655969656c6450726f76696465723a207661756c7420686173206e6f2060448201526561737365747360d01b60648201526084016101da565b60008187116104705786610472565b815b604051631a4ca37b60e21b81527329219dd400f2bf60e5a23d13be72b486d40388946004820152602481018290526001600160a01b0388166044820152909150735362dbb1e601abf3a4c14c22ffeda64042e5eaa3906369328dec906064016020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610f1c565b9450600085116105725760405162461bcd60e51b8152602060048201526024808201527f416176655969656c6450726f76696465723a207769746864726177616c2066616044820152631a5b195960e21b60648201526084016101da565b60008261057f8688610f4b565b6105899190610f62565b9050848111156105965750835b801580156105a45750600086115b156105ad575060015b33600090815260016020526040812080548392906105cc908490610f84565b9250508190555080600260008282546105e59190610f84565b909155505060408051878152602081018390526001600160a01b03891681830152905133917fbc0fb706d03a6cb96fbe31862998338850cd01d239a360045dbe469d548e4218919081900360600190a250505050506106446001600055565b92915050565b336000908152600160205260408120548015806106675750600254155b1561067457600091505090565b6040516370a0823160e01b815230600482015260009073578ee1ca3a8e1b54554da1bf7c583506c4cd11c6906370a0823190602401602060405180830381865afa1580156106c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ea9190610f1c565b6002549091506106fa8383610f4b565b6107049190610f62565b9250505090565b60405160ed602482015260009073dc2b0d2dd2b7759d97d50db4eabdc369731108309060440160408051601f198184030181529181526020820180516001600160e01b03166307983f4560e21b179052516107669190610f97565b6000604051808303816000865af19150503d80600081146107a3576040519150601f19603f3d011682016040523d82523d6000602084013e6107a8565b606091505b50509050806107f95760405162461bcd60e51b815260206004820152601860248201527f4665654d20726567697374726174696f6e206661696c6564000000000000000060448201526064016101da565b50565b610804610c28565b600081116108635760405162461bcd60e51b815260206004820152602660248201527f416176655969656c6450726f76696465723a2063616e6e6f74206465706f736960448201526574207a65726f60d01b60648201526084016101da565b6108837329219dd400f2bf60e5a23d13be72b486d4038894333084610c52565b6040516370a0823160e01b815230600482015260009073578ee1ca3a8e1b54554da1bf7c583506c4cd11c6906370a0823190602401602060405180830381865afa1580156108d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f99190610f1c565b905061092e7329219dd400f2bf60e5a23d13be72b486d4038894735362dbb1e601abf3a4c14c22ffeda64042e5eaa384610cbf565b60405163617ba03760e01b81527329219dd400f2bf60e5a23d13be72b486d403889460048201526024810183905230604482015260006064820152735362dbb1e601abf3a4c14c22ffeda64042e5eaa39063617ba03790608401600060405180830381600087803b1580156109a257600080fd5b505af11580156109b6573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073578ee1ca3a8e1b54554da1bf7c583506c4cd11c691506370a0823190602401602060405180830381865afa158015610a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a309190610f1c565b90506000610a3e8383610f84565b905060008111610a9c5760405162461bcd60e51b8152602060048201526024808201527f416176655969656c6450726f76696465723a206e6f20615553444320726563656044820152631a5d995960e21b60648201526084016101da565b6000600254600003610aaf575080610b2c565b60008411610b105760405162461bcd60e51b815260206004820152602860248201527f416176655969656c6450726f76696465723a20696e76616c69642061555344436044820152672062616c616e636560c01b60648201526084016101da565b8360025483610b1f9190610f4b565b610b299190610f62565b90505b60008111610ba25760405162461bcd60e51b815260206004820152603c60248201527f416176655969656c6450726f76696465723a206465706f73697420746f6f207360448201527f6d616c6c2c20776f756c64206d696e74207a65726f207368617265730000000060648201526084016101da565b3360009081526001602052604081208054839290610bc1908490610fc6565b925050819055508060026000828254610bda9190610fc6565b9091555050604080518681526020810183905233917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca910160405180910390a2505050506107f96001600055565b600260005403610c4b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6040516001600160a01b038481166024830152838116604483015260648201839052610cb99186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610d49565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d339190610f1c565b9050610cb98484610d448585610fc6565b610dba565b600080602060008451602086016000885af180610d6c576040513d6000823e3d81fd5b50506000513d91508115610d84578060011415610d91565b6001600160a01b0384163b155b15610cb957604051635274afe760e01b81526001600160a01b03851660048201526024016101da565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610e0b8482610e4a565b610cb9576040516001600160a01b03848116602483015260006044830152610e4091869182169063095ea7b390606401610c87565b610cb98482610d49565b6000806000806020600086516020880160008a5af192503d91506000519050828015610e8f57508115610e805780600114610e8f565b6000866001600160a01b03163b115b9695505050505050565b80356001600160a01b0381168114610eb057600080fd5b919050565b60008060408385031215610ec857600080fd5b82359150610ed860208401610e99565b90509250929050565b600060208284031215610ef357600080fd5b5035919050565b600060208284031215610f0c57600080fd5b610f1582610e99565b9392505050565b600060208284031215610f2e57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761064457610644610f35565b600082610f7f57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561064457610644610f35565b6000825160005b81811015610fb85760208186018101518583015201610f9e565b506000920191825250919050565b8082018082111561064457610644610f3556fea2646970667358221220e1bef5d26d8b2d4943671363327eafaa2ff9de573ca802d7be84ba90deded7d664736f6c63430008140033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100925760003560e01c8063559fda3311610066578063559fda331461010157806389a302711461011c5780639a198d6114610137578063b6b55f2514610141578063d71385841461015457600080fd5b8062f714ce1461009757806301e1d114146100bd57806308a01675146100c55780633a98ef39146100f8575b600080fd5b6100aa6100a5366004610eb5565b610174565b6040519081526020015b60405180910390f35b6100aa61064a565b6100e0735362dbb1e601abf3a4c14c22ffeda64042e5eaa381565b6040516001600160a01b0390911681526020016100b4565b6100aa60025481565b6100e073578ee1ca3a8e1b54554da1bf7c583506c4cd11c681565b6100e07329219dd400f2bf60e5a23d13be72b486d403889481565b61013f61070b565b005b61013f61014f366004610ee1565b6107fc565b6100aa610162366004610efa565b60016020526000908152604090205481565b600061017e610c28565b600083116101e35760405162461bcd60e51b815260206004820152602760248201527f416176655969656c6450726f76696465723a2063616e6e6f74207769746864726044820152666177207a65726f60c81b60648201526084015b60405180910390fd5b6001600160a01b0382166102545760405162461bcd60e51b815260206004820152603260248201527f416176655969656c6450726f76696465723a2072656365697665722063616e6e6044820152716f74206265207a65726f206164647265737360701b60648201526084016101da565b33600090815260016020526040902054806102c15760405162461bcd60e51b815260206004820152602760248201527f416176655969656c6450726f76696465723a206e6f2073686172657320666f726044820152661031b0b63632b960c91b60648201526084016101da565b60006002541161031e5760405162461bcd60e51b815260206004820152602260248201527f416176655969656c6450726f76696465723a206e6f20746f74616c2073686172604482015261657360f01b60648201526084016101da565b6040516370a0823160e01b815230600482015260009073578ee1ca3a8e1b54554da1bf7c583506c4cd11c6906370a0823190602401602060405180830381865afa158015610370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103949190610f1c565b9050600081116103e65760405162461bcd60e51b815260206004820152601c60248201527f416176655969656c6450726f76696465723a206e6f206173736574730000000060448201526064016101da565b6002546000906103f68484610f4b565b6104009190610f62565b9050600081116104615760405162461bcd60e51b815260206004820152602660248201527f416176655969656c6450726f76696465723a207661756c7420686173206e6f2060448201526561737365747360d01b60648201526084016101da565b60008187116104705786610472565b815b604051631a4ca37b60e21b81527329219dd400f2bf60e5a23d13be72b486d40388946004820152602481018290526001600160a01b0388166044820152909150735362dbb1e601abf3a4c14c22ffeda64042e5eaa3906369328dec906064016020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610f1c565b9450600085116105725760405162461bcd60e51b8152602060048201526024808201527f416176655969656c6450726f76696465723a207769746864726177616c2066616044820152631a5b195960e21b60648201526084016101da565b60008261057f8688610f4b565b6105899190610f62565b9050848111156105965750835b801580156105a45750600086115b156105ad575060015b33600090815260016020526040812080548392906105cc908490610f84565b9250508190555080600260008282546105e59190610f84565b909155505060408051878152602081018390526001600160a01b03891681830152905133917fbc0fb706d03a6cb96fbe31862998338850cd01d239a360045dbe469d548e4218919081900360600190a250505050506106446001600055565b92915050565b336000908152600160205260408120548015806106675750600254155b1561067457600091505090565b6040516370a0823160e01b815230600482015260009073578ee1ca3a8e1b54554da1bf7c583506c4cd11c6906370a0823190602401602060405180830381865afa1580156106c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ea9190610f1c565b6002549091506106fa8383610f4b565b6107049190610f62565b9250505090565b60405160ed602482015260009073dc2b0d2dd2b7759d97d50db4eabdc369731108309060440160408051601f198184030181529181526020820180516001600160e01b03166307983f4560e21b179052516107669190610f97565b6000604051808303816000865af19150503d80600081146107a3576040519150601f19603f3d011682016040523d82523d6000602084013e6107a8565b606091505b50509050806107f95760405162461bcd60e51b815260206004820152601860248201527f4665654d20726567697374726174696f6e206661696c6564000000000000000060448201526064016101da565b50565b610804610c28565b600081116108635760405162461bcd60e51b815260206004820152602660248201527f416176655969656c6450726f76696465723a2063616e6e6f74206465706f736960448201526574207a65726f60d01b60648201526084016101da565b6108837329219dd400f2bf60e5a23d13be72b486d4038894333084610c52565b6040516370a0823160e01b815230600482015260009073578ee1ca3a8e1b54554da1bf7c583506c4cd11c6906370a0823190602401602060405180830381865afa1580156108d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f99190610f1c565b905061092e7329219dd400f2bf60e5a23d13be72b486d4038894735362dbb1e601abf3a4c14c22ffeda64042e5eaa384610cbf565b60405163617ba03760e01b81527329219dd400f2bf60e5a23d13be72b486d403889460048201526024810183905230604482015260006064820152735362dbb1e601abf3a4c14c22ffeda64042e5eaa39063617ba03790608401600060405180830381600087803b1580156109a257600080fd5b505af11580156109b6573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073578ee1ca3a8e1b54554da1bf7c583506c4cd11c691506370a0823190602401602060405180830381865afa158015610a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a309190610f1c565b90506000610a3e8383610f84565b905060008111610a9c5760405162461bcd60e51b8152602060048201526024808201527f416176655969656c6450726f76696465723a206e6f20615553444320726563656044820152631a5d995960e21b60648201526084016101da565b6000600254600003610aaf575080610b2c565b60008411610b105760405162461bcd60e51b815260206004820152602860248201527f416176655969656c6450726f76696465723a20696e76616c69642061555344436044820152672062616c616e636560c01b60648201526084016101da565b8360025483610b1f9190610f4b565b610b299190610f62565b90505b60008111610ba25760405162461bcd60e51b815260206004820152603c60248201527f416176655969656c6450726f76696465723a206465706f73697420746f6f207360448201527f6d616c6c2c20776f756c64206d696e74207a65726f207368617265730000000060648201526084016101da565b3360009081526001602052604081208054839290610bc1908490610fc6565b925050819055508060026000828254610bda9190610fc6565b9091555050604080518681526020810183905233917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca910160405180910390a2505050506107f96001600055565b600260005403610c4b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6040516001600160a01b038481166024830152838116604483015260648201839052610cb99186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610d49565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d339190610f1c565b9050610cb98484610d448585610fc6565b610dba565b600080602060008451602086016000885af180610d6c576040513d6000823e3d81fd5b50506000513d91508115610d84578060011415610d91565b6001600160a01b0384163b155b15610cb957604051635274afe760e01b81526001600160a01b03851660048201526024016101da565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610e0b8482610e4a565b610cb9576040516001600160a01b03848116602483015260006044830152610e4091869182169063095ea7b390606401610c87565b610cb98482610d49565b6000806000806020600086516020880160008a5af192503d91506000519050828015610e8f57508115610e805780600114610e8f565b6000866001600160a01b03163b115b9695505050505050565b80356001600160a01b0381168114610eb057600080fd5b919050565b60008060408385031215610ec857600080fd5b82359150610ed860208401610e99565b90509250929050565b600060208284031215610ef357600080fd5b5035919050565b600060208284031215610f0c57600080fd5b610f1582610e99565b9392505050565b600060208284031215610f2e57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761064457610644610f35565b600082610f7f57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561064457610644610f35565b6000825160005b81811015610fb85760208186018101518583015201610f9e565b506000920191825250919050565b8082018082111561064457610644610f3556fea2646970667358221220e1bef5d26d8b2d4943671363327eafaa2ff9de573ca802d7be84ba90deded7d664736f6c63430008140033

Deployed Bytecode Sourcemap

23763:6687:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27481:1892;;;;;;:::i;:::-;;:::i;:::-;;;597:25:1;;;585:2;570:18;27481:1892:0;;;;;;;;29673:457;;;:::i;23889:83::-;;23929:42;23889:83;;;;;-1:-1:-1;;;;;810:32:1;;;792:51;;780:2;765:18;23889:83:0;633:216:1;24468:26:0;;;;;;24168:81;;24206:42;24168:81;;24015:80;;24052:42;24015:80;;30187:260;;;:::i;:::-;;25038:2012;;;;;;:::i;:::-;;:::i;24415:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;27481:1892;27564:17;21961:21;:19;:21::i;:::-;27611:1:::1;27602:6;:10;27594:62;;;::::0;-1:-1:-1;;;27594:62:0;;1653:2:1;27594:62:0::1;::::0;::::1;1635:21:1::0;1692:2;1672:18;;;1665:30;1731:34;1711:18;;;1704:62;-1:-1:-1;;;1782:18:1;;;1775:37;1829:19;;27594:62:0::1;;;;;;;;;-1:-1:-1::0;;;;;27675:22:0;::::1;27667:85;;;::::0;-1:-1:-1;;;27667:85:0;;2061:2:1;27667:85:0::1;::::0;::::1;2043:21:1::0;2100:2;2080:18;;;2073:30;2139:34;2119:18;;;2112:62;-1:-1:-1;;;2190:18:1;;;2183:48;2248:19;;27667:85:0::1;1859:414:1::0;27667:85:0::1;27794:10;27765:14;27782:23:::0;;;:11:::1;:23;::::0;;;;;27824:10;27816:62:::1;;;::::0;-1:-1:-1;;;27816:62:0;;2480:2:1;27816:62:0::1;::::0;::::1;2462:21:1::0;2519:2;2499:18;;;2492:30;2558:34;2538:18;;;2531:62;-1:-1:-1;;;2609:18:1;;;2602:37;2656:19;;27816:62:0::1;2278:403:1::0;27816:62:0::1;27911:1;27897:11;;:15;27889:62;;;::::0;-1:-1:-1;;;27889:62:0;;2888:2:1;27889:62:0::1;::::0;::::1;2870:21:1::0;2927:2;2907:18;;;2900:30;2966:34;2946:18;;;2939:62;-1:-1:-1;;;3017:18:1;;;3010:32;3059:19;;27889:62:0::1;2686:398:1::0;27889:62:0::1;28043:30;::::0;-1:-1:-1;;;28043:30:0;;28067:4:::1;28043:30;::::0;::::1;792:51:1::0;28022:18:0::1;::::0;24206:42:::1;::::0;28043:15:::1;::::0;765:18:1;;28043:30:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;28022:51;;28105:1;28092:10;:14;28084:55;;;::::0;-1:-1:-1;;;28084:55:0;;3688:2:1;28084:55:0::1;::::0;::::1;3670:21:1::0;3727:2;3707:18;;;3700:30;3766;3746:18;;;3739:58;3814:18;;28084:55:0::1;3486:352:1::0;28084:55:0::1;28205:11;::::0;28160:18:::1;::::0;28182:19:::1;28195:6:::0;28182:10;:19:::1;:::i;:::-;28181:35;;;;:::i;:::-;28160:56;;28248:1;28235:10;:14;28227:65;;;::::0;-1:-1:-1;;;28227:65:0;;4572:2:1;28227:65:0::1;::::0;::::1;4554:21:1::0;4611:2;4591:18;;;4584:30;4650:34;4630:18;;;4623:62;-1:-1:-1;;;4701:18:1;;;4694:36;4747:19;;28227:65:0::1;4370:402:1::0;28227:65:0::1;28357:18;28387:10;28378:6;:19;:41;;28413:6;28378:41;;;28400:10;28378:41;28475:55;::::0;-1:-1:-1;;;28475:55:0;;24052:42:::1;28475:55;::::0;::::1;5017:34:1::0;5067:18;;;5060:34;;;-1:-1:-1;;;;;5130:15:1;;5110:18;;;5103:43;28357:62:0;;-1:-1:-1;23929:42:0::1;::::0;28475:18:::1;::::0;4952::1;;28475:55:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;28463:67;;28561:1;28549:9;:13;28541:62;;;::::0;-1:-1:-1;;;28541:62:0;;5359:2:1;28541:62:0::1;::::0;::::1;5341:21:1::0;5398:2;5378:18;;;5371:30;5437:34;5417:18;;;5410:62;-1:-1:-1;;;5488:18:1;;;5481:34;5532:19;;28541:62:0::1;5157:400:1::0;28541:62:0::1;28766:20;28812:10:::0;28790:18:::1;28802:6:::0;28790:9;:18:::1;:::i;:::-;28789:33;;;;:::i;:::-;28766:56;;28928:6;28913:12;:21;28909:75;;;-1:-1:-1::0;28966:6:0;28909:75:::1;29082:17:::0;;:34;::::1;;;;29115:1;29103:9;:13;29082:34;29078:124;;;-1:-1:-1::0;29148:1:0::1;29078:124;29226:10;29214:23;::::0;;;:11:::1;:23;::::0;;;;:39;;29241:12;;29214:23;:39:::1;::::0;29241:12;;29214:39:::1;:::i;:::-;;;;;;;;29279:12;29264:11;;:27;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;29309:56:0::1;::::0;;5897:25:1;;;5953:2;5938:18;;5931:34;;;-1:-1:-1;;;;;6001:32:1;;5981:18;;;5974:60;29309:56:0;;29319:10:::1;::::0;29309:56:::1;::::0;;;;;5885:2:1;29309:56:0;;::::1;27583:1790;;;;;22005:20:::0;21296:1;22547:7;:21;22364:212;22005:20;27481:1892;;;;:::o;29673:457::-;29768:10;29719:7;29756:23;;;:11;:23;;;;;;29794:11;;;:31;;-1:-1:-1;29809:11:0;;:16;29794:31;29790:72;;;29849:1;29842:8;;;29673:457;:::o;29790:72::-;30039:30;;-1:-1:-1;;;30039:30:0;;30063:4;30039:30;;;792:51:1;30018:18:0;;24206:42;;30039:15;;765:18:1;;30039:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;30111:11;;30018:51;;-1:-1:-1;30088:19:0;30101:6;30018:51;30088:19;:::i;:::-;30087:35;;;;:::i;:::-;30080:42;;;;29673:457;:::o;30187:260::-;30319:53;;30368:3;30319:53;;;6199:36:1;30230:13:0;;30256:42;;6172:18:1;;30319:53:0;;;-1:-1:-1;;30319:53:0;;;;;;;;;;;;;;-1:-1:-1;;;;;30319:53:0;-1:-1:-1;;;30319:53:0;;;30248:135;;;30319:53;30248:135;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30229:154;;;30402:8;30394:45;;;;-1:-1:-1;;;30394:45:0;;6865:2:1;30394:45:0;;;6847:21:1;6904:2;6884:18;;;6877:30;6943:26;6923:18;;;6916:54;6987:18;;30394:45:0;6663:348:1;30394:45:0;30218:229;30187:260::o;25038:2012::-;21961:21;:19;:21::i;:::-;25121:1:::1;25112:6;:10;25104:61;;;::::0;-1:-1:-1;;;25104:61:0;;7218:2:1;25104:61:0::1;::::0;::::1;7200:21:1::0;7257:2;7237:18;;;7230:30;7296:34;7276:18;;;7269:62;-1:-1:-1;;;7347:18:1;;;7340:36;7393:19;;25104:61:0::1;7016:402:1::0;25104:61:0::1;25232:56;24052:42;25254:10;25274:4;25281:6:::0;25232:21:::1;:56::i;:::-;25368:30;::::0;-1:-1:-1;;;25368:30:0;;25392:4:::1;25368:30;::::0;::::1;792:51:1::0;25346:19:0::1;::::0;24206:42:::1;::::0;25368:15:::1;::::0;765:18:1;;25368:30:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;25346:52:::0;-1:-1:-1;25455:54:0::1;24052:42;23929;25502:6:::0;25455:26:::1;:54::i;:::-;25520:57;::::0;-1:-1:-1;;;25520:57:0;;24052:42:::1;25520:57;::::0;::::1;7699:34:1::0;7749:18;;;7742:34;;;25568:4:0::1;7792:18:1::0;;;7785:43;25575:1:0::1;7844:18:1::0;;;7837:47;23929:42:0::1;::::0;25520:16:::1;::::0;7633:19:1;;25520:57:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;25655:30:0::1;::::0;-1:-1:-1;;;25655:30:0;;25679:4:::1;25655:30;::::0;::::1;792:51:1::0;25634:18:0::1;::::0;-1:-1:-1;24206:42:0::1;::::0;-1:-1:-1;25655:15:0::1;::::0;765:18:1;;25655:30:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;25634:51:::0;-1:-1:-1;25696:21:0::1;25720:24;25733:11:::0;25634:51;25720:24:::1;:::i;:::-;25696:48;;25779:1;25763:13;:17;25755:66;;;::::0;-1:-1:-1;;;25755:66:0;;8097:2:1;25755:66:0::1;::::0;::::1;8079:21:1::0;8136:2;8116:18;;;8109:30;8175:34;8155:18;;;8148:62;-1:-1:-1;;;8226:18:1;;;8219:34;8270:19;;25755:66:0::1;7895:400:1::0;25755:66:0::1;25914:20;25949:11;;25964:1;25949:16:::0;25945:668:::1;;-1:-1:-1::0;26058:13:0;25945:668:::1;;;26307:1;26293:11;:15;26285:68;;;::::0;-1:-1:-1;;;26285:68:0;;8502:2:1;26285:68:0::1;::::0;::::1;8484:21:1::0;8541:2;8521:18;;;8514:30;8580:34;8560:18;;;8553:62;-1:-1:-1;;;8631:18:1;;;8624:38;8679:19;;26285:68:0::1;8300:404:1::0;26285:68:0::1;26590:11;26575;;26559:13;:27;;;;:::i;:::-;26558:43;;;;:::i;:::-;26543:58;;25945:668;26792:1;26777:12;:16;26769:89;;;::::0;-1:-1:-1;;;26769:89:0;;8911:2:1;26769:89:0::1;::::0;::::1;8893:21:1::0;8950:2;8930:18;;;8923:30;8989:34;8969:18;;;8962:62;9060:30;9040:18;;;9033:58;9108:19;;26769:89:0::1;8709:424:1::0;26769:89:0::1;26916:10;26904:23;::::0;;;:11:::1;:23;::::0;;;;:39;;26931:12;;26904:23;:39:::1;::::0;26931:12;;26904:39:::1;:::i;:::-;;;;;;;;26969:12;26954:11;;:27;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;26999:43:0::1;::::0;;9442:25:1;;;9498:2;9483:18;;9476:34;;;27009:10:0::1;::::0;26999:43:::1;::::0;9415:18:1;26999:43:0::1;;;;;;;25093:1957;;;;22005:20:::0;21296:1;22547:7;:21;22364:212;22041:315;21339:1;22170:7;;:18;22166:88;;22212:30;;-1:-1:-1;;;22212:30:0;;;;;;;;;;;22166:88;21339:1;22331:7;:17;22041:315::o;10684:190::-;10812:53;;-1:-1:-1;;;;;9779:15:1;;;10812:53:0;;;9761:34:1;9831:15;;;9811:18;;;9804:43;9863:18;;;9856:34;;;10785:81:0;;10805:5;;10827:18;;;;;9696::1;;10812:53:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10812:53:0;;;;;;;;;;;10785:19;:81::i;:::-;10684:190;;;;:::o;12239:228::-;12359:39;;-1:-1:-1;;;12359:39:0;;12383:4;12359:39;;;10113:34:1;-1:-1:-1;;;;;10183:15:1;;;10163:18;;;10156:43;12336:20:0;;12359:15;;;;;;10048:18:1;;12359:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;12336:62;-1:-1:-1;12409:50:0;12422:5;12429:7;12438:20;12453:5;12336:62;12438:20;:::i;:::-;12409:12;:50::i;17568:738::-;17649:18;17678:19;17818:4;17815:1;17808:4;17802:11;17795:4;17789;17785:15;17782:1;17775:5;17768;17763:60;17877:7;17867:180;;17922:4;17916:11;17968:16;17965:1;17960:3;17945:40;18015:16;18010:3;18003:29;17867:180;-1:-1:-1;;18126:1:0;18120:8;18075:16;;-1:-1:-1;18155:15:0;;:68;;18207:11;18222:1;18207:16;;18155:68;;;-1:-1:-1;;;;;18173:26:0;;;:31;18155:68;18151:148;;;18247:40;;-1:-1:-1;;;18247:40:0;;-1:-1:-1;;;;;810:32:1;;18247:40:0;;;792:51:1;765:18;;18247:40:0;633:216:1;14210:387:0;14326:47;;;-1:-1:-1;;;;;10402:32:1;;14326:47:0;;;10384:51:1;10451:18;;;;10444:34;;;14326:47:0;;;;;;;;;;10357:18:1;;;;14326:47:0;;;;;;;;-1:-1:-1;;;;;14326:47:0;-1:-1:-1;;;14326:47:0;;;14391:44;14341:13;14326:47;14391:23;:44::i;:::-;14386:204;;14479:43;;-1:-1:-1;;;;;10402:32:1;;;14479:43:0;;;10384:51:1;14519:1:0;10451:18:1;;;10444:34;14452:71:0;;14472:5;;14494:13;;;;;10357:18:1;;14479:43:0;10210:274:1;14452:71:0;14538:40;14558:5;14565:12;14538:19;:40::i;18818:490::-;18901:4;18918:12;18941:18;18970:19;19106:4;19103:1;19096:4;19090:11;19083:4;19077;19073:15;19070:1;19063:5;19056;19051:60;19040:71;;19139:16;19125:30;;19190:1;19184:8;19169:23;;19220:7;:80;;;;-1:-1:-1;19232:15:0;;:67;;19283:11;19298:1;19283:16;19232:67;;;19279:1;19258:5;-1:-1:-1;;;;;19250:26:0;;:30;19232:67;19213:87;18818:490;-1:-1:-1;;;;;;18818:490:0:o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:254::-;260:6;268;321:2;309:9;300:7;296:23;292:32;289:52;;;337:1;334;327:12;289:52;373:9;360:23;350:33;;402:38;436:2;425:9;421:18;402:38;:::i;:::-;392:48;;192:254;;;;;:::o;1075:180::-;1134:6;1187:2;1175:9;1166:7;1162:23;1158:32;1155:52;;;1203:1;1200;1193:12;1155:52;-1:-1:-1;1226:23:1;;1075:180;-1:-1:-1;1075:180:1:o;1260:186::-;1319:6;1372:2;1360:9;1351:7;1347:23;1343:32;1340:52;;;1388:1;1385;1378:12;1340:52;1411:29;1430:9;1411:29;:::i;:::-;1401:39;1260:186;-1:-1:-1;;;1260:186:1:o;3297:184::-;3367:6;3420:2;3408:9;3399:7;3395:23;3391:32;3388:52;;;3436:1;3433;3426:12;3388:52;-1:-1:-1;3459:16:1;;3297:184;-1:-1:-1;3297:184:1:o;3843:127::-;3904:10;3899:3;3895:20;3892:1;3885:31;3935:4;3932:1;3925:15;3959:4;3956:1;3949:15;3975:168;4048:9;;;4079;;4096:15;;;4090:22;;4076:37;4066:71;;4117:18;;:::i;4148:217::-;4188:1;4214;4204:132;;4258:10;4253:3;4249:20;4246:1;4239:31;4293:4;4290:1;4283:15;4321:4;4318:1;4311:15;4204:132;-1:-1:-1;4350:9:1;;4148:217::o;5562:128::-;5629:9;;;5650:11;;;5647:37;;;5664:18;;:::i;6246:412::-;6375:3;6413:6;6407:13;6438:1;6448:129;6462:6;6459:1;6456:13;6448:129;;;6560:4;6544:14;;;6540:25;;6534:32;6521:11;;;6514:53;6477:12;6448:129;;;-1:-1:-1;6632:1:1;6596:16;;6621:13;;;-1:-1:-1;6596:16:1;6246:412;-1:-1:-1;6246:412:1:o;9138:125::-;9203:9;;;9224:10;;;9221:36;;;9237:18;;:::i

Swarm Source

ipfs://e1bef5d26d8b2d4943671363327eafaa2ff9de573ca802d7be84ba90deded7d6

Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.