Sorry, you have been blocked
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
What can I do to resolve this?
You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.
Cloudflare Ray ID: 819061fc8d9a3560 • Your IP: Click to reveal 5.253.206.36 • Performance & security by Cloudflare
Токены Solan'ы
Понимание токенов Solana может быть довольно сложным, если вы имеете опыт работы с Ethereum. В Ethereum обычные токены используют стандарт ERC20, а NFT токены используют стандарт ERC721. Каждый токен ERC20, ровно как и каждая NFT коллекция, имеет свой собственный смарт-контракт
Модель аккаунтов Соланы
Чтобы понять как работают токены на солане, вам сначала нужно понять модель учетных записей соланы. Я настоятельно рекомендую прочитать эту вики , особенно если вы имеете опыт работы с Ethereum. Вот краткая выжимка:
-
Учетная запись либо содержит данные (например, сколько у вас токенов), либо представляет собой исполняемую программу (например, смарт-контракт). Первые называются «data accounts», а вторые — «program accounts». Важно отметить, что в отличие от Ethereum, учетные записи программы не хранят состояние. Все состояние хранится в учетных записях данных Каждый аккаунт содержит следующие поля:
-
Каждая учетная запись имеет уникальный адрес (похожий на Ethereum). Большинство адресов являются открытым ключом keypair Каждая учетная запись принадлежит program. По умолчанию вновь созданная учетная запись принадлежит встроенной программе под названием «System Program». Только владелец учетной записи может изменить ее
Для получения более подробной информации вы можете обратиться к вики , о которой я упоминал выше, или прочитать краткий учебник по учетным записям
Что такое Solana’s Token Program?
Solana Token Program позволяет следующее (для взаимозаменяемых и невзаимозаменяемых токенов):
-
Минт токенов Трансфер токена Сжигание токенов
Вот hana рассказывал о том, как это работает:
По сути, вместо развертывания нового смарт-контракта ERC20 для каждого нового токена, все, что вам нужно сделать, это отправить инструкцию программе токена. В зависимости от того, какую инструкцию вы отправляете, программа токенов будет минтить/передавать/сжигать токены
Если вы еще не совсем поняли, не волнуйтесь! Рассмотрение примера должно прояснить ситуацию!
Примечание: иногда вы увидите токены Solana, называемые «SPL tokens». SPL означает Solana Program Library (библиотеку программ Solana), которая представляет собой набор программ Solana, которые команда Соланы развернула в сети. Токены SPL аналогичны токенам ERC20, поскольку каждый токен SPL имеет стандартный набор функций
Как работает Solana Token Program?
Самый простой способ понять это — рассмотреть несколько примеров. В наших примерах будут рассмотрены взаимозаменяемые токены, и мы будем использовать инструмент командной строки spl-token для взаимодействия с программой токена (вы можете установить его, запустив в командной строке cargo install spl-token-cli)
Повторюсь, все, что делает spl-token — это отправляет инструкции в token program. Вы можете имитировать следующее поведение, используя клиент JavaScript или взаимодействуя с программой токена через CPI в Rust
Подготовка
Во-первых, убедитесь, что вы установили Solana CLI и spl-token
Затем запустите solana-keygen new -o
/my_solana_wallet1.json и создайте новую переменную окружения с именем $SOLADDR1, в которой будет храниться полученный открытый ключ. Повторите эти действия, но со второй переменной окружения с именем $SOLADDR2 (и назовите файл пары ключей my_solana_wallet2.json). Мы будем использовать эти адреса и файлы пар ключей позже, чтобы протестировать минт и трансфер токенов
Вот как это выглядит у меня:
Примечание: многие команды в этом руководстве можно сократить, запустив solana config set — keypair
/my_solana_wallet1.json, который устанавливает пару ключей клиента по умолчанию. Например, это позволяет не указывать флаг —owner для многих из следующих команд. Я использую более длинные версии команд, чтобы обьяснение было более понятным
Создание токена
Теперь, когда мы все настроили, мы можем использовать spl-token. Во-первых, давайте создадим новый тип токена
При создании токена нового типа создается новая учетная запись с данными, которую в дальнейшем мы будем называть «mint account». Каждый тип токена связан ровно с одним mint account. Адрес mint account — 6ifRGEkJ6XmEjuqfTFNqAjjomUiDJTjRv4GHqBH6usWr, но вместо этого мы будем использовать $TOKEN1, чтобы упростить чтение. Мы можем запросить информацию об учетной записи следующим образом (в конце много непонятных символов, но не переживайте, они нам пока не нужны):
Мы можем проверить владельца (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) с помощью Solana Explorer . Владельцем является token program (учетная запись программы), которая отвечает за создание новых токенов, минт токенов и передачу токенов
Теперь давайте посмотрим на данные mint account, которые идут после «Length: 82 (0x52) bytes», как показано выше. Человеку трудно читать шестнадцатеричные данные, поэтому вместо этого мы можем использовать Solana Explorer :
Solana Explorer декодирует данные и отображает их в удобочитаемом формате. Вот что означает каждое из полей:
-
Address — это адрес mint account Current Supply — количество сминченных токенов. Поскольку мы только что создали токен, он равен 0 Mint Authority — открытый ключ из keypair, которому разрешено минтить токены (мы указали это с помощью флага —mint-authority. Если кто-то еще попытается минтить токены, то он этого не сможет) Decimals — определяет наименьший номинал токена. Для NFT он должен быть равен нулю. Девять по умолчанию
Прежде чем мы двинемся дальше, вот простая диаграмма, показывающая учетные записи, которые находятся в контакте, и то, как они связаны
-
«Internal Solana relations» относятся к полю владельца, которое устанавливается для каждой учетной записи, например владелец, который отображается при запуске учетной записи solana $TOKEN1 «User-space relations» — это когда отношение между двумя учетными записями закодировано в данных учетной записи, например поле «mint authority», которое мы видели выше
Создание Token Account
Прежде чем мы сможем создать токены, мы должны сначала создать учетную запись токена
Отныне мы будем использовать $TOKENACCT1 вместо 9EYnoqiBQmJPR55db44cF4wkN1PD5D6vjxEz61r2Ujak, и мы будем называть эту учетную запись «token account». Вам может быть интересно, что такое токен-аккаунт? По сути, он просто хранит, сколько токенов есть у конкретного пользователя для определенного типа токена. Например, если у вас есть 10 токенов 1 и 5 токенов 2, то у вас будет две учетные записи токенов
Вот как выглядит токен-аккаунт:
Учетная запись токена связана с тремя другими учетными записями. Его внутренним владельцем является token program, поскольку token program должна иметь возможность изменять учетную запись (например, добавлять к ней больше токенов). Затем в пользовательском пространстве его владельцем является $SOLADDR1, а его «mint» или связанный с ним mint account — $TOKEN1
Вот как теперь связаны все аккаунты:
Token Minting
Наконец-то мы можем сминтить токены! Эта часть проще — мы просто указываем mint account (которая определяет «type» токена для минта), количество токенов и учетную запись, которой их нужно передать
Помимо использования spl-token balance, вы также можете использовать spl-token accounts, чтобы просмотреть, сколько каждого токена принадлежит определенной учетной записи
Что произойдет, если вы попытаетесь создать токены с другим значением параметра —mint-authority?
Ответ? Это не работает! Это связано с тем, что в поле «mint authority» token account'а указана другая учетная запись, и только этой учетной записи разрешено минтить новые токены
Token Transferring
Давайте попробуем перенести некоторые токены в $SOLADDR2 (которые должны были быть созданы в разделе « Подготовка »)
Неудача! Сообщение об ошибке говорит, что нам не разрешено передавать токены, если у получателя нет token account
Есть два способа исправить это:
-
Создайтеtoken account для получателя, а затем перенесите токены. Используйте флаг —fund-recipient. Это заставляет отправителя платить за создание token account получателя
Мы пойдем с подходом № 1
Красиво, сработало! Давайте посмотрим на все учетные записи в этом действии
Wrapped SOL
Точно так же, как ETH можно обернуть токеном ERC20, чтобы сформировать wETH, так и SOL можно обернуть токеном SPL
Конечно, вы можете обратно развернуть полученный токен SPL, чтобы вернуть свои SOL
Такая упаковка SOL позволяет легко обменивать SOL на другие токены SPL
Подождите, а как там NFT?
Теперь, когда мы рассмотрели, как работают взаимозаменяемые токены, понять, что такое невзаимозаменяемые токены, должно быть легко. Я просто позволю вам прочитать доки , так как в любом случае я бы не стал много добавлять. Основными важными моментами являются:
-
Используйте —decimals 0 при создании токена, так как он должен быть только один После минта одного токена отключите минты в будущем. Это гарантирует, что будет только один токен
На практике никто не создает NFT таким образом. Вместо этого большинство людей используют Candy Machine , инструмент для загрузки изображений и метаданных и создания NFT на их основе
Вот и все! К этому моменту вы должны понимать, как работают токены SPL и чем они отличаются от токенов ERC20
The complete guide to Solana program library (SPL) tokens
The SPL Token program is the Solana blockchain's token standard. In the same way that ERC20 tokens are for the Ethereum network, SPL Tokens are built for DeFi and other dApps running on top of the Solana blockchain.
The SPL Token Program provides an interface and implementation that third parties can base on to create and use their tokens.
You can learn more about the SPL Token Program here.
Another cool thing to note is that if a user wishes to move assets from Ethereum to Solana, they can utilize Solana's Wormhole cross-chain bridge. Wormhole accomplishes this by letting users lock their ERC20 tokens in a smart contract and mint associated SPL tokens on Solana.
What are SPL tokens?
Once you understand what the Solana Program Library Token Program is, it probably becomes clear what SPL tokens are. But, still, let’s break it down.
SPL tokens are basically fungible tokens on the Solana Blockchain. These need to fit the standards set by the SPL Token Program and can be used on various platforms of the Solana blockchain, varying depending on their purpose and engagement. A very popular example for a SPL token is USDC, Circle’s USD stable coin that runs on several blockchains.
How to get SPL tokens?
There are a few ways to buy SPL tokens. You can either buy them on exchanges such as Kraken, Binance, or Coinbase. Alternatively, you can also buy them on several DEXs such as Serum or Orca.
How to store SPL tokens?
Since these SPL tokens are designed for the Solana network, they can be stored and managed in a Solana wallet. Some of the most popular Solana compatible wallets users choose to hold SPL tokens in are Sollet, Solflare, and Phantom. It's encouraged that the wallet creates the associated token account itself for a given SPL Token, otherwise, it may limit the user's ability to receive.
It is also important to note that when you want to transfer tokens like USDC to your wallet, you need to send them to your USDC recipient address and NOT your regular Solana address! Both Solflare and Phantom make this process super easy. For transferring SPL tokens, simply add the preferred token to your wallets’ token list, copy the wallet address of the destination account, choose the token amount, and send funds to it. Also, make sure that your new wallet has enough SOL tokens for transaction fees, otherwise, an error message will appear.
Setting up a Solana SPL token wallet
If this is your first time setting up a Solana SPL token wallet or staking your SOL, we have this tutorial with Solflare.
One important note for first-timers is to write down the Seed Words and keep them stored in a secure place. Wallets like Solflare and Sollet will ask you to re-enter your Seed Words to ensure you've noted them down.
If you're interested in creating a new wallet that supports SPL tokens, you can check this list of wallets.
You can also check to see your token balances and transaction statuses on the Solana Beach block explorer.
In conclusion
Learning the basics of a new blockchain, like Solana, can be tricky even for those who know how to code. But by starting early, learning how these dApps interact with each other, and grasping these general concepts, you'll come to find out that it's not as difficult as you thought and best yet, that you're part of a technological revolution that's just beginning. You'll also be able to take advantage of some of the incentives that come with this new economy. Understanding the SPL Token Program is just a start as there are other programs designed by the Solana Foundation like the Token Swap and the Token Lending Program. Stay tuned as we continue to release new guides on other Solana programs in the future.
Let’s hear about it!
Missing anything? Thoughts, feedback, or questions about the post?
Please note that none of this is to be considered financial nor investment advice. We highly advise you to always do your own research (’DYOR’) before interacting with any of the projects or tools we write about. Crypto is a highly dynamic and fast paced environment with lots of moving parts that can quickly change.
What are SPL tokens?

SPL tokens are tokens on the Solana blockchain. They conform to the Solana Program Library, a collection of on-chain programs that govern how the tokens function.
Altcoins have become a dirty word in much of the legacy financial system, primarily due to 2017’s ICO era. Wall Street, or at least the ‘Old Wall‘ (and the IRS), recognizes Bitcoin and Ethereum as commodities while dismissing other tokens as a general altcoin market full of valueless tokens and a few diamonds in the rough. While untrue in many cases, usefulness is certainly not a default aspect of the technology.
Think of the native asset (the one that pays the fees) of a blockchain (ETH on Ethereum, AVAX on Avalanche) as the coin, and think of the tokens built on those blockchains (AAVE, JOE) as the digital assets that conform to a given token standard instituted by the network.
For example, SOL serves two primary purposes:
- Securing the blockchain by being delegated to a decentralized network of validators.
- For more information on how this works, check out this link.
- Each transaction you make on the Solana blockchain requires SOL to be paid as a fee.
- Don’t worry. The average transaction cost on Solana is around 0.000005 SOL, or about $0.001.
SOL serves as the unit of account for the Solana ecosystem because all the NFT exchanges on Solana currently denominate their NFTs in SOL. This could change, but it has become the standard since the onset of these exchanges.
Are SPL Tokens fungible?
Think of fungible tokens as being exchangeable for one another. Bitcoin is fungible because you can exchange 1 Bitcoin for 1 Bitcoin. Every Bitcoin is the same. NFTs are non-fungible because every NFT is unique, valued differently, and can serve various purposes.
SPL tokens refer to all the on-chain program libraries that Solana has implemented. This means that a token you are using to purchase a Solana NFT is an SPL token, and the NFT itself is an SPL token.
It’s similar to the fact that Ethereum’s ERC20 token standard defines how fungible tokens like UNI, AAVE, and YFI operate. In contrast, the ERC721 token standard defines how non-fungible tokens, like every NFT, operate.
What is the point of a token standard?
Solana is the world’s fastest smart contract-enabled blockchain, attracting hordes of developers and entrepreneurs. For smart contract networks to operate effectively, token standards are necessary implementations as they help govern the capabilities and limits of the decentralized applications built on them. Token standards also enable decentralized applications to generate incentives within their network of users.
SPL tokens can vary greatly. One can be an NFT, one can be a token with a circulating supply of 10, one can be a token with a circulating supply of 1 quadrillion, and one can even be a derivative of a real-life asset, like a condo or a diamond.
Synthetic Tokens
Synthetic tokens are slowly but surely finding their place in decentralized financial markets.
Using ERC20 tokens and the oracle protocols on Ethereum, Synthetix, and UMA (Universal Market Access) can mint a token to reflect the values of objects located outside the Ethereum network. Oracles are third-party data feeds that connect smart contracts with data outside their network.
Say you want to trade Apple’s stock on a blockchain. You can head over to a synthetic protocol like Mirror on Terra and see that you can trade mAAPL which reflects the real-time value of Apple’s stock on the New York Stock exchange – during the NYSE’s trading hours, of course.
Solana has a few projects building synthetic tokens, but they have yet to go live. For more information on synthetic SPL tokens, check out Synthetify’s Whitepaper.
How to use SPL tokens
Holding, sending & receiving, swapping, and staking SPL tokens requires an SPL-compatible wallet. A wallet built strictly for Ethereum utilizes only ERC20 & ERC721 tokens and won’t work with SPL tokens. If you do send SPL tokens to an Ethereum address, you will either have the transaction denied or lose the funds forever.
To avoid that hassle, you can set up Solana’s most powerful non-custodial wallet, Solflare. Click here to learn more about Solflare’s swap feature and here for its staking features.
Once you have generated your Solflare wallet, you must fund it by sending SPL tokens from the exchange. You then have access to the wonderful worlds of DeFi, NFTs, and DAOs.
DAOs & Tokens
DAOs (decentralized autonomous organizations) come in many shapes and sizes. The primary function of a DAO is to allow members to participate in the governance of an organization, community, protocol, or product. The majority of DAOs require a token (ERC, SPL, ASA – Algorand’s Standard Asset, etc.) to be held in your wallet for you to be eligible to vote or create proposals. For example, holders of the UNI token on Ethereum get to vote on how the treasury is governed. Uniswap’s treasury is over $10 billion.
Squads and Goki Protocol are building the necessary infrastructure for DAOs to succeed on Solana. With Squads’ Voting and Treasury features implemented alongside Goki’s multi-sig wallet, DAOs can form and enact proposals quickly and efficiently.
Conclusion
SPL token standards are the backbone of Solana’s burgeoning DeFi, NFT, and DAO ecosystems. They help maintain decentralized controls over protocols, enable novel products like synthetics, and create new forms of governance.
Once you wrap your head around the idea that, when designed and managed effectively, any token can be a force for good, you’ll see the value of token standards and their massive benefits to society.