Smart Contracts
Trayon's core protocol logic is implemented in Solidity 0.8.19 and organized into three primary contracts. Interfaces below are simplified for reference — see the repository for full implementations and tests.
TRAYONToken.sol
The TRAY token deployed today on Polygon PoS at 0x6b62514E925099643abA13B322A62ff6298f8E8A (source verified on Polygonscan). Supply is hard-capped at 21,000,000 TRAY, and minting has been permanently disabled with finalize() on 2026-11-14. When the Trayon chain launches, TRAY is planned to become its native gas token through a 1:1 migration.
contract TRAYONToken is ERC20, Ownable {
uint256 public constant MAX_SUPPLY = 21_000_000 * 10**18;
bool public isFinalized;
function mint(address to, uint256 amount) public onlyOwner; // never above MAX_SUPPLY
function burn(uint256 amount) public;
function finalize() external onlyOwner; // permanently disables mint
}ValidatorRegistry.sol
Handles validator staking, slashing, and lifecycle. Requires a minimum stake of 32,000 TRAY to register as a validator.
contract ValidatorRegistry {
uint256 public constant MIN_STAKE = 32_000 * 10**18;
uint256 public constant SLASH_DATA_FALSE = 50; // percent
uint256 public constant SLASH_DOWNTIME = 10; // percent
uint256 public constant SLASH_BYZANTINE = 100; // percent
function registerValidator() external;
function slashValidator(address validator, uint256 percentage, string calldata reason) external;
function exitValidator() external;
function getActiveValidatorCount() external view returns (uint256);
function updateReputation(address validator, int256 change) external;
}TrayonOracle.sol
Stores data commitments as Merkle roots with aggregated validator signatures, and exposes the latest verified value for a given data type.
contract TrayonOracle {
struct DataCommitment {
bytes32 merkleRoot;
uint256 timestamp;
address[] validators;
bytes aggregatedSignature;
bool finalized;
}
function commitData(
bytes32 merkleRoot,
address[] calldata validators,
bytes calldata aggregatedSignature,
uint256 timestamp
) external;
function verifyData(bytes32 merkleRoot, bytes32[] calldata proof, bytes32 leaf)
external view returns (bool);
}contracts/ workspace of the Trayon monorepo. See API Reference to query committed data without deploying your own indexer.