Complete guide to the Refinery node network smart contracts and API
Refinery is a decentralized node network built on Binance Smart Chain (BSC) that revolutionizes how users interact with blockchain infrastructure. The platform provides an accessible, secure, and profitable way to participate in network validation and rewards through an innovative node-based staking mechanism.
The Refinery ecosystem consists of two main smart contracts working in harmony to provide a complete node management and reward distribution system.
Handles node creation, management, and reward distribution logic.
Contract address will be announced upon mainnet deployment.
ERC-20 token with advanced features for liquidity and trading.
Contract address will be announced upon mainnet deployment.
Refinery implements a three-tier node system, each with distinct characteristics, pricing, and reward structures to accommodate different investment levels and risk tolerances.
| Tier | Name | Daily Rewards | APR | Target Audience |
|---|---|---|---|---|
| L1 | Small Refinery | 5 $REF | 5% | Beginners |
| L2 | Refinery Medium | 30 $REF | 6% | Serious Investors |
| L3 | Refinery Large | 75 $REF | 7.5% | Whales |
Creating nodes in Refinery requires a two-step process: token approval followed by node creation. This ensures proper security and prevents unauthorized token usage.
Approves the contract to spend tokens for node creation.
Creates the specified number of nodes using approved tokens.
The Refinery rewards system operates on a daily distribution cycle, automatically calculating and distributing rewards based on node ownership and tier.
Claims all accumulated rewards for the calling address.
Distributes rewards to all node holders (admin function).
Rewards are distributed daily at predetermined intervals. The exact timing can be queried using the getNextRebase() function.
The contract owner has access to various administrative functions for managing the system parameters and ensuring optimal operation.
These functions allow users and applications to query various aspects of the system without modifying the blockchain state.
| Function | Parameters | Returns | Description |
|---|---|---|---|
getNodeNumberOf |
address account | uint256 | Total nodes owned by address |
getNodeNumberOfL1 |
address account | uint256 | Small nodes owned by address |
getNodeNumberOfL2 |
address account | uint256 | Medium nodes owned by address |
getNodeNumberOfL3 |
address account | uint256 | Large nodes owned by address |
| Function | Returns | Description |
|---|---|---|
getNodePriceL1 |
uint256 | Price of Small nodes in wei |
getNodePriceL2 |
uint256 | Price of Medium nodes in wei |
getNodePriceL3 |
uint256 | Price of Large nodes in wei |
Smart contract events provide a way to track important state changes and can be used for building responsive user interfaces.
Emitted when nodes of the specified tier are created.
Emitted when rewards are claimed by a user.
Emitted when contract ownership is transferred.
The REF token is an ERC-20 compliant token with advanced features including automatic liquidity provision, tax system, and wallet limits.
Refinery implements multiple layers of security to ensure the safety of user funds and the integrity of the system.
The following examples demonstrate how to interact with the Refinery smart contracts using JavaScript and Web3 libraries.
The Refinery contracts are deployed on Binance Smart Chain and are fully operational. All contract addresses and ABIs are publicly available for verification.