Skip to Content

Payout

Chain: Base · Source: contracts/contracts/Payout.sol

The payout pool holds ETH on Base and pays sellers by converting the USD they’re owed (snapshotted at sale time) to ETH at the Chainlink ETH/USD price at payout time.

Funding

receive() external payable; // emits Funded(from, amount)

Anyone can fund the pool; the owner operates payouts from it.

Paying a batch

function batchPay( address[] recipients, uint256[] soldSethRaw, uint256[] usdOwed ) external onlyOwner nonReentrant;

Pays a batch of sellers. For each recipient:

ethAmount = usdOwed × 1e18 / latestEthUsdPrice()

usdOwed is computed off-chain from the tier prices captured at each sale, so later price/tier changes can’t reprice old sales. Each recipient transfer is gas-capped at 30,000 and isolated — a single failing recipient is skipped, not allowed to revert the whole batch.

Emits per recipient PayoutSucceeded / PayoutFailed, plus a BatchPaid summary (recipientCount, successfulCount, successfulEthAmount, failedCount, failedEthAmount, ethUsdPrice).

Administration & views

function latestEthUsdPrice() public view returns (uint256); function withdraw(address payable to, uint256 amount) external onlyOwner; // Withdrawn function changeOwner(address newOwner) external onlyOwner; // OwnerChanged

Views: owner() · version() · priceFeed() · maxPriceStaleSeconds().

Initialization

function initialize( address owner_, address priceFeed_, // Chainlink ETH/USD on Base, must report 8 decimals uint256 maxPriceStaleSeconds_ ) external;

Events

Funded · PayoutSucceeded · PayoutFailed · BatchPaid · Withdrawn · OwnerChanged.

See Payouts for the seller-facing behaviour (daily batches, the 10-SETH minimum, and payout addresses).

Last updated on