Stockings
Documentation

Stockings docs

Everything about gifting tokenized stocks with Stockings: how a stocking works, what happens onchain, and how your gift stays safe until it is opened.

Overview#

Stockings is a gifting app on Base. You fill a stocking with a tokenized stock, share it as a link, and whoever opens the link receives the shares in their own wallet. One stocking can be a single gift or be split between up to 1,000 people.

NetworkBase mainnet (chain ID 8453)
AssetsCoinbase Tokenized Stocks, B20 tokens on Base
CustodyShares wait in the Stockings smart contract until they are opened or returned
Fees0% during the Stocks Maxxing season
OpeningFree for the recipient, Stockings covers the gas

Quickstart#

  1. 1Go to stocking.live/hang and connect a wallet: a Base Account with a passkey, or a browser wallet such as MetaMask, Rabby or the Coinbase extension.
  2. 2Pick a stock. Only stocks with enough liquidity on Base are offered, so every purchase can fill.
  3. 3Choose an amount. The minimum is $1, and at least $0.10 for each person.
  4. 4Choose who it is for: a friend, a group chat or a community. Add a personal note if you like.
  5. 5Hang it. With Base Account this is a single signature. Other wallets confirm each step: approve USDC, swap, approve the stock, hang.
  6. 6Share the link. Keep it private for a personal gift, or post it publicly for a drop.
The link is the gift
Anyone who has the link can open the stocking. Treat it like a gift card code: send it only to the people it is for. Your links are also saved on your device under My stockings.

Opening a stocking#

  1. 1The recipient opens the link and taps Pull it out.
  2. 2They connect a wallet or paste any Base address. No wallet yet? A Base Account takes seconds to create with a passkey.
  3. 3Stockings submits the transaction for them, so they pay no gas. If gas sponsorship is ever unavailable, the page lets them submit it from their own wallet instead.
  4. 4The shares arrive in that address straight away. Each address can open a stocking once.
Your link's secret never leaves the browser
The secret part of a link sits after the # sign, and browsers never send that part to any server. When someone opens a stocking, their browser uses it to sign a message for one specific recipient address. Only that signature is sent, so it cannot be reused to send the gift anywhere else.

Gift types and splits#

The hang flow starts from three presets. Every setting can be changed before you hang.

PresetPeopleSplitBot shieldDefault expiry
A friend1Single giftOff1 month
Group chat10LuckyOff1 week
Community100LuckyOn1 week

Equal split

Every opener receives the same amount. The last opener also receives any rounding remainder, so nothing is left behind.

Lucky split

Like a red envelope: each opener receives a random amount, drawn uniformly from 1 unit up to just under twice the fair share of what is left. The last opener receives whatever remains. Every slice gets something, and the total always equals exactly what you put in.

share = 1 + random % (2 * remaining / slicesLeft - 1)
last opener: share = remaining

Randomness comes from the Base block (prevrandao). It is fair enough for fun-sized gifts, and nobody pays to open, so a stocking is always a gift, never a bet.

Features#

Personal note

Add a message of up to 280 bytes. It is stored onchain with the stocking and shown when it is opened. Notes are public, so keep personal details out of them.

Expiry and refunds

Every stocking expires after 1 day, 1 week or 1 month (the contract accepts anything from 1 hour to 365 days). Until someone opens it, you can take it back at any time. After it expires, whatever is left can be returned: anyone may trigger the return, and the funds always go to the creator.

Bot shield

Shielded stockings need a co-signature from the Stockings guard for every open. The guard allows one open per network for each stocking, and each co-signature expires after 10 minutes. This keeps public drops from being drained by scripts.

Holder gate

Limit a stocking to holders of a token, such as your community token. The recipient address must hold at least the minimum balance you set at the moment it opens a slice.

Supported stocks#

The contract lists all 298 Coinbase Tokenized Stocks on Base. The app offers the 41 that can actually be bought right now: each has at least $25,000 of DEX liquidity against USDC or ETH. The list grows as liquidity on Base grows. Fractional amounts are fine.

NVDA
NVIDIA
TSLA
Tesla
SPCX
Space Exploration Technologies
AAPL
Apple
GOOGL
Alphabet
META
Meta Platforms
AMZN
Amazon.com
MSFT
Microsoft
MSTR
Strategy
NFLX
Netflix
AMD
Advanced Micro Devices
PLTR
Palantir Technologies
CRCL
Circle Internet Group
SNDK
Sandisk
MU
Micron Technology
LLY
Eli Lilly & Co
RKLB
Rocket Lab
ORCL
Oracle
WDC
Western Digital
INTC
Intel
AVGO
Broadcom
SKHY
SK hynix
NIO
NIO
TTWO
Take-Two Interactive Software
ARM
Arm Holdings
NOK
Nokia
VALE
Vale
SONY
Sony Group
SE
Sea Limited
PDD
PDD Holdings
BIDU
Baidu
NVO
Novo Nordisk A/S
UL
Unilever
SAP
SAP SE
INFY
Infosys Limited
LI
Li Auto
BUD
Anheuser-Busch InBev SA/NV
BILI
Bilibili
SAN
Banco Santander
HSAI
Hesai Group
WRD
WeRide

Paying#

  • With USDC. Stockings asks LI.FI for the best route across the DEXs and aggregators on Base, then buys the stock and hangs the stocking in the same flow.
  • With a stock you already hold. Hang it directly, no swap needed.
  • One signature with Base Account. The approvals, the swap and the hang are sent as one batch (EIP-5792). Other wallets confirm each call in turn.

Fees#

Cost
Stockings fee0% during the Stocks Maxxing season
Swap routeUsually cents, set by the route LI.FI finds
Base gas to hangA fraction of a cent
OpeningFree for the recipient

The contract caps any future fee at 1%. A fee is only ever taken when a new stocking is hung, never from stockings that already exist.

Security#

Shares sit in the Stockings contract from the moment you hang until they are opened or returned. Here is exactly who can move them.

ActionWho can do itWhere the funds go
Open a sliceAnyone with the link, plus the guard co-signature for shielded stockingsThe recipient address they choose
Take it back earlyOnly the creator, and only while nobody has opened itThe creator
Return after expiryAnyoneAlways the creator
RescueThe contract ownerOnly tokens sent to the contract by mistake, never funds held for stockings

What the owner can and cannot do

  • List or unlist stocks for new stockings, set the guard, set a fee of at most 1%, and pause new hangs.
  • Pausing never blocks opening or returns, and unlisting a stock never affects stockings that already hold it.
  • The owner cannot withdraw escrowed shares. Ownership changes take two steps (propose, then accept).

How it is built

  • OpenZeppelin building blocks: SafeERC20, ReentrancyGuard, EIP-712 and Ownable2Step.
  • Deposits are measured by balance change, so the contract only ever counts what actually arrived.
  • 27 Foundry tests, including fuzzing that checks the total paid out always equals the total put in.
  • Source verified with an exact match on both Basescan and Sourcify.
Not audited yet
The contract has not had a third-party audit. Keep gifts to amounts you are comfortable with.

Smart contract#

Stockings on Base0xc3F632fCaa8a6f3245775032ec037f8103cAd84a

Basescan · Sourcify · deployed in block 53,550,662

Functions

hang(HangParams p) returns (uint256 id)
open(uint256 id, address recipient, bytes claimSig,
     uint256 guardDeadline, bytes guardSig) returns (uint256 amount)
reclaim(uint256 id) returns (uint256 amount)

getStocking(uint256 id) view returns (Stocking)
messageOf(uint256 id) view returns (string)
openedAmount(uint256 id, address recipient) view returns (uint256)

Events

StockingHung(id, creator, token, amount, slots, split, expiresAt, guarded, theme)
StockingOpened(id, recipient, token, amount, openedCount)
StockingReclaimed(id, creator, amount)

Signatures (EIP-712)

domain: { name: "Stockings", version: "1", chainId: 8453, verifyingContract }

Open(uint256 id, address recipient)                    signed by the stocking's link key
Guard(uint256 id, address recipient, uint256 deadline)  signed by the guard, shielded only

Limits

ParameterValue
Slices per stocking1 to 1,000
Lifetime1 hour to 365 days
Personal noteUp to 280 bytes
Fee cap1% (currently 0%)

Availability#

Coinbase Tokenized Stocks are available only to persons in eligible jurisdictions outside the United States, so Stockings is not available to US persons and blocks hanging and opening from the US. You must be 18 or older.

Nothing in Stockings is investment advice or an offer to buy or sell securities. Prices shown are reference values and can move. Stockings is self-custodial: you hold your own keys.

Troubleshooting#

MessageWhat it means
This link is not valid for that stockingThe link was cut off. Copy the full link, including everything after #.
This wallet already opened this stockingEach address can open a stocking once.
This network already opened this stockingBot shield allows one open per network. Try from another connection.
This stocking is emptyEvery slice has already been opened.
This stocking has expiredWhat was left goes back to the person who hung it.
Not available in your regionStockings is not available in the US.

Support#

Questions, partnerships or press: write to contact@stocking.live or message @stockingbase on X. We are building in public, so feedback goes straight into the product.