Getting started
Quickstart
From an empty wallet to a funded pot.
Get on the chain
- 1Add Robinhood Chain. Chain id 4663, RPC
https://rpc.mainnet.chain.robinhood.com, native currency ETH. Connecting a wallet on this site offers to switch for you. - 2Hold the asset you want to save in. USDG at
0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168, or any tokenized stock on the chain. Cairn does not acquire tokens for you. - 3Keep a little ETH. Gas on this chain is tiny, but it is not zero.
Create a pot
- 1Open the create page. /create walks through the six arguments and previews the card before you sign.
- 2Pick the denomination. USDG or one of the 47 stock tokens. This is the single decision you cannot change later.
- 3Sign. One transaction. No tokens move at creation, the pot starts empty.
Fund it
Funding is two transactions the first time: an ERC-20 approve for the Cairn contract, then contribute. After that, only the contribute transaction, until the allowance runs out.
# from the command line, 250 USDG into pot 0 cast send 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 \ "approve(address,uint256)" 0xC73f689442B6D61e34ba36199e23855c61b11A0b 250000000 \ --rpc-url https://rpc.mainnet.chain.robinhood.com --private-key $PK cast send 0xC73f689442B6D61e34ba36199e23855c61b11A0b \ "contribute(uint256,uint256)" 0 250000000 \ --rpc-url https://rpc.mainnet.chain.robinhood.com --private-key $PK
USDG has 6 decimals, so 250 USDG is 250000000. The stock tokens have 18. Getting this wrong is the most common mistake, the interface does the conversion for you.
Finish it
Once the balance is at or above the target, anyone can call release. The money goes to the beneficiary regardless of who paid the gas. If the deadline passes and the target was never met, each contributor calls refund for themselves. Both buttons appear on the pot page when they are callable.