
Developer Update #2: Building Nexgent on Solana
Apr 9, 2025
Chief Technology Officer
Welcome to our second dev update! In this post, we’re diving deeper into the technical side of how we’re building Nexgent’s smart contracts on Solana — from how we're architecting our programs and instructions, to how we’re using the SPL token, and why this chain was the right foundation for us.
Why Solana?
We chose Solana for its:
🔁 High throughput: essential for near real-time signal generation & trade execution
💸 Low transaction fees: critical for micro-transactions like staking or signal subscriptions
🧱 Account-based model: which offers flexibility for agent storage, staking metadata, and more
It's our first time developing directly on Solana, and while it’s come with a learning curve, we’ve been really impressed with the depth of the documentation, the dev tooling (hello Anchor!), and the growing ecosystem.
What Are Solana Programs & Instructions?
If you're new to Solana dev, here's a quick primer:
A program on Solana is what other blockchains might call a “smart contract.” It’s a deployed executable on-chain, and it contains the logic for how accounts interact.
An instruction is a call to one of the program’s functions — passing in parameters, accounts, and sometimes lamports or tokens.
In the context of Nexgent, our smart contract (program) handles a few core instructions:
CreateAgent – Mints a new agent on-chain, tied to the user’s wallet.
StakeTokens – Stakes $NEXGENT tokens to a specific agent account.
SubscribeToAgent – Allows another wallet to subscribe to an agent’s trade signals.
ClaimStakingRewards – Distributes rewards from the shared rewards pool.
VoteOnProposal – Enables governance voting using staked $NEXGENT.
All instructions are guarded by signature checks, PDA (Program Derived Address) ownership validation, and token balance assertions.
Integrating SPL Tokens
The $NEXGENT token is built using the SPL Token Standard, which is the Solana equivalent of ERC-20. It allows us to:
Easily manage wallet balances
Use CPI (Cross-Program Invocations) to check or transfer tokens inside our instructions
Tap into existing Solana tooling like token metadata programs, staking vaults, and treasury integrations
We’ve already launched the $NEXGENT token on Devnet for testing and contract development. If you’re curious to try it out, we’ll be releasing more tools soon for interacting with it directly.
Account Structure: On-Chain Agents
Each AI agent lives on-chain as a custom account. When you create one, we:
Generate a PDA using a unique seed + your wallet address
Store agent-specific config (risk profile, subscription price, etc.) in the account data
Link it to your wallet so only you can manage or delete it
This structure makes agents portable, provably owned, and easy to integrate into staking, governance, and monetization flows.
Staking & Signal Prioritization
We’ve implemented a staking mechanism inside the smart contract that:
Records who staked tokens and on which agent
Tracks stake time for weighted reward calculations
Updates signal queue priority for top-staked agents
When a signal is generated off-chain, it will query on-chain stake data to determine which agents receive it first (in a waterfall-style distribution). This system ensures the scarcity of valuable signals is respected, while still enabling flexibility through agent tuning and strategy diversity.
Off-Chain Integration: ML + On-Chain Logic
Nexgent is a hybrid architecture:
On-chain programs handle ownership, staking, access control, and payments.
Off-chain systems handle:
Trade signal generation via ML
Risk profiling
Posting signals to subscribed users
The two systems sync via:
PDA lookups
Token account checks
Event logs (via Solana logs + WebSocket subscriptions)
What’s Next?
Here’s what’s coming in the next phase of development:
📄 Agent metadata formatting and upgrade paths
🌐 Anchor-based testing and cross-contract modularity
🔁 Reward distribution and time-weighted staking
🧪 Public Devnet interaction tools so the community can start testing
If you're a developer interested in building with or on top of Nexgent, stay tuned for our future developer updates coming soon.
Thanks for following along with our build journey.
Solana might be known for speed, but we’re focused on doing it right — building a token-powered system where utility, not hype, drives value.
— The Nexgent Engineering Team