You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rent sponsorship is a built-in feature of the Light SDK’s that sponsors rent-exemption for all account types to reduce creation cost: mints, token accounts, and PDAs.
22
27
This is dealt with under the hood in a way that doesn’t disrupt the UX of what your users are used to with SPL-token.
23
28
24
-
| Account Creation Cost | Light | Standard Solana |
@@ -217,19 +211,15 @@ Additional extensions can be requested.
217
211
218
212
A standard Solana PDA with sponsored rent-exemption. Seeds, bump derivation, and `invoke_signed` work the same way. Your instruction handlers for reads, updates, and closes don't change.
|**100-byte account**|~0.0016 SOL |~0.0000115 SOL |
214
+
<LightPdaCost />
223
215
224
216
</Accordion>
225
217
226
218
<Accordiontitle="What is a compressed PDA?">
227
219
228
220
A compressed account with a derived address. Programs invoke the Light System program instead of the System program to create and update compressed accounts. Compressed PDAs are always compressed and require a validity proof for every read and write.
Light token accounts replicate the field layout and serialization format of [SPL Token accounts](https://solana.com/docs/tokens#token-account). The struct is serialized with Borsh to match the on-chain format of SPL tokens.
@@ -259,7 +256,7 @@ Here is how light-tokens and SPL tokens compare:
@@ -326,7 +323,7 @@ Under the hood, compressed token accounts store token balance, owner, and other
326
323
<Frame>
327
324
<img
328
325
src="/images/compressed-token-explainer.png"
329
-
alt="Diagram showing compressed token account structure with three components: Hash (identifier for compressed token account in purple box), Account (struct containing Data bytes, Executable flag, Lamports balance, and Address set to None), and AccountData (containing Mint, Owner, Amount, and Extensions fields marked as unimplemented)"
326
+
alt="Diagram showing compressed token account structure with three components: Hash (identifier for compressed token account in purple box), Account (struct containing Data bytes, Executable flag, Lamports balance, and Address set to None), and AccountData (containing Mint, Owner, Amount, and Extensions fields)"
330
327
/>
331
328
</Frame>
332
329
</Tab>
@@ -338,8 +335,8 @@ Under the hood, compressed token accounts store token balance, owner, and other
338
335
pubamount:u64,
339
336
pubdelegate:Option<Pubkey>,
340
337
pubstate:u8,
341
-
///Placeholder for TokenExtension tlv data (unimplemented)
Payment flows on Solana include five core concepts:
@@ -32,14 +33,10 @@ Payment flows on Solana include five core concepts:
32
33
33
34
Our token API's optimize the account creation cost component. You typically create an account (1) when onboarding a new user, and (2) when the recipient does not hold the transferred token yet.
While transfer cost is identical, you can expect ~\$0.30 total when creating a new token account using SPL/Token 2022.
42
-
With Light Token, the total cost will be around \$0.001, regardless of whether a new account is created. Your users use the same stablecoins, just stored more efficiently.
38
+
While transfer cost is identical, you can expect ~\$0.29 total when creating a new token account using SPL/Token 2022.
39
+
With Light Token, the total cost will be around \$0.002, regardless of whether a new account is created. Your users use the same stablecoins, just stored more efficiently.
43
40
44
41
<Accordiontitle="How the cost reduction works">
45
42
The token standard pays rent-exemption cost for you. To prevent griefing, “rent” is paid over time to keep an account in memory. This is dealt with under the hood in a way that doesn’t disrupt the UX of what your users are used to with SPL-token.
|**Account creation**|11,000 lamports | Initial bump on virtual rent balance. Rent-exemption is sponsored. |
41
+
|**Account creation**|17,400 lamports | Initial bump on virtual rent balance. Rent-exemption is sponsored. |
45
42
|**Rent top-ups**|~766 lamports per write | Fee payer bumps the virtual rent balance on each write to keep accounts active. Set `payer` parameter on any Light Token instruction. |
46
43
|**Transaction fees**<br/>+ Priority Fee | 5,000 lamports<br/>+ Priority Fee per tx | Standard Solana fee payer. Set `feePayer` on the transaction. |
1. The Light-token API matches the SPL-token API almost entirely, and extends their functionality to include the light token program in addition to the SPL-token and Token-2022 programs.
15
16
2. Your users hold and receive tokens of the same mints, just stored more efficiently.
0 commit comments