LogoLogo
  • 🌊💸 Welcome to Fluidity Money
  • Docs
    • 📚Learning and getting started
      • 🔮Why Fluidity?
      • ❓What are Fluid Assets?
      • 🌟How do you get a Fluid Asset?
      • 💰How are the rewards earned?
      • 🗃️The Economics of a Fluid Asset
        • ✏️Transfer Reward Function (TRF) Example
      • 📋Tutorials
        • How to use Fluidity
    • 🏡Addresses
      • 🅰️Arbitrum
      • ☀️Solana
      • 💧Sui
      • 😳Superposition devnet
    • 🔠Fundamentals
      • 📄FAQ
      • 🔫Fluidity Wars
      • ⛏️Utility Mining
      • 🤝For arbitrage
      • 🏛️Understanding the $FLY Governance Token
        • 💸Fluidity $FLY Vaults
        • 🪙Understanding $FLY Tokenomics
      • ⛓️Launch restrictions (mint limits)
      • 🔓Governance structure
      • 🚂Advisory team
      • 👩‍🏫👩🏫 Laws of Fluidity
      • 🛣️Roadmap
        • 🚀Product roadmap
        • 🌤️Decentralisation roadmap
      • 👩‍🚀Why instant rewards?
    • 💸Use-cases
      • ⌨️Developers
      • 🦄DEXs
      • ✨Fluid Assets and Utility
      • 🎮Metaverse and Gaming
      • 🖼️NFTs
      • 💳Transactions and Payments
      • 🌊Other Use-Cases
    • 🎪Developers
      • 🏢Architecture
        • 👷Worker architecture
        • 💠Ethereum contract architecture
        • ☀️Solana program architecture
      • 🎍EVM ABIs
      • ☀️Solana account structure
      • 🙋How can I Fluid Wrap my custom token?
      • 📊GraphQL
      • 🧾Dev Tutorials
        • ⛏️Creating a New Utility Mining Client
        • 👩‍💻Supporting a New Application
        • 💸Sending and receiving a Fluid Asset
        • 🚄Supporting a Fluid Asset on your DEX/AMM/exchange
        • 🎁Wrapping and unwrapping a Fluid Asset in your app
        • 🌊Providing liquidity for a Fluid Asset
      • 📔Whitepapers
    • 💪Security
      • 🤳Website/infrastructure security
      • 📥Dropboxes
      • 💰Bounty program
      • 📜Audits completed
      • 🫂Contactable team
    • 🤝Partnerships/collaboration
      • 🤝Partnering with us
      • 👐Join us!
      • 💬Fluidifying your asset
        • 😎Brand assets
    • Useful links
      • Fluidity website and whitepapers
      • Fluidity Whitepaper v1.0
      • Discord server
      • Medium
      • Telegram
Powered by GitBook
On this page

Was this helpful?

  1. Docs
  2. Developers
  3. Architecture

Solana program architecture

PreviousEthereum contract architectureNextEVM ABIs

Last updated 2 years ago

Was this helpful?

Solana is built as a program that derives new accounts for its supported tokens.

Solana architecture simplified

Each account's layout can be read at .

The program supports the following instructions:

// wrap fluid token
Wrap(u64, String, u8),

// unwrap fluid token
Unwrap(u64, String, u8),

// payout two accounts
Payout(u64, String, u8),

// initialise solend obligation account
InitSolendObligation(u64, u64, String, u8),

LogTVL,

// initialise the data account for this token
InitData(String, u64, u64, u8, u64, u64),

// move from prize pool to account
MoveFromPrizePool(u64, String, u8),

// update mint limit to an amount
UpdateMintLimit(u64, String),

// update the payout restriction limit
UpdatePayoutLimit(u64, String),

// update the payout authortity (the rng oracle)
UpdatePayoutAuthority(String),

// update the operator (the multisig)
UpdateOperator(String),

// confirm the payout authority in the two step replacement process
ConfirmUpdatePayoutAuthority(String),

// trigger emergency mode
Emergency(String)

Features in pseudocode form

Wrapping in (Wrap)

  1. Using Solend, the program deposits the user's given amount as liquidity

  2. The program determines the collateral account from Solend

  3. The program stores the collateral in the obligation account for the token

  4. Using the SPL token, user tokens are minted proportionate to the amount deposited

Wrapping out (Unwrap)

  1. Contract burns the user's SPL tokens

  2. Refreshes the Solend reserve

  3. Calculates the Solend collateral amount in the obligation account

  4. Withdraws from Solend to the user's token account

🎪
🏢
☀️
Solana account structure