Skip to Content
solidondocs

How it works

The end-to-end path from a trade on NEAR to a tokenized stock held on Base Sepolia, Robinhood Chain testnet and Solana devnet.

Each Solidon meme is one NEAR contract. It is a token, a pool, a treasury ledger and a set of capital rules at the same time. Trading fees become treasury cash. The contract sends that cash to its own addresses on three chains and signs, through NEAR Chain Signatures, the swaps that turn it into the meme's thesis stock.

Testnet

Everything described here runs on testnets: NEAR testnet, Base Sepolia, Robinhood Chain testnet and Solana devnet. The stock tokens are Solidon synthetic tokens priced from the Chainlink feeds on Robinhood Chain mainnet. The USDC is test USDC with no value.

The flow

A trader buys the meme

The trader sends USDC to the meme contract with ft_transfer_call and msg: {"action":"buy","min_out":"..."}. The contract takes a 1% fee from the USDC: 0.8% goes to treasury cash, 0.2% is credited to the creator. The rest goes into the constant-product pool and the trader receives meme tokens. See The meme token.

Fees build treasury cash on NEAR

Treasury cash is USDC held by the meme contract on NEAR. The contract keeps 20% of NAV on NEAR as a buffer for buybacks and redemptions.

Anyone calls fund_chain

fund_chain(chain) reads a fresh oracle price, then sends the NEAR cash above the 20% buffer (at most one swap's worth, max_swap_usdc) to the factory's bridge account. The amount is booked as in transit for that chain and stays in NAV. A failed transfer returns it to NEAR cash.

The bridge delivers USDC to the treasury

On testnet the bridge is a keeper account (keeper.solidon.testnet) that delivers test USDC to the treasury address on the target chain. On mainnet this leg is NEAR Intents / 1Click. See NEAR Intents.

The arrival is credited

  • Base: anyone calls credit_cash with the USDC Transfer log. The contract asks the MPC network to verify that exact log (verify_foreign_transaction). Only then is the chain's USDC ledger credited.
  • Robinhood Chain and Solana: the factory's relayer account calls report_cash.

Every credit is capped by the cash in transit for that chain and is booked once. See Treasuries.

Anyone calls buy_stock

buy_stock(chain) (EVM) or buy_stock_solana(blockhash, tick_arrays) reads the oracle and builds the swap inside the contract, with minAmountOut set to the oracle value minus 1%. The contract asks v1.signer-prod.testnet for a signature, verifies it against its own treasury key, and stores the signed transaction.

Anyone broadcasts

Any relayer can read the signed transaction with get_signed_tx and send it to the chain. The swap runs on Uniswap v3 (Base Sepolia, Robinhood Chain testnet) or Raydium CLMM (Solana devnet). The stock lands at the treasury address. The ledger books the minAmountOut it signed for.

The mNAV engine acts

Once per hour anyone can call rebalance(). The contract compares the pool's 30-minute TWAP with NAV per token and issues, holds, buys back or opens redemptions. See mNAV.

The actors

ActorWhat it isWhat it can do
TraderAny NEAR accountBuy, sell, and redeem while the redemption window is open
CreatorThe account that launched the memeSeeds the pool once, claims the 0.2% creator fee with claim_usdc()
Factorysolidon.testnetDeploys each meme as a sub-account (for example honey.solidon.testnet), holds the immutable stock list and chains config
Meme contractOne per memeNEP-141 token, AMM pool, mNAV engine, treasury ledger. Builds and requests signatures for every treasury transaction. No owner method
MPC signerv1.signer-prod.testnet (NEAR Chain Signatures)Signs for the meme's derived EVM (ECDSA) and Solana (EdDSA) addresses. Verifies Base logs for credit_cash
OracleA Pyth-interface contract on NEARGives the stock price. On testnet it is a mock oracle fed live Chainlink prices (Robinhood Chain mainnet) by the keeper
BridgeThe factory's bridge accountDelivers USDC from NEAR to a treasury chain. Testnet: keeper account. Mainnet: Intents / 1Click
RelayerThe factory's relayer accountReports cash arrivals on Robinhood Chain and Solana, sets the Solana token accounts. Capped by cash in transit
BroadcasterAnyoneSends signed transactions to the chains. The official keeper is a convenience, not a trust point
Caller of rebalance()AnyoneTriggers the mNAV engine once per hour and earns a 0.05% tip of the action value

One meme, three chains, live

The test meme e2etest.solidon.testnet holds NVDA on all three chains. Every treasury step was signed by the NEAR MPC at the meme contract's request; the keeper only broadcast and bridged. The full list of transactions is in docs/DEPLOYMENTS.md under "End to end" and on Deployments.

ChainLedger NVDA (booked minimum)On-chain NVDA
Base Sepolia0.029654170.03032966
Robinhood testnet0.010607600.01082210
Solana devnet0.027703710.02831835

The ledger is below the on-chain balance on every chain, as designed for swaps that land.

On this page