Logo

snek-fun

UnofficialPreliminary, reverse-engineered version published by the tx3 team for testing and exploration. It is not endorsed by the original protocol authors. Do not use in mainnet. • v0.1.0

About this Protocol

Cardano token launchpad — user-facing order flow (place/cancel buy+sell orders)

Parties

The participants involved in this protocol's transactions.

bondingcurvescriptBonding curve pool address shared by all snek.fun launches.
feeaddresssnek.fun launch-fee collector address.
metadatascriptMetadata validator address holding per-token descriptor datums.
orderscriptOrder validator address where escrow UTxOs live; supplied dynamically per user.
userTrader/creator wallet placing orders or launching tokens.

Environment

Configuration values required to execute this protocol's transactions.

a_numBonding curve numerator constant `a` (v1: 122_525_779_519).integer
ada_cap_thresholdGraduation threshold in lovelace (v1: ~18_188_400_000 ± per-pool jitter).integer
b_numBonding curve numerator constant `b` (v1: 2_545_182).integer
executor_feeFixed tip paid to the batcher inside every order UTxO.integer
factory_witnessFactory witness PKH stamped into every pool datum./$defs/Bytes
min_order_out_adaMinimum ADA returned to the user when the batcher fills the order.integer
order_validator_refReference UTxO holding the order validator script (plutusV2)./$defs/UtxoRef
permitted_executorPermitted-executor (snek.fun batcher) PKH recorded in every order datum./$defs/Bytes
pool_nft_policyStable pool NFT minting policy under which beacon tokens are minted./$defs/Bytes
sell_escrow_adaFixed escrow ADA for a sell order (= executor_fee + min_order_out_ada).integer
token_emissionTotal token supply minted per launch (v1: 1_000_000_000).integer

Transactions

The transactions defined in this protocol, with their parameters, inputs, and outputs.

launch_token

Mint a new memecoin, seed its bonding curve pool, and publish its metadata in one transaction.

Diagram

launch_tokenada_cap_thresh_for_poolcreator_min_adacreator_pkhcreator_stake_keycurve_tokens_remainingdescriptiondiscordempty_bytesinitial_buy_tokenslaunch_fee_adalaunch_typelogo_cidmetadata_min_adametadata_nft_namemetadata_versionpool_nft_namepool_seed_adapool_witness_pkhseed_idxseed_txseed_utxotelegramtickertoken_nametoken_policytoken_scripttwitterwebsite user bondingcurvescript feeaddress metadatascript user source seed output 3 output 2 output 1 output 4 output 5

Parameters

ada_cap_thresh_for_poolIntPer-pool ADA graduation threshold (env's ada_cap_threshold ± jitter).
creator_min_adaIntMin-ADA returned with the creator's initial token holding.
creator_pkhBytesCreator payment PKH (duplicated into pool and metadata datums).
creator_stake_keyBytesCreator stake key hash (duplicated into pool and metadata datums).
curve_tokens_remainingIntTokens deposited at the bonding curve (token_emission - initial_buy_tokens - 1 metadata NFT).
descriptionBytesFree-form token description stored in metadata.
discordBytesDiscord handle bytes stored in metadata socials.
empty_bytesBytesEmpty bytes literal used to encode the ADA asset id (policy="" name="").
initial_buy_tokensIntTokens delivered to the creator as the initial "dev buy".
launch_fee_adaIntLovelace launch fee paid to the snek.fun collector.
launch_typeIntLaunch type marker stored in metadata.
logo_cidBytesIPFS CID of the token logo stored in metadata.
metadata_min_adaIntMin-ADA attached to the metadata NFT output.
metadata_nft_nameBytesAsset name of the CIP-68 metadata reference NFT (same policy as token).
metadata_versionIntMetadata schema version integer.
pool_nft_nameBytesAsset name of the pool beacon NFT (derived from the seed outref).
pool_seed_adaIntLovelace seeded into the bonding curve pool output.
pool_witness_pkhBytesPool-specific witness PKH baked into the pool datum (varies per pool).
seed_idxIntSeed UTxO output index; embedded in the pool NFT mint redeemer.
seed_txBytesSeed UTxO tx hash; embedded in the pool NFT mint redeemer.
seed_utxoUtxoRefSeed UTxO that parameterises the new token's minting policy.
telegramBytesTelegram handle bytes stored in metadata socials.
tickerBytesToken ticker bytes stored in metadata.
token_nameBytesAsset name of the new memecoin.
token_policyBytesPer-launch token policy id (== script hash of the parameterised minting policy).
token_scriptBytesHex CBOR of the parameterised token minting script (PlutusV2).
twitterBytesTwitter handle bytes stored in metadata socials.
websiteBytesWebsite URL bytes stored in metadata socials.

Inputs

seedwallet
sourceuserwallet

Outputs

metadatascriptyesno
feeaddressnono
bondingcurvescriptyesno
usernono
usernono

place_sell_order

Deposit tokens (plus fixed sell_escrow_ada) into an order UTxO so the batcher returns ADA to the user.

Diagram

place_sell_orderdeadline_msempty_bytestoken_amounttoken_nametoken_policyuser_pkhuser_stake_key user orderscript user source output 1 output 2

Parameters

deadline_msIntDeadline in unix millis after which the batcher must reject the order.
empty_bytesBytesEmpty bytes literal used to encode the ADA asset id (policy="" name="").
token_amountIntQuantity of tokens to sell into the bonding curve.
token_nameBytesAsset name of the token being sold.
token_policyBytesPolicy id of the token being sold.
user_pkhBytesUser payment PKH; embedded in the order datum's owner address.
user_stake_keyBytesUser stake key hash; embedded in the order datum's owner address.

Inputs

sourceuserwallet

Outputs

orderscriptyesno
usernono

cancel_order

Reclaim the user's own pending order UTxO back to their wallet.

Diagram

cancel_orderorder_utxo user user source order_input output 1 output 2

Parameters

order_utxoUtxoRefUtxoRef of the order UTxO to cancel.

Inputs

order_inputscript
sourceuserwallet

Outputs

usernono
usernono

place_buy_order

Deposit ADA into an order UTxO so the snek.fun batcher can buy tokens on the user's behalf.

Diagram

place_buy_orderada_inputdeadline_msempty_bytestoken_nametoken_policytotal_escrow_adauser_pkhuser_stake_key user orderscript user source output 1 output 2

Parameters

ada_inputIntLovelace the batcher may spend buying tokens (derived from desired slippage).
deadline_msIntDeadline in unix millis after which the batcher must reject the order.
empty_bytesBytesEmpty bytes literal used to encode the ADA asset id (policy="" name="").
token_nameBytesAsset name of the token the user wants to buy.
token_policyBytesPolicy id of the token the user wants to buy.
total_escrow_adaIntPre-summed escrow: ada_input + executor_fee + min_order_out_ada.
user_pkhBytesUser payment PKH; embedded in the order datum's owner address.
user_stake_keyBytesUser stake key hash; embedded in the order datum's owner address.

Inputs

sourceuserwallet

Outputs

orderscriptyesno
usernono

Profiles

Pre-configured sets of environment and party values for different deployment targets.

mainnet
feeaddressaddr1qy32agk6zhjffcqhvu296j9a594k6smlr3zfsgaqgsvnmtefn2pw7433r2ss4hcycqrj6jrsaw056hlnz5fjgdyyrd6qsw8ngtparty
bondingcurvescriptaddr1xxg94wrfjcdsjncmsxtj0r87zk69e0jfl28n934sznu95tdj764lvrxdayh2ux30fl0ktuh27csgmpevdu89jlxppvrs2993lwparty
metadatascriptaddr1q8lsjfvtpnu9kv5zhwgsdcw03tlkuwcvjqmzm35arx9xl6k6s0uhca7762y56q2j9en5ttn69p7a048cw3mz62fuj3mqauv0x3party
a_num122525779519env
ada_cap_threshold18188400000env
b_num2545182env
executor_fee1500000env
factory_witness8807fbe6e36b1c35ad6f36f0993e2fc67ab6f2db06041cfa3a53c04aenv
min_order_out_ada1100000env
order_validator_refe2ed9e953ebf98ca701fc93588d73cb9769f87b9d13712474f566a0743963e8b#0env
permitted_executore865941988edcca559268b57b7ee939974fd42fd26c7e1acd7a50678env
pool_nft_policy63f947b8d9535bc4e4ce6919e3dc056547e8d30ada12f29aa5f826b8env
sell_escrow_ada2600000env
token_emission1000000000env
Back to all Protocols