q-token is a Quasar-based token program that targets SPL Token instruction
compatibility while keeping account access zero-copy and benchmark-friendly.
- Quasar entrypoint and dispatcher
- SPL-compatible mint, token-account, and multisig layouts
- Core SPL Token instructions through
UiAmountToAmount - Unit coverage for state initialization and transfer flow
- Binary-level benchmark harness for
spl-token,p-token, andq-token
q-token currently implements the SPL-compatible instruction set covered by
the benchmark suite:
InitializeMintInitializeAccountInitializeMultisigTransferApproveRevokeSetAuthorityMintToBurnCloseAccountFreezeAccountThawAccountTransferCheckedApproveCheckedMintToCheckedBurnCheckedInitializeAccount2SyncNativeInitializeAccount3InitializeMultisig2InitializeMint2GetAccountDataSizeInitializeImmutableOwnerAmountToUiAmountUiAmountToAmount
P-Token-only extensions such as batch, unwrap_lamports, and
withdraw_excess_lamports are not part of q-token yet.
Measured with real SBF ELFs loaded into Mollusk:
| Instruction | SPL | P-Token | Q-Token |
|---|---|---|---|
InitializeMint |
2968 | 105 | 146 |
InitializeAccount |
4501 | 154 | 175 |
InitializeMultisig |
2783 | 178 | 298 |
Transfer |
4645 | 76 | 207 |
Approve |
2904 | 126 | 156 |
Revoke |
2677 | 108 | 105 |
SetAuthority |
2896 | 138 | 160 |
MintTo |
4492 | 119 | 188 |
Burn |
4743 | 123 | 195 |
CloseAccount |
3051 | 118 | 194 |
FreezeAccount |
4265 | 145 | 161 |
ThawAccount |
4267 | 141 | 163 |
TransferChecked |
6173 | 105 | 247 |
ApproveChecked |
4431 | 163 | 197 |
MintToChecked |
4499 | 161 | 195 |
BurnChecked |
4744 | 126 | 199 |
InitializeAccount2 |
4362 | 172 | 175 |
SyncNative |
3045 | 205 | 228 |
InitializeAccount3 |
4214 | 239 | 279 |
InitializeMultisig2 |
2636 | 289 | 401 |
InitializeMint2 |
2828 | 219 | 254 |
GetAccountDataSize |
1595 | 183 | 161 |
InitializeImmutableOwner |
1405 | 38 | 31 |
AmountToUiAmount |
2397 | 444 | 436 |
UiAmountToAmount |
2985 | 700 | 821 |
cargo test --libcargo test --test benchmark_token -- --nocapturecargo build-sbf --offline
The benchmark suite compares q-token against:
- the local
q-tokenSBF artifact attarget/deploy/q_token.so - a built
p-tokenSBF artifact from the siblingtokenrepository
cargo check
cargo test --lib
cargo build-sbf --offline
cargo test --test benchmark_token -- --nocaptureTo include Pinocchio benchmarks, build the upstream program first. If the
token repository sits next to this one, run:
cargo build-sbf --manifest-path ../token/pinocchio/program/Cargo.toml