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

Solana account structure

The following structures are literally copied from the contract source code:

pub struct LendingMarket {
    /// Version of lending market
    pub version: u8,
    /// Bump seed for derived authority address
    pub bump_seed: u8,
    /// Owner authority which can add new reserves
    pub owner: Pubkey,
    /// Currency market prices are quoted in
    /// e.g. "USD" null padded (`*b"USD\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"`) or a SPL token mint pubkey
    pub quote_currency: [u8; 32],
    /// Token program id
    pub token_program_id: Pubkey,
    /// Oracle (Pyth) program id
    pub oracle_program_id: Pubkey,
    /// Oracle (Switchboard) program id
    pub switchboard_oracle_program_id: Pubkey,
}
pub struct Obligation {
    /// Version of the struct
    pub version: u8,
    /// Last update to collateral, liquidity, or their market values
    pub last_update: LastUpdate,
    /// Lending market address
    pub lending_market: Pubkey,
    /// Owner authority which can borrow liquidity
    pub owner: Pubkey,
    /// Deposited collateral for the obligation, unique by deposit reserve address
    pub deposits: Vec<ObligationCollateral>,
    /// Borrowed liquidity for the obligation, unique by borrow reserve address
    pub borrows: Vec<ObligationLiquidity>,
    /// Market value of deposits
    pub deposited_value: Decimal,
    /// Market value of borrows
    pub borrowed_value: Decimal,
    /// The maximum borrow value at the weighted average loan to value ratio
    pub allowed_borrow_value: Decimal,
    /// The dangerous borrow value at the weighted average liquidation threshold
    pub unhealthy_borrow_value: Decimal,
}
pub struct Reserve {
    /// Version of the struct
    pub version: u8,
    /// Last slot when supply and rates updated
    pub last_update: LastUpdate,
    /// Lending market address
    pub lending_market: Pubkey,
    /// Reserve liquidity
    pub liquidity: ReserveLiquidity,
    /// Reserve collateral
    pub collateral: ReserveCollateral,
    /// Reserve configuration values
    pub config: ReserveConfig,
}
pub struct ReserveLiquidity {
    /// Reserve liquidity mint address
    pub mint_pubkey: Pubkey,
    /// Reserve liquidity mint decimals
    pub mint_decimals: u8,
    /// Reserve liquidity supply address
    pub supply_pubkey: Pubkey,
    /// Reserve liquidity pyth oracle account
    pub pyth_oracle_pubkey: Pubkey,
    /// Reserve liquidity switchboard oracle account
    pub switchboard_oracle_pubkey: Pubkey,
    /// Reserve liquidity available
    pub available_amount: u64,
    /// Reserve liquidity borrowed
    pub borrowed_amount_wads: Decimal,
    /// Reserve liquidity cumulative borrow rate
    pub cumulative_borrow_rate_wads: Decimal,
    /// Reserve liquidity market price in quote currency
    pub market_price: Decimal,
}
pub struct FluidityData {
    token_mint: Pubkey,
    fluid_mint: Pubkey,
    pda: Pubkey,
    payout_authority: Pubkey, // can turn on emergency mode, reward users, update mint limits
    operator: Pubkey, // can turn on emergency mode, unblock rewards, update payout limits, change
                      // the payout auth
    emergency_council: Pubkey, // can turn on emergency mode
    pending_payout_authority: Option<Pubkey>,
    // wrapping and payouts
    no_emergency: bool,
    block_payout_threshold: u64,
    global_mint_remaining: u64,
}
PreviousEVM ABIsNextHow can I Fluid Wrap my custom token?

Last updated 2 years ago

Was this helpful?

🎪
☀️