Skip to content

Commit 1ecd10e

Browse files
update
1 parent 5e975ab commit 1ecd10e

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

light-token/defi/programs.mdx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ pub struct InitializePool<'info> {
274274
</Accordion>
275275

276276
## Step 5: Instructions
277-
Replace `spl_token` with `light_token` instructions as you need.
277+
Replace `spl_token` with `light_token` instructions as you need. The API is a superset of SPL-token so switching is straightforward.
278278

279279
Examples include: `MintToCpi`, `TransferCpi`, `TransferInterfaceCpi`,
280280
`CreateTokenAccountCpi`, and `CreateTokenAtaCpi`.
@@ -492,8 +492,6 @@ Clients can load cold accounts back when needed via `create_load_instructions`.
492492

493493
Under the hood, clients use `AccountInterface` - a superset of Solana's `Account` that unifies hot and cold state. See [Router Integration](./routers) for details.
494494

495-
496-
#### Hot/cold cycle
497495
| | Hot (active) | Cold (inactive) |
498496
|---|---|---|
499497
| Storage | On-chain | Compressed |
@@ -507,24 +505,25 @@ If you have an existing program that you would like to migrate to rent-free acco
507505

508506
## FAQ
509507

510-
<Accordion title="Who triggers compression?">
511-
Foresters automatically compress when virtual rent depletes (~4 days idle). You don't trigger it.
512-
</Accordion>
508+
<Accordion title="How do you prevent re-init attacks for cold accounts?"> When
509+
you create an account, under the hood, the SDK auto-provides a proof that
510+
verifies that the account does not yet exist in the compressed address space.
511+
The SVM takes care of uniqueness in the onchain space. This way both account
512+
spaces are covered, preventing re-init attacks. </Accordion>
513513

514-
<Accordion title="Can active pools get compressed?">
515-
No. Any interaction resets the timer. Active pools never compress.
516-
</Accordion>
514+
<Accordion title="Who triggers compression?"> Miners automatically compress when
515+
virtual rent is below threshold (eg 24h without write bump). </Accordion>
517516

518-
<Accordion title="What happens to token balances?">
519-
Preserved exactly. Compressed state includes full balance. Restored on load.
517+
<Accordion title="Can active pools get compressed?">
518+
No. Any write bumps the virtual rent balance. Active pools never compress.
520519
</Accordion>
521520

522521
<Accordion title="Do I need to run infrastructure?">
523-
No. Helius runs Photon (indexer), Light Protocol runs foresters. Self-hosting optional.
522+
No. Helius and Triton run the Interface RPC endpoints, self-hosting optional.
524523
</Accordion>
525524

526525
<Accordion title="What if indexer is down?">
527-
Hot pools work normally. Cold pools can't load until recovery. No data loss.
526+
Hot pools work normally. Cold pools can't load until recovery. No data or safety loss.
528527
</Accordion>
529528

530529
---

0 commit comments

Comments
 (0)