Skip to Content
Smart ContractsOverview

Smart Contracts

SellPolia runs on three purpose-built contracts, one per role, deployed across the sell chain (Sepolia) and the payment/payout chains.

ContractChain(s)Role
SethVaultSepoliaHolds seller deposits + house reserve; delivers sold SETH to buyers.
PaymentCollectorPayment chains (Base, …)Takes and prices buyer payments; emits the purchase event.
PayoutBasePays sellers in ETH from their USD-owed balances.

Deployed addresses are on the Deployed Addresses page.

Shared design

All three contracts share a common structure:

  • Upgradeable via proxy. Each is deployed behind a minimal EIP-1967 transparent proxy (Proxy.sol). The implementation is initialized with an initialize(...) call rather than a constructor (the constructor only locks the implementation). The proxy admin (who can upgrade) and the owner (who operates the contract) are always distinct addresses.
  • Simple ownership. Privileged actions are guarded by onlyOwner, and ownership can be transferred with changeOwner(newOwner) (emits OwnerChanged). A version() getter returns the implementation version.
  • Chainlink pricing. The PaymentCollector and Payout contracts read USD prices from Chainlink feeds and require the feed to report 8 decimals, with staleness and sanity checks on every read.

Units

  • SETH and ETH use 18 decimals (1e18 raw = 1 coin).
  • USD values use 8 decimals (1e8 raw = $1.00), matching Chainlink.
  • Stablecoin decimals vary by token/chain (USDC/USDT are usually 6; DAI is 18) — the collector stores each token’s decimals so amounts convert correctly.

Source

The Solidity sources live in the repo under contracts/contracts/: SethVault.sol, PaymentCollector.sol, Payout.sol, Proxy.sol, and IEthUsdPriceFeed.sol.

Last updated on