Lineagei
Frameworki
What's Anchor?
Batteries-included Rust framework. Ships account-validation codegen, 8-byte instruction discriminators, and an on-chain IDL — the program describes itself.
Bigger binary and higher rent in exchange for safety rails, introspection, and dev speed. The choice of a team optimizing for correctness over on-chain footprint.
Originally Coral (Armani Ferrante); now community-maintained.
What it is
The de facto standard. Rust macros (#[program], #[derive(Accounts)]) eliminate boilerplate: it auto-generates 8-byte account and instruction discriminators — SHA256("account:<Name>")[..8] and SHA256("global:<ix>")[..8] — handles Borsh (de)serialization, enforces account constraints declaratively (mut, has_one, seeds, init), and emits a JSON IDL that client libraries consume directly. The cost: Borsh copies data on every deserialize (not zero-copy), and the macro machinery adds binary bloat and compute overhead — irrelevant for ~99% of programs.
When to pick it
Building a new protocol, moving fast, or wanting maximum ecosystem compatibility. It's the beginner default and stays the right call for most production programs.
How it looks on-chain
The most recognizable framework. Every account it owns begins with an 8-byte discriminator, and the IDL is often published on-chain at a PDA derived from the program id. Both are strong, reliable fingerprints — this is the only framework we can label with confidence.
Others in the wild: Steel (Ore team — near-native performance on solana-program), Seahorse (Python → Anchor), and Poseidon & Quasar (TypeScript → Rust). Transpilers inherit their lowering target's fingerprint: a Quasar or Poseidon program that compiles down to Anchor will look like Anchor on-chain — discriminators and all.
Anchor docsFootprinti
Recovered architecturei
Reachi
Controli
What's upgrade authority?
The upgrade authority is the account allowed to replace a program's code after it's deployed.
If it's set (mutable), that key can push new bytecode at any time — including malicious code, the classic "rug" vector. If it's null (immutable / frozen), the code can never change; what 's on-chain is final. A Squads multisig sits in between — upgrades are possible but need M-of-N signers, not one hot wallet. So mutable + single hot-wallet = highest risk; immutable or multisig = stronger guarantees.
What's a verified build?
A verified build proves the program running on-chain was compiled from the public source you can read — nothing hidden.
Someone re-compiles the source in a deterministic (Docker) environment and checks the resulting bytecode is byte-for-byte identical to what's deployed; tools like solana-verify do this and record it with a verification service. "Not verified" isn't a red flag by itself — most programs simply never submit one. It just means you're trusting the deployed bytecode as-is, with no source cross-check.
Convictioni
Interface — the on-chain IDLi
10 of 22 instructions used · 12 never called in this window
Instructions 22
version
Returns the program version.
initTenant
Initialize a new tenant - the top-level administrative entity. A tenant represents a protocol-level admin that can create market groups and markets. The payer becomes the tenant admin with full control over the tenant. # Parameters - `args.tally_cooldown_seconds`: Governance cooldown between tally operations (max 5 minutes). # Accounts - `payer`: Pays for account creation, becomes tenant admin. - `seed`: Unique signer used for tenant PDA derivation. - `tenant`: The tenant account to initialize (PDA). # CPI Calls None - this is a pure Rise instruction.
- payersignerwritable
- seedsigner
- tenantwritable
- systemProgram
- root
- argsInitTenantArgs
initMarketGroup
Initialize a market group within a tenant via Mayflower. A market group is a collection of markets sharing the same fee structure. The Rise tenant becomes the group_admin, allowing Rise to manage markets via PDA signing. # Parameters - `args.gov`: Governance parameters including fee rates (buy, sell, borrow) in micro basis points. # Accounts - `payer`: Pays for account creation. - `seed`: Unique signer for Mayflower market group PDA. - `tenant_seed`: Signer for Rise tenant PDA derivation. - `tenant_admin`: Must be the admin of the Mayflower tenant. - `rise_tenant`: Rise tenant PDA - becomes group_admin for the market group. - `mayflower_program`: Mayflower program for CPI. - Remaining accounts: `[market_group, may_log_account]` # CPI Calls - `mayflower::market_group_init`: Creates the market group on Mayflower.
- payersignerwritable
- seedsigner
- tenantSeedsigner
- tenantAdminsigner
- mayflowerTenant
- riseTenant
- systemProgram
- mayflowerProgram
- argsInitMarketGroupArgs
initMarket
Initialize a new market with bonding curve, token mint, and escrows. Creates a complete market including: token mint (must end with "rise"), metadata, bonding curve parameters, cash escrow for revenue, and creator escrow for fees. # Parameters - `vanity_seed`: Random seed for mint PDA - address must end with "rise". - `args.gov`: Governance parameters (cooldowns, fee splits). - `args.x2`: Shoulder end position on the bonding curve. - `args.m1`: Slope before shoulder. - `args.m2`: Slope after shoulder. - `args.f`: Floor price. - `args.b2`: Y-intercept after shoulder. - `args.metadata`: Token metadata (name, symbol, uri). # Accounts - `payer`: Pays for account creation, becomes the market creator. - `seed`: Unique signer for Mayflower PDAs. - `rise_market`: Rise market account to initialize (PDA). - `mint_main`: Base currency mint (e.g., USDC). - `mint_token`: Market token mint - initialized with decimals matching mint_main. - `cash_escrow`: Escrow for revenue distribution to holders. - `creator_escrow`: Escrow for creator's share of trading fees. - `mayflower_program`: Mayflower program for CPI. - Remaining accounts: `[mint_options, liq_vault_main, rev_escrow_group, rev_escrow_tenant, mayflower_market, market_group, may_log_account]` # CPI Calls - `mpl_token_metadata::create_metadata_account_v3`: Creates Metaplex token metadata. - `spl_token::set_authority`: Transfers mint authority to Mayflower market_meta. - `mayflower::market_linear_init`: Initializes the linear bonding curve.
- payersignerwritable
- seedsigner
- tenantSeed
- riseMarketwritable
- mintMain
- mintTokenwritable
- tokenMetadataProgram
- metadatawritable
- marketMetawritable
- riseTenantwritable
- mayflowerTenant
- cashEscrowwritable
- creatorEscrowwritable
- systemProgram
- mayflowerProgram
- tokenProgram
- tokenProgramMain
- vanitySeedu64
- argsInitMarketArgs
initPersonalAccount
Initialize a personal account for a user in a specific market. Each user needs one personal account per market to track their collateral and debt. The personal account links to a Mayflower personal position for collateral management. # Accounts - `payer`: Pays for account creation. - `owner`: The user who will own the personal account (must sign). - `market`: The Rise market for this account. - `personal_account`: Rise personal account PDA to initialize. - `core_personal_position`: Mayflower personal position PDA. - `core_escrow`: Mayflower escrow for user's collateral. - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::personal_position_init`: Creates personal position on Mayflower.
- ownersignerwritable
- marketwritable
- personalAccountwritable
- corePersonalPositionwritable
- marketMeta
- mintToken
- coreEscrowwritable
- tokenProgram
- mayflowerProgram
- systemProgram
- mayLogAccountwritable
buyWithExactCashIn
Buy tokens with exact cash input on the bonding curve. Purchases tokens by spending exact amount of cash. Optionally raises the floor price in the same transaction if `new_shoulder_end` is non-zero. Distributes trading fees to creator and team escrows. # Parameters - `cash_in`: Exact amount of base currency to spend. - `min_token_out`: Minimum tokens to receive (slippage protection). - `new_shoulder_end`: New shoulder position for floor raise (0 to skip). - `floor_increase_ratio`: Ratio to increase floor price by. # Accounts - `buyer`: User buying tokens (signer, pays cash_in). - `market`: Rise market being bought into. - `main_src`: Source of payment (buyer's base currency account). - `token_dst`: Destination for purchased tokens (buyer's token account). - `cash_escrow`: Market's cash escrow for revenue distribution. - `creator_escrow`: Receives creator's share of buy fees. - `team_escrow`: Receives team's share of buy fees. - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::buy_with_exact_cash_in`: Executes buy on bonding curve. - `mayflower::raise_floor_preserve_area_checked2`: Raises floor (if new_shoulder_end != 0). - `mayflower::rev_claim_group`: Claims revenue from Mayflower escrow (internal).
- buyersignerwritable
- tenantwritable
- marketwritable
- cashEscrowwritable
- mayTenant
- mayMarketGroup
- marketMeta
- mayMarketwritable
- tenantSeed
- mintTokenwritable
- mintMain
- tokenDstwritable
- mainSrcwritable
- liqVaultMainwritable
- revEscrowGroupwritable
- revEscrowTenantwritable
- tokenProgramMain
- tokenProgram
- mayflowerProgram
- mayLogAccountwritable
- creatorEscrowwritable
- teamEscrowwritable
- eventAuthority
- program
- cashInu64
- minTokenOutu64
- newShoulderEndu64
- floorIncreaseRatiomay_cpi::DecimalSerialized
- maxNewFloormay_cpi::DecimalSerialized
- maxAreaShrinkageToleranceUnitsu64
- minLiqRatiomay_cpi::DecimalSerialized
deposit
Deposit tokens as collateral into personal account. Deposited tokens can be used as collateral for borrowing. The tokens are transferred to the Mayflower escrow. # Parameters - `amount`: Amount of market tokens to deposit. # Accounts - `owner`: Depositor who owns the personal account (signer). - `personal_account`: User's Rise personal account (PDA). - `market`: Rise market for this deposit. - `core_personal_position`: Mayflower personal position tracking collateral. - `may_escrow`: Mayflower escrow receiving the deposited tokens. - `token_src`: Source of tokens to deposit (user's token account). - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::deposit`: Deposits tokens as collateral.
- ownersignerwritable
- personalAccountwritable
- marketwritable
- marketMeta
- mayMarketwritable
- corePersonalPositionwritable
- mayEscrowwritable
- mintTokenwritable
- tokenSrcwritable
- tokenProgram
- mayflowerProgram
- mayLogAccountwritable
- eventAuthority
- program
- amountu64
withdraw
Withdraw collateral from personal account. Withdraws tokens from collateral. If user has outstanding debt, Mayflower enforces LTV requirements to prevent under-collateralization. # Parameters - `amount`: Amount of market tokens to withdraw. # Accounts - `owner`: Withdrawer who owns the personal account (signer). - `personal_account`: User's Rise personal account (PDA). - `market`: Rise market for this withdrawal. - `core_personal_position`: Mayflower personal position tracking collateral. - `may_escrow`: Mayflower escrow holding the collateral. - `token_dst`: Destination for withdrawn tokens (user's token account). - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::withdraw`: Withdraws collateral (enforces LTV if debt exists).
- ownersignerwritable
- personalAccountwritable
- marketwritable
- marketMeta
- mayMarketwritable
- corePersonalPositionwritable
- mayEscrowwritable
- mintTokenwritable
- tokenDstwritable
- tokenProgram
- mayflowerProgram
- mayLogAccountwritable
- eventAuthority
- program
- amountu64
sellWithExactTokenIn
Sell tokens for cash on the bonding curve. Burns tokens and returns cash from liquidity vault. Distributes trading fees to creator and team escrows. # Parameters - `token_in`: Exact amount of tokens to sell. - `min_cash_out`: Minimum cash to receive (slippage protection). # Accounts - `seller`: User selling tokens (signer). - `market`: Rise market being sold into. - `token_src`: Source of tokens to sell (seller's token account). - `main_dst`: Destination for cash proceeds (seller's base currency account). - `liq_vault_main`: Mayflower liquidity vault (source of cash). - `creator_escrow`: Receives creator's share of sell fees. - `team_escrow`: Receives team's share of sell fees. - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::sell_with_exact_token_in`: Executes sell on bonding curve (burns tokens). - `mayflower::rev_claim_group`: Claims revenue from Mayflower escrow (internal).
- sellersignerwritable
- tenantwritable
- marketwritable
- cashEscrowwritable
- mayTenant
- mayMarketGroup
- marketMeta
- mayMarketwritable
- mintTokenwritable
- mintMain
- tokenSrcwritable
- mainDstwritable
- liqVaultMainwritable
- revEscrowGroupwritable
- revEscrowTenantwritable
- tokenProgramMain
- tokenProgram
- mayflowerProgram
- mayLogAccountwritable
- creatorEscrowwritable
- teamEscrowwritable
- eventAuthority
- program
- tokenInu64
- minCashOutu64
borrow
Borrow cash against deposited collateral. Users can borrow up to their collateral's loan-to-value ratio. Borrowed funds come from the Mayflower liquidity vault. Distributes borrow fees to creator and team escrows. # Parameters - `amount`: Amount of base currency to borrow. # Accounts - `owner`: Borrower who owns the personal account (signer). - `personal_account`: User's Rise personal account (PDA, signs for borrow). - `market`: Rise market to borrow from. - `core_personal_position`: Mayflower position tracking collateral and debt. - `main_dst`: Destination for borrowed funds (user's base currency account). - `liq_vault_main`: Mayflower liquidity vault (source of borrowed funds). - `creator_escrow`: Receives creator's share of borrow fees. - `team_escrow`: Receives team's share of borrow fees. - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::borrow`: Borrows against collateral (enforces LTV). - `mayflower::rev_claim_group`: Claims revenue from Mayflower escrow (internal).
- ownersignerwritable
- tenantwritable
- marketwritable
- cashEscrowwritable
- personalAccountwritable
- mayTenant
- mayMarketGroup
- marketMeta
- liqVaultMainwritable
- revEscrowGroupwritable
- revEscrowTenantwritable
- mayMarketwritable
- mintMain
- corePersonalPositionwritable
- mainDstwritable
- tokenProgramMain
- mayLogAccountwritable
- mayflowerProgram
- creatorEscrowwritable
- teamEscrowwritable
- eventAuthority
- program
- amountu64
repay
Repay outstanding debt from a borrow position. Reduces debt and frees up collateral for withdrawal. Repaid funds go back to the Mayflower liquidity vault. # Parameters - `amount`: Amount of base currency to repay. # Accounts - `repayer`: User repaying debt (signer, pays from their account). - `core_personal_position`: Mayflower position with debt to reduce. - `main_src`: Source of repayment funds (repayer's base currency account). - `liq_vault_main`: Mayflower liquidity vault (receives repaid funds). - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::repay`: Reduces debt on personal position.
- repayersignerwritable
- marketMeta
- mayMarketwritable
- corePersonalPositionwritable
- mintMain
- mainSrcwritable
- liqVaultMainwritable
- tokenProgramMain
- mayflowerProgram
- mayLogAccountwritable
- eventAuthority
- program
- amountu64
raiseFloorPreserveArea
Raise floor price while preserving bonding curve area. Increases the floor price, providing price protection for holders. Floor can only increase, never decrease. Subject to cooldown period. Increments the market level counter. # Parameters - `new_shoulder_end`: New shoulder position on the curve. - `floor_increase_ratio`: Ratio to increase floor price by. # Accounts - `market`: Rise market to raise floor for. - `tenant`: Rise tenant PDA (signs as market group admin). - `tenant_seed`: Seed for tenant PDA derivation. - `mayflower_market`: Mayflower market with bonding curve to modify. - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::raise_floor_preserve_area_checked2`: Modifies bonding curve parameters.
- marketwritable
- tenantwritable
- tenantSeed
- marketGroup
- marketMeta
- mayflowerMarketwritable
- mayflowerProgram
- mayLogAccountwritable
- eventAuthority
- program
- newShoulderEndu64
- floorIncreaseRatiomay_cpi::DecimalSerialized
- maxNewFloormay_cpi::DecimalSerialized
- maxAreaShrinkageToleranceUnitsu64
- minLiqRatiomay_cpi::DecimalSerialized
raiseFloorExcessLiquidity
Raise floor price using excess market liquidity. Uses accumulated excess liquidity in the Mayflower vault to raise the floor. Simpler than raise_floor_preserve_area - only needs a ratio and max floor cap. During the initial period after market creation, no cooldown between raises. # Parameters - `args.increase_ratio_micro_basis_points`: Floor increase ratio (e.g. 10_000 = 0.1%). - `args.max_new_floor`: Maximum acceptable new floor price (safety cap). # CPI Calls - `mayflower::raise_floor_from_excess_liquidity_checked`: Raises floor using excess liquidity.
- marketwritable
- tenantwritable
- tenantSeed
- marketGroup
- marketMeta
- mayflowerMarketwritable
- mayflowerProgram
- mayLogAccountwritable
- eventAuthority
- program
- argsRaiseFloorExcessLiquidityArgs
withdrawCreatorFees
Withdraw accumulated creator fees from the creator escrow. Only the original market creator can withdraw these fees. Withdraws the full escrow balance in a single operation. # Accounts - `creator`: Market creator (signer, must match market.creator). - `market`: Rise market with fees to withdraw. - `creator_escrow`: PDA holding accumulated fees from trading. - `creator_token_account`: Creator's destination account (init_if_needed). - `mint_main`: Base currency mint for transfer. # CPI Calls - `spl_token::transfer_checked`: Transfers fees to creator's account (market PDA signs).
- creatorsignerwritable
- marketwritable
- creatorEscrowwritable
- creatorTokenAccountwritable
- mintMain
- tokenProgramMain
- associatedTokenProgram
- systemProgram
withdrawTeamFees
Withdraw accumulated team fees from the team escrow. Fees are sent to the configured team wallet address stored in TeamConfig. Anyone can trigger the withdrawal, but funds always go to team_wallet. # Accounts - `payer`: Pays for ATA creation if needed (anyone can trigger). - `mint_main`: Base currency mint that team escrow holds. - `team_escrow`: PDA holding accumulated protocol fees (per mint). - `team_config`: Global config storing the team wallet address. - `team_wallet`: Must match team_config.team_wallet. - `team_token_account`: Team wallet's destination account (init_if_needed). # CPI Calls - `spl_token::transfer_checked`: Transfers fees to team wallet (team_escrow PDA signs).
- payersignerwritable
- mintMain
- teamEscrowwritable
- teamConfig
- teamWallet
- teamTokenAccountwritable
- tokenProgramMain
- associatedTokenProgram
- systemProgram
updateTeamWallet
Update the team wallet address for fee collection. Allows the current team wallet to rotate to a new address. Only the current team_wallet can authorize this change (self-rotation). # Parameters - `new_team_wallet`: The new wallet address to receive team fees. # Accounts - `current_team_wallet`: Current team wallet (signer, must match team_config.team_wallet). - `team_config`: Global config PDA storing the team wallet address. # CPI Calls None - this is a pure Rise instruction.
- currentTeamWalletsigner
- teamConfigwritable
- newTeamWalletpublicKey
updateTenantAdmin
Update the tenant admin address. Allows the current tenant admin to transfer admin rights to a new address. Only the current admin can authorize this change (self-rotation). # Parameters - `new_admin`: The new admin address for the tenant. # Accounts - `current_admin`: Current tenant admin (signer, must match tenant.admin). - `tenant`: Tenant PDA storing the admin address. # CPI Calls None - this is a pure Rise instruction.
- currentAdminsigner
- tenantwritable
- newAdminpublicKey
initTeamEscrow
Initialize team escrow for protocol fee collection. Creates a self-owned PDA token account for collecting team fees. Should be called once per mint_main before markets using that mint can trade. Also initializes the global TeamConfig if it doesn't exist. # Parameters - `team_wallet`: Address that will receive withdrawn team fees. # Accounts - `payer`: Pays for account creation. - `admin`: Must be the tenant admin (signer). - `tenant`: Tenant account - verifies admin authority. - `mint_main`: Base currency mint to create escrow for. - `team_escrow`: PDA to initialize as self-owned token account. - `team_config`: Global config PDA (init_if_needed). # CPI Calls - `spl_token::initialize_account3`: Creates the team escrow token account.
- payersignerwritable
- adminsigner
- tenant
- mintMain
- teamEscrowwritable
- tokenProgramMain
- systemProgram
- teamConfigwritable
- teamWalletpublicKey
leverageBuy
Leveraged buy: borrow + buy in a single atomic transaction. Amplifies buying power by borrowing against the tokens being purchased. The purchased tokens are automatically deposited as collateral. Total buying power = exact_cash_in + increase_debt_by. # Parameters - `exact_cash_in`: User's own cash contribution. - `increase_debt_by`: Amount to borrow from liquidity vault. - `min_increase_collateral_by`: Minimum tokens to receive (slippage protection). # Accounts - `owner`: Buyer taking leveraged position (signer). - `personal_account`: User's Rise personal account (PDA, signs for borrow). - `market`: Rise market being bought into. - `core_personal_position`: Mayflower position tracking collateral/debt. - `may_escrow`: Mayflower escrow receiving purchased tokens as collateral. - `main_src`: Source of user's own cash contribution. - `liq_vault_main`: Mayflower liquidity vault (source of borrowed funds). - `creator_escrow`: Receives creator's share of fees (buy + borrow). - `team_escrow`: Receives team's share of fees. - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::buy_with_exact_cash_in_and_deposit_with_debt`: Atomic borrow + buy + deposit. - `mayflower::rev_claim_group`: Claims revenue from Mayflower escrow (internal).
- ownersignerwritable
- tenantwritable
- marketwritable
- cashEscrowwritable
- personalAccountwritable
- mayTenant
- mayMarketGroup
- marketMeta
- mayMarketwritable
- mintTokenwritable
- mintMain
- mainSrcwritable
- liqVaultMainwritable
- revEscrowGroupwritable
- revEscrowTenantwritable
- tokenProgramMain
- tokenProgram
- mayflowerProgram
- mayLogAccountwritable
- corePersonalPositionwritable
- mayEscrowwritable
- creatorEscrowwritable
- teamEscrowwritable
- eventAuthority
- program
- exactCashInu64
- increaseDebtByu64
- minIncreaseCollateralByu64
revDistribute
Distribute accumulated revenue from Mayflower to floor/creator/team. Collects fees from the Mayflower revenue escrow and splits them according to the configured percentages. Can be called by anyone (permissionless). # Accounts - `payer`: Transaction fee payer (anyone). - `tenant`: Rise tenant PDA (signs as group_admin for Mayflower CPI). - `market`: Rise market with revenue to distribute. - `cash_escrow`: Market's cash escrow (temporary holding during distribution). - `may_market_group`: Mayflower market group. - `market_meta`: Mayflower market meta. - `may_market`: Mayflower market. - `liq_vault_main`: Mayflower liquidity vault (receives floor portion). - `mint_main`: Base currency mint. - `rev_escrow_group`: Mayflower revenue escrow (source of fees). - `token_program_main`: Token program for transfers. - `mayflower_program`: Mayflower program for CPI. - `may_log_account`: Mayflower log account. - `creator_escrow`: Receives creator's share of fees. - `team_escrow`: Receives team's share of fees. # CPI Calls - `mayflower::market_group_collect_rev`: Collects fees from Mayflower escrow. - `mayflower::donate_liquidity`: Donates floor portion to liquidity vault.
- payersignerwritable
- tenantwritable
- marketwritable
- cashEscrowwritable
- mayMarketGroup
- marketMeta
- mayMarketwritable
- liqVaultMainwritable
- mintMain
- revEscrowGroupwritable
- tokenProgramMain
- mayflowerProgram
- mayLogAccountwritable
- creatorEscrowwritable
- teamEscrowwritable
updateMarket
Update market metadata, creator wallet, and creator fee percentage. Admin-only instruction for CTO (Community Takeover) scenarios. Updates Metaplex token metadata and Rise market state. # Parameters - `args.metadata`: New token metadata (name, symbol, uri). - `args.new_creator`: New creator wallet address. - `args.creator_fee_percent`: New creator fee percentage (0-25). # Accounts - `admin`: Tenant admin (signer). - `tenant`: Rise tenant PDA. - `market`: Rise market to update (PDA signs as Metaplex update_authority). - `metadata`: Metaplex metadata PDA. - `token_metadata_program`: Metaplex program. # CPI Calls - `mpl_token_metadata::update_metadata_account_v2`: Updates token metadata.
- adminsignerwritable
- tenant
- marketwritable
- metadatawritable
- tokenMetadataProgram
- argsUpdateMarketArgs
leverageSell
Leveraged sell: withdraw + sell + repay in a single atomic transaction. Used to unwind leveraged positions or reduce exposure. Withdraws collateral, sells on curve, repays debt, and sends remainder to user. # Parameters - `decrease_collateral_by`: Amount of tokens to withdraw from collateral and sell. - `decrease_debt_by`: Amount of debt to repay from sale proceeds. - `min_cash_to_user`: Minimum cash to receive after repayment (slippage protection). # Accounts - `owner`: Seller unwinding position (signer). - `personal_account`: User's Rise personal account (PDA, signs for withdrawal). - `market`: Rise market being sold from. - `core_personal_position`: Mayflower position with collateral/debt. - `may_escrow`: Mayflower escrow holding collateral to withdraw. - `main_dst`: Destination for remaining cash after debt repayment. - `liq_vault_main`: Mayflower liquidity vault (receives debt repayment). - `creator_escrow`: Receives creator's share of sell fees. - `team_escrow`: Receives team's share of sell fees. - `mayflower_program`: Mayflower program for CPI. # CPI Calls - `mayflower::withdraw_sell_and_repay`: Atomic withdraw + sell + repay. - `mayflower::rev_claim_group`: Claims revenue from Mayflower escrow (internal).
- ownersignerwritable
- tenantwritable
- marketwritable
- cashEscrowwritable
- personalAccountwritable
- mayTenant
- mayMarketGroup
- marketMeta
- mayMarketwritable
- mintTokenwritable
- mintMain
- mainDstwritable
- liqVaultMainwritable
- revEscrowGroupwritable
- revEscrowTenantwritable
- tokenProgramMain
- tokenProgram
- mayflowerProgram
- mayLogAccountwritable
- corePersonalPositionwritable
- mayEscrowwritable
- creatorEscrowwritable
- teamEscrowwritable
- eventAuthority
- program
- decreaseCollateralByu64
- decreaseDebtByu64
- minCashToUseru64
Accounts 6
MarketLinearstruct
- marketMetapublicKeyReference to the MarketMeta account containing shared market configuration. Links this market implementation to its metadata and token mints.
- stateMarketStateCurrent state of the market including liquidity, debt, supply, and collateral. Tracks all dynamic values that change during market operations.
- priceCurveLinearPriceCurveSerializedSerialized linear price curve parameters defining market pricing. Contains slopes, floor price, and shoulder configuration for the bonding curve.
PersonalPositionstruct
- marketMetapublicKeyThe market metadata account this position belongs to. Determines which market's tokens can be deposited and borrowed against.
- ownerpublicKeyThe owner's public key who controls this position. Only the owner can deposit, withdraw, borrow, or repay.
- escrowpublicKeyThe escrow token account holding deposited collateral tokens. Tokens are locked here while being used as collateral for borrowing.
- depositedTokenBalanceu64Amount of market tokens deposited as collateral. Can be withdrawn if debt is zero, or used to secure borrows.
- debtu64Amount of main tokens (e.g., USDC) currently borrowed against collateral. Must be repaid before collateral can be withdrawn.
- bump[u8; 1]The PDA bump seed used to derive this account's address. Stored to avoid recalculation during operations.
Marketstruct
- tenantpublicKeyTenant of rise
- marketMetapublicKeyLink to market meta Used as seed for PDA
- mintTokenpublicKeyMint of token
- mintMainpublicKeyMint of main token
- tokenDecimalsu8Decimals of the main token (mint_main)
- cashEscrowpublicKeyMarket-owned cash token escrow account
- govGov
- bump[u8; 1]
- lastFloorRaiseTimestampu64Last time the floor was raised
- levelu32Level of the market how many times the floor has been raised
- levelRevCalculatorLevelRevCalculatorLevel revenue calculator Calculates the share of revenue that goes to platform (ALMS)
- flagsu16Flags for market features (will be used in the future)
- creatorpublicKey
- totalFeesFlooru64Total fees sent to floor (cumulative)
- totalFeesCreatoru64Total fees sent to creator escrow (cumulative)
- totalFeesCreatorWithdrawnu64Total fees withdrawn by creator from escrow (cumulative)
- totalFeesTeamu64Total fees sent to team escrow (cumulative)
- creatorRevPercentu8Creator's revenue share percentage (0-25). Floor gets (25 - creator_rev_percent)%, team gets 75%.
- startingPrice[u8; 16]Starting price (floor at market creation), used for dynamic cooldown. Serialized rust_decimal::Decimal (16 bytes).
PersonalAccountstruct
- ownerpublicKeyThe wallet address that owns this personal account. Only this address can deposit, withdraw, borrow, or claim revenue.
- marketpublicKeyThe Rise market this account belongs to. Each user has one PersonalAccount per market they interact with.
- corePersonalPositionpublicKeyLink to the Mayflower personal position PDA. The Mayflower position tracks collateral amounts and debt for this user. Rise delegates collateral management to Mayflower via CPI.
- lastSeenRevIndex[u8; 16]Last seen revenue index for proportional revenue distribution. Stored as serialized Decimal (16 bytes). Used to calculate how much revenue has accrued since the user last claimed or updated.
- stagedRev[u8; 16]Accumulated revenue waiting to be claimed. Stored as serialized Decimal (16 bytes). Updated when user interacts with the market; claimed via collect_rev().
- bump[u8; 1]PDA bump seed for efficient signer_seeds reconstruction.
- versionu8Account version for future upgrades.
TeamConfigstruct
- teamWalletpublicKeyThe wallet address that receives team fees
- bump[u8; 1]Bump seed for PDA derivation
Tenantstruct
- adminpublicKeyThe admin pubkey - only this address can perform tenant-level operations such as creating market groups or withdrawing team fees
- tallyCooldownSecondsu32Cooldown period in seconds between governance tally operations. Prevents spamming of governance actions. Maximum value: 300 seconds (5 minutes).
- lastTallyTimestampu64Unix timestamp of the last tally operation. Used with tally_cooldown_seconds to enforce rate limiting.
- seedpublicKeyUnique seed pubkey used for PDA derivation. Allows multiple tenants to exist by using different seeds.
- bump[u8; 1]PDA bump seed for efficient signer_seeds reconstruction. Stored as [u8; 1] for easy slicing in signer_seeds().
Types 17
may_cpi::DecimalSerializedstruct
- val[u8; 16]Serialized Decimal value as a 16-byte array. Used for storing fixed-point decimal numbers in Solana accounts.
LinearPriceCurveSerializedstruct
- floor[u8; 16]Minimum price floor for the token (serialized Decimal). Price cannot fall below this value regardless of supply. DIMENSIONLESS - no scaling
- m1[u8; 16]Slope of the shoulder segment (m1, serialized Decimal). Steeper initial slope providing higher prices at low supply. SCALED by market meta 2^token_unit_scale
- m2[u8; 16]Slope of the main segment (m2, serialized Decimal). Gentler slope for bulk of the curve after shoulder point. SCALED by market meta 2^token_unit_scale
- x2u64X-coordinate where shoulder transitions to main slope (supply units). Defines the breakpoint between steep and gentle price curves. NOT SCALED - stored in raw token units
- b2[u8; 16]Y-intercept of the main segment (b2, serialized Decimal). Determines vertical offset of the main price curve. DIMENSIONLESS - no scaling
MarketStatestruct
- tokenSupplyu64Total supply of tokens minted by this market. Increases when users buy tokens, decreases when tokens are sold back.
- totalCashLiquidityu64Total amount of main token (cash) held in the market's liquidity vault. Represents available liquidity for sells and borrows.
- totalDebtu64Total outstanding debt across all borrowers in this market. Sum of all individual borrow positions.
- totalCollateralu64Total token collateral deposited across all positions in this market. Sum of all individual collateral deposits.
- cumulativeRevenueMarketu128Cumulative revenue earned by the market group (in main token units). Tracks total fees collected for the market group admin.
- cumulativeRevenueTenantu128Cumulative revenue earned by the tenant (in main token units). Tracks platform fees collected for the tenant.
InitMarketArgsstruct
- govGovInitArgs
- x2u64Shoulder end position on curve
- m2rise::num::DecimalSerializedSlope after shoulder
- m1rise::num::DecimalSerializedSlope before shoulder
- frise::num::DecimalSerializedFloor price
- b2rise::num::DecimalSerializedY-intercept after shoulder
- startTimeu64
- dutchConfigInitBoostf64
- dutchConfigDurationu32
- dutchConfigCurvaturef64
- metadataTokenMetadata
- disableSellbool
- creatorFeePercentu8Creator fee percentage (0-10). Floor gets (25 - creator_fee_percent)%.
TokenMetadatastruct
- namestring
- symbolstring
- uristring
InitMarketGroupArgsstruct
- govGovInitArgs
InitTenantArgsstruct
- tallyCooldownSecondsu32
RaiseFloorExcessLiquidityArgsstruct
- increaseRatioMicroBasisPointsu32Amount to increase the floor by (in micro basis points) e.g. 10_000 = 0.1% increase, 100_000 = 1% increase
- maxNewFloormay_cpi::DecimalSerializedMaximum new floor price allowed (safety cap to prevent overshoots)
UpdateMarketArgsstruct
- metadataOption<TokenMetadata>
- newCreatorpublicKey
- creatorFeePercentu8
rise::num::DecimalSerializedstruct
- x[u8; 16]
GlobalBallotItemstruct
- valueu32Current value of the parameter
- minu32Minimum allowed value
- maxu32Maximum allowed value
- stepMicroBasisPointsu32Change ratio in micro basis points (reserved for voting)
- totalVotesUpu64Total votes for increasing (reserved for voting)
- totalVotesDownu64Total votes for decreasing (reserved for voting)
GlobalBallotItemInitArgsstruct
- valueu32
- minu32
- maxu32
- stepMicroBasisPointsu32
Govstruct
- buyFeeMicroBasisPointsGlobalBallotItemFee for buying (in micro basis points)
- sellFeeMicroBasisPointsGlobalBallotItemFee for selling (in micro basis points)
- borrowFeeMicroBasisPointsGlobalBallotItemFee for borrowing (in micro basis points)
- floorRaiseCooldownSecondsGlobalBallotItemCooldown between floor raises (in seconds)
- floorRaiseLiquidityBufferMicroBasisPointsGlobalBallotItemLiquidity buffer for floor raise (in micro basis points)
- floorInvestmentMicroBasisPointsGlobalBallotItemFloor investment share of revenue (in micro basis points)
- priceCurveSensitivitySimpleGlobalBallotItemPrice curve sensitivity voting state (not currently used)
- priceCurveSensitivityChangeRateMicroBasisPointsu32Price curve sensitivity change rate (not currently used)
GovInitArgsstruct
- buyFeeMicroBasisPointsGlobalBallotItemInitArgs
- sellFeeMicroBasisPointsGlobalBallotItemInitArgs
- borrowFeeMicroBasisPointsGlobalBallotItemInitArgs
- floorRaiseCooldownSecondsGlobalBallotItemInitArgs
- floorRaiseLiquidityBufferMicroBasisPointsGlobalBallotItemInitArgs
- floorInvestmentMicroBasisPointsGlobalBallotItemInitArgs
- priceCurveSensitivityChangeRateMicroBasisPointsu32
SimpleGlobalBallotItemstruct
- totalVotesUpu64
- totalVotesDownu64
LevelRevCalculatorstruct
- yInterceptf64y-intercept of the curve
- maxAsymptotef64high asymptote of the curve
- kf64sensitivity of the curve
RevenueSplitsstruct
- flooru64Revenue amount for floor (15%)
- creatoru64Revenue amount for creator (10%)
- teamu64Revenue amount for team (75%)
Events 17
BorrowEvent
- depositedTokenBalanceu64
- debtu64
- totalMarketDebtu64
- totalMarketDepositedCollateralu64
- totalMainTokenInLiquidityPoolu64
- revSplitRevenueSplits
BuyWithExactCashInEvent
- buyerpublicKey
- marketpublicKey
- cashInu64
- minTokenOutu64
- revSplitRevenueSplits
- floor[u8; 16]
- tokenSupplyu64
- m1[u8; 16]
- m2[u8; 16]
- x2u64
- b2[u8; 16]
- lastFloorRaiseTimestampu64
- mintTokenpublicKey
- mintMainpublicKey
- tokenDecimalsu8
- totalMainTokenInLiquidityPoolu64
- totalMarketDebtu64
- tokenOutu64
- netCurveInu64
- feesu64
CreatorFeesWithdrawnEvent
- marketpublicKey
- creatorpublicKey
- amountu64
- totalWithdrawnu64
InitMarketGroupEvent
- marketGrouppublicKey
- riseTenantpublicKey
- buyFeeMicroBasisPointsu32
- sellFeeMicroBasisPointsu32
- borrowFeeMicroBasisPointsu32
InitPersonalAccountEvent
- ownerpublicKey
- marketpublicKey
InitTenantEvent
- tenantpublicKey
- adminpublicKey
- tallyCooldownSecondsu32
LendingEvent
- depositedTokenBalanceu64
- debtu64
- totalMarketDebtu64
- totalMarketDepositedCollateralu64
- totalMainTokenInLiquidityPoolu64
LeverageBuyEvent
- buyerpublicKey
- marketpublicKey
- exactCashInu64
- increaseDebtByu64
- minIncreaseCollateralByu64
- actualIncreaseCollateralByu64
- revSplitRevenueSplits
- floor[u8; 16]
- tokenSupplyu64
- m1[u8; 16]
- m2[u8; 16]
- x2u64
- b2[u8; 16]
- totalMainTokenInLiquidityPoolu64
- totalMarketDebtu64
- totalCollateralu64
- mintTokenpublicKey
- mintMainpublicKey
- tokenDecimalsu8
- ownerpublicKey
- marketMetapublicKey
- depositedTokenBalanceu64
- debtu64
- escrowpublicKey
- netCurveInu64
- feesu64
LeverageSellEvent
- sellerpublicKey
- marketpublicKey
- decreaseCollateralByu64
- decreaseDebtByu64
- minCashToUseru64
- actualCashToUseru64
- revSplitRevenueSplits
- floor[u8; 16]
- tokenSupplyu64
- m1[u8; 16]
- m2[u8; 16]
- x2u64
- b2[u8; 16]
- totalMainTokenInLiquidityPoolu64
- totalMarketDebtu64
- totalCollateralu64
- mintTokenpublicKey
- mintMainpublicKey
- tokenDecimalsu8
- ownerpublicKey
- marketMetapublicKey
- depositedTokenBalanceu64
- debtu64
- escrowpublicKey
- netCurveOutu64
- feesu64
RaiseFloorCurveEvent
- marketpublicKey
- floor[u8; 16]
- tokenSupplyu64
- m1[u8; 16]
- m2[u8; 16]
- x2u64
- b2[u8; 16]
- totalMainTokenInLiquidityPoolu64
- totalMarketDebtu64
- totalCollateralu64
- mintTokenpublicKey
- mintMainpublicKey
- tokenDecimalsu8
RaiseFloorEvent
- marketpublicKey
- newLevelu32
- newShoulderEndu64
- floorIncreaseRatiomay_cpi::DecimalSerialized
- timestampu64
RaiseFloorExcessLiquidityEvent
- marketpublicKey
- newLevelu32
- increaseRatioMicroBasisPointsu32
- timestampu64
RepayEvent
- positionOwnerpublicKey
- depositedTokenBalanceu64
- debtu64
- totalMarketDebtu64
- totalMarketDepositedCollateralu64
- totalMainTokenInLiquidityPoolu64
RevDistributeEvent
- marketpublicKey
- splitsRevenueSplits
SellWithExactTokenInEvent
- sellerpublicKey
- marketpublicKey
- tokenInu64
- cashOutu64
- revSplitRevenueSplits
- floor[u8; 16]
- tokenSupplyu64
- m1[u8; 16]
- m2[u8; 16]
- x2u64
- b2[u8; 16]
- mintTokenpublicKey
- mintMainpublicKey
- tokenDecimalsu8
- totalMainTokenInLiquidityPoolu64
- totalMarketDebtu64
- netCurveOutu64
- feesu64
TeamWalletUpdatedEvent
- oldTeamWalletpublicKey
- newTeamWalletpublicKey
TenantAdminUpdatedEvent
- tenantpublicKey
- oldAdminpublicKey
- newAdminpublicKey
Errors 23
- 6000TallyTooSoontally too soon
- 6001InsufficientPranaInsufficient prana
- 6002InsufficientKarmaInsufficient karma
- 6003FloorRaiseCooldownNotMetFloor raise cooldown not met
- 6004InsufficientPersonalDepositedZenInsufficient personal depositedzen
- 6005InsufficientVotePowerInsufficient vote power
- 6006InvalidMayflowerProgramInvalid Mayflower program ID
- 6007InvalidMarketPDAInvalid market PDA
- 6008InvalidMintTokenAddressMint token address must end with 'RISE'
- 6009InvalidMintDecimalsMint token decimals must match mint_main decimals
- 6010InvalidMintAuthorityMint token authority must be the rise_market
- 6011NotCreatorOnly the market creator can withdraw creator fees
- 6012NoFeesToWithdrawNo fees to withdraw
- 6013NotTenantAdminOnly the tenant admin can withdraw team fees
- 6014InvalidTeamWalletInvalid team wallet address
- 6015NotPersonalAccountOwnerBuyer does not own this personal account
- 6016FeeOverflowArithmetic overflow in fee calculation
- 6017CooldownTooLongCooldown exceeds maximum allowed value
- 6018LevelOverflowLevel overflow - maximum level reached
- 6019FloorRatioOutOfBoundsFloor ratio out of bounds (min 0.001, max 100.0)
- 6020UnauthorizedTenantCreatorUnauthorized tenant creator
- 6021InvalidCreatorFeePercentCreator fee percent must be between 0 and 25
- 6022AmountTooSmallTrade amount is below the minimum allowed
What's an IDL?
An IDL — Interface Description Language — is a JSON spec that describes how to talk to a program: its instructions, the accounts each one needs, argument and account types, events, and errors.
Anchor auto-generates it at build time. A program can publish it on-chain at a PDA derived from its id, so any client or explorer can decode the program's transactions without its source code.
Why it's often missing
Publishing is opt-in — a courtesy, not a requirement. Many programs never do, and non-Anchor frameworks (Pinocchio, native, Steel) don't produce one at all; their interface lives in an off-chain Shank/Codama artifact, or nowhere public. Absence means you can't auto-decode it — not that anything is wrong.
10 of 22 instructions used · 12 never called in this window · +7 more
Tractioni
The recordi
| Event | When | Detail | Receipt |
|---|---|---|---|
| DEPLOY | 5d ago | slot 431,679,302 | back…9302 |