Reference
The contract
Functions
| Function | Who | What it does |
|---|
| sealWithPermit | Sender | Takes the USDG with a permit, sends 1% to the pot, buys the stock, seals it under the link's address |
| open(linkKey, to, sig) | Anyone | Checks the link's signature for to and delivers the share before day 30 |
| giveBack(linkKey) | Anyone, after day 30 | Returns an unopened share to its sender, and only to its sender |
| envelope(linkKey) | View | Sender, stock, raw amount, deadline, state |
| stats() | View | Envelopes sealed, opened, returned, and dollars sealed |
The signature
// EIP-712, domain { name: "Noshi", version: "1", chainId: 4663, verifyingContract }
Open(address linkKey, address to)
// signed in the browser with the link's private key,
// so it can only ever deliver to "to"
Addresses
Limits
- An envelope holds between $1 and $1,000.
- Only the fifteen stocks and funds listed at deployment can be sealed, each with its Uniswap pool.
- Amounts are stored raw and shown with the token's current multiplier, so splits and reinvested dividends display correctly.
- The 30 days are a constant in the contract. Nobody can change them.