Implementation of Protocol
Desoci is built on the Solana blockchain, leveraging its high throughput and low-cost transaction capabilities to provide fast and efficient interactions. The platform employs Solana's official contract for message immutability and uses a two-step process for interactions: a basic transfer and a contract call to store information on-chain.
Basic Transfer and Contract Call Implementation
The Desoci protocol integrates a fundamental transfer mechanism along with a contract invocation to store messages immutably on the blockchain. These interactions are facilitated by two Solana instructions: one for transferring funds and another for storing data (messages) on-chain.
1.Basic Transfer
The first instruction in the process is a simple transfer of funds between two parties. This is handled by the SystemProgram.transfer function. The transfer occurs between the payer's public key and the recipient's public key, with a specified amount of lamports (Solana's smallest unit of currency).
const instructions = [];
instructions.push(
SystemProgram.transfer({
fromPubkey: payerPublicKey,
lamports: amount,
toPubkey,
}),
);
payerPublicKey: The sender's public key.amount: The number of lamports to transfer.toPubkey: The recipient's public key.
2.Message Storage on Chain (Immutability)
The second instruction stores the message on-chain, ensuring that the information is immutable. This is done using Solana's Memo program (MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr), which writes the message into the blockchain in a way that cannot be altered.
payerPublicKey: The public key of the sender (used for signing the transaction).programId: The program ID of the Memo program, which handles storing the message.data: The message to be stored on the blockchain, which is converted into a buffer format.
Immutability and Transparency
Once the message is stored through the Memo program, it becomes permanently recorded on the Solana blockchain. This ensures that the message cannot be modified or deleted, guaranteeing the integrity and transparency of the communication. Users can query this data on Solscan or other blockchain explorers to verify its authenticity.
Last updated