Cointime

Download App
iOS & Android

Is token trading still secure? Centralization Risks in OnchainTrade Smart Contract

Validated Project

This security report outlines Project Onchain Trade's potential vulnerabilities and centralization risks on token staking, rewarding and trading, which could pose significant threats to the integrity and security of the platform.

Contract Centralized Risk

This smart contract encompasses several functions related to the management of a token staking and reward platform. Here's a centralized report outlining the core functions:

1. addRevenueToken(): This function is responsible for adding a new token as a revenue token. The token details are then added to the 'RevenueInfo' map and the 'revenueInfoList'.

2. addRevenue(): This function allows the contract owner to add revenue tokens, their amounts, and also updates the 'boost point'. It also ensures the stake token and reward balances are kept updated.

3. updateScore(): This function is for updating the score of a user. The score is computed based on the amount of reward the user has earned per unit time.

4. addToken(): This function allows the contract owner to add a new token to the pool of tokens for mining. The details of the token, including the reward per second and the start time, are added to 'PoolInfo'.

5. setPoolInfo(): This function allows the contract owner to set and update the pool info for a particular LP token, including the reward per second and the end time.

6. addMintPool(), updateMintPool(): These functions let the contract owner add a new mint pool or update an existing one, with details like the reward token, reward per second, start time, and end time.

7. setUpdater(), setFastPriceEvents(), setPriceDuration(), setMinBlockInterval(), setMaxTimeDeviation(), setLastUpdatedAt(), setMaxDeviationBasisPoints(), setTokens(), setPrice(), setPrices(), setCompactedPrices(): These functions allow the contract owner to set various parameters related to price events, timing, tokens, and token prices.

8. setOracle(), setRouter(): These functions enable the contract owner to specify the Oracle and Router addresses.

9. setMinExecFee(), setSystemRouter(): These functions let the contract owner set the minimum execution fee and designate a system router.

10. listPair(), setMaxTotalSize(), setPairStatus(), setTradingFeeRate(), setMaxLeverage(), setMarginRatio(): These functions let the contract owner manage the pairing of tokens, maximum size, pair status, trading fee rate, maximum leverage, and margin ratio.

11. setPriceFeed(), setFutureUtil(), setProtocolFeeTo(): These functions enable the contract owner to set the price feed address, future utility address, and protocol fee recipient address.

12. realizePairProtocoFee(), decreaseInsuranceFund(): These functions let the contract owner or protocol fee recipient realize the pair protocol fee and decrease the insurance fund.

Conclusion

The contract encompasses several functions related to the management of a token staking and reward platform. The contract owner has extensive control over platform parameters, token pools, reward rates, price feeds, and more. We have analyzed the contract code and identified potential vulnerabilities and risks that could affect the security and functionality of the platform. Practices should be taken to mitigate these issues and improve the quality and robustness of the contract.

Follow Us

Twitter: @MetaTrustLabs

Website: metatrust.io

Comments

All Comments

Recommended for you

  • Crypto-Friendly Bank Erebor Seeks $1.5B Funding with a16z Participation

    On August 11, Erebor Bank, a crypto-friendly bank co-founded by Oculus and Anduril founder Palmer Luckey and Palantir co-founder Joe Lonsdale, is seeking $1.5 billion in funding, with a pre-money valuation target of $8 billion. This valuation is nearly double the $435 million valuation the company had when it completed a $350 million funding round in December 2025. Erebor has already received support from investment institutions such as 8VC and Haun Ventures, and the new funding round is expected to attract participation from Lux Capital, Andreessen Horowitz (a16z), Human Capital, Valor Equity Partners, and SV Angel, among others. As AI infrastructure investment enters a phase of rapid expansion, Erebor is targeting the financing needs of AI companies. AI companies require substantial capital to purchase GPUs, build data centers, and secure energy supplies, while traditional financial institutions are gradually exploring financing models for AI infrastructure assets. However, whether Erebor can maintain rapid growth after the AI and crypto industry cycles cool down remains a key focus for the market. The funding round has not yet been finalized and is expected to be completed within the coming weeks.

  • Russia's Central Bank Adds Bitcoin, Ethereum, and USDT to Publicly Tradable Cryptocurrency List

    On August 11, the Central Bank of Russia included Bitcoin, Ethereum, and Tether (USDT) in the list of cryptocurrencies that can be publicly traded on domestic exchanges.

  • BTC Breaks Above $64,000

    Market data shows BTC has broken through $64,000 and is currently reported at $64,000.33, with a 24-hour decline of 1.53%. Market volatility is high, so please exercise caution and manage risks accordingly.

  • BTC Falls Below $64,000

    Market data shows BTC has fallen below $64,000, currently at $63,999.77, with a 24-hour decline of 1.89%. Market volatility is significant; please exercise risk control.

  • Vitalik Updates Ethereum Roadmap: Privacy, Post-Quantum Scaling, and Native Rollups Become New Priorities

    On August 10, Vitalik Buterin stated that he had compared the 2023 Ethereum roadmap with the current Strawmap. The overall direction still overlaps considerably, but some priorities and technical paths have been clearly adjusted, including raising the priority of quantum safety, downweighting VDF and some EVM improvements, and replacing old designs with solutions such as a unified binary tree, PBT, and new state types. He noted that the most notable change in the current Strawmap is the emergence of several new topics not included in the 2023 roadmap, reflecting a shift in Ethereum's R&D focus. These new priorities include: stronger native privacy support, aggressive scaling in a post-quantum context, specification streamlining for formal verification, Blob and Gas futures, native Rollups, and a more open design space for the future shape of the EVM. Vitalik also emphasized that Ethereum's scaling approach is shifting from 'expanding all activities comprehensively' to 'designing more scalable dedicated mechanisms for specific high-load scenarios,' and he regards STARK proofs and AI-accelerated formal verification as important foundations for the protocol's future. Overall, this update shows that the Ethereum roadmap is evolving toward quantum safety, privacy-first, censorship resistance, high performance, and simpler protocol design.

  • ETH Falls Below $1900

    Market数据显示,ETH has fallen below $1900, currently reported at $1899.19, with a 24-hour decline of 1.28%. The market is highly volatile. Please exercise risk control.

  • Microsoft Plans to Release Next-Gen MAIA 300 AI Chip in September

    On August 10, according to reports, Microsoft plans to release its next-generation MAIA 300 AI chip in September.

  • BitMine Adds 7,391 ETH and Buys Back 3 Million Shares Last Week

    As of August 9, Eastern Time, BitMine's total cryptocurrency + cash holdings + "Moonshot" initiative amounted to $11.6 billion. BitMine held 5,805,238 ETH (up 7,391 ETH from last week), representing 4.8% of the total Ethereum supply (120.7 million ETH). It also held 209 BTC, $180 million in Beast Industries shares, $69 million in Eightco Holdings (NASDAQ: ORBS) shares, and $104 million in unsecured cash. BitMine repurchased 3 million common shares last week, bringing the total common shares repurchased since early July to over 19 million. As of August 9, 2026, BitMine's total staked ETH was 5,067,309 (worth approximately $9.8 billion at $1,928 per ETH).

  • Strategy Sells 1,691 BTC in Past Week

    Regulatory filings show that Strategy sold 1,691 BTC over the past week, increasing its dollar reserves by $650 million.

  • Unitree Technology: Final Online Issuance Winning Rate 0.0181%

    On August 10, Unitree Technology (688836.SH) announced that the company's initial public offering of shares and the online issuance subscription status and winning rate on the Sci-Tech Innovation Board were disclosed. The issuing price was RMB 150.80 per share, with a total of 40,446,434 shares issued. After the activation of the clawback mechanism, the final online issuance was 9,707,000 shares, accounting for approximately 30.00% of the total shares issued after deducting the final strategic placement, and the final online issuance winning rate was 0.01809759%.