Smart Contracts
SellPolia runs on three purpose-built contracts, one per role, deployed across the sell chain (Sepolia) and the payment/payout chains.
| Contract | Chain(s) | Role |
|---|---|---|
| SethVault | Sepolia | Holds seller deposits + house reserve; delivers sold SETH to buyers. |
| PaymentCollector | Payment chains (Base, …) | Takes and prices buyer payments; emits the purchase event. |
| Payout | Base | Pays 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 aninitialize(...)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 withchangeOwner(newOwner)(emitsOwnerChanged). Aversion()getter returns the implementation version. - Chainlink pricing. The
PaymentCollectorandPayoutcontracts 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 (
1e18raw = 1 coin). - USD values use 8 decimals (
1e8raw = $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