Getting started
What is a pot
Solo pots, shared pots, and who can do what.
A pot has one flag that decides everything about who can touch it: shared. It is set at creation and cannot be changed afterwards.
Solo pots
A solo pot is a piggy bank. Only the creator can call contribute on it, and the beneficiary is forced to be the creator. If you pass anyone else as the beneficiary while setting shared to false, the call reverts with BadParams.
It is useful as a commitment device. You set a goal of 5 NVDA by December, you add to it whenever you want, and the tokens are out of your wallet until the goal is reached. If you miss the deadline, you refund yourself.
Shared pots
A shared pot is open. Anyone holding the asset can call contribute, no allowlist and no invitation. The contract tracks each address and its exact amount, so a refund always returns the right share to the right person.
There is no cap on the number of contributors, because no function in the contract ever loops over them. Refunds are pulled one caller at a time.
The beneficiary
On a shared pot you can name any address as the beneficiary, including one that is not yours. That is how you run a pot on somebody else's behalf: a birthday gift, a group purchase, a team fund. Release always pays the beneficiary recorded at creation, whoever triggers it.
Leaving the beneficiary field empty sets it to the creator.
What people use them for
- A group saving for a trip in USDG, with a hard date.
- Friends buying a share of an index token together, counted in SPY rather than dollars.
- A monthly personal target in a single stock, locked until it is reached.
- A gift pot where the beneficiary is the person receiving it and the contributors are everybody else.
A pot is public. The name, the asset, the target, the balance and the contributor addresses are all readable by anyone with an RPC endpoint. Do not put anything private in the name.