How it works
One contract. The whole bar.
The token, the door, the house rules and the cellar are one Solidity contract. Here is what every part does, and how to check it.
chain read failed, retrying
ON THE COUNTER
THE DOOR
Trading starts closed. Only keepers (the owner and the contract) can move ZIP until the owner calls openDoor(). After that, anyone can, forever. There is no function that closes it.
doorOpen() · openDoor() · event DoorOpened · error DoorClosedON THE COUNTER
HOUSE RULES
While houseRules() is true: a transfer larger than maxPour() reverts with PourTooLarge, and a transfer that would push a wallet above maxTab() reverts with TabTooLarge. The PoolManager is a cellar, so the pool itself can hold any amount. liftHouseRules() turns the rules off once; nothing turns them back on.
houseRules() · maxPour() · maxTab() · liftHouseRules() · isCellar(address) · isKeeper(address)ON THE COUNTER
THE CELLAR
The Uniswap v4 position is minted directly to the ZIP contract. The contract only ever lets a position leave through unzip() or burnKeg(), and both revert while block.timestamp < unzipTime(tokenId). There is no window between minting and zipping where liquidity could be pulled: a position that was never zipped can not leave at all.
zip(tokenId) · unzipTime(tokenId) · isZipped(tokenId) · zipDuration() · extendZip() (only ever later) · unzip() · burnKeg()ON THE COUNTER
TIPS
Swap fees belong to the position. collectTips() collects them to a recipient without changing liquidity (it calls DECREASE_LIQUIDITY with zero liquidity, then TAKE_PAIR). It is the only thing the owner can do to the keg while it is zipped.
collectTips(tokenId, recipient) · event TipsCollectedWhat the owner can and can not do
CAN
- open the door, once
- lift the house rules, once
- collect tips while zipped
- extend the zip (later only)
- add or remove keepers and cellars
- unzip or burn the keg after the timer
CAN NOT
- close the door
- restore or tighten them
- decrease or remove liquidity while zipped
- shorten the zip
- mint, tax, pause or blacklist
- touch anyone’s ZIP
Renouncing is not planned because tips and the keg need an owner. Judge us by the timer.
At the counter
- Door
- The trading switch. Opened once.
- House rules
- Launch transfer and wallet limits. Lifted once.
- Keg
- The single Uniswap v4 liquidity position.
- Zipped
- The position is time locked in the cellar.
- Tips
- Swap fees, collected without reducing liquidity.
- ZC
- zipcoin, the money from Snowmoon.
- Keeper
- An account allowed to move ZIP before the door opens.
- Cellar
- An address exempt from the maximum wallet balance.
Compiler 0.8.26, optimizer 200 runs, EVM cancun. Constructor: (totalSupply, poolManager, positionManager, zipDuration).
A seat at the counter
Buy ZIP
Buy on Uniswap with ZC, or with ETH (Uniswap routes through ZC). 0.3% max pour and 2% max tab apply while the house rules are in effect.
Always check the contract address. The barback has one address.