Cointime

Download App
iOS & Android

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

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

  • AI infrastructure platform Mahojin completes $5 million financing

    AI infrastructure platform Mahojin has completed a $5 million financing round, led by a16z CSX and Maelstrom. Mahojin aims to create a "GitHub" for AI model creators and dataset developers, with the platform enabling intellectual property tracking and rewarding the original contributors of models and datasets.

  • A senior Brazilian official: Bitcoin reserves are "crucial" to Brazil's prosperity

    according to Decrypt, Pedro Giocondo Guerra, senior advisor to the Vice President of Brazil, stated in a recent speech on behalf of the government: "The strategic reserve of Bitcoin is crucial for the prosperity of the country. Discussions about establishing a BTC reserve may be a key factor in deciding the prosperity of Brazil, in line with the interests of the country and the public." Brazilian congressman Eros Biondini (PL-MG) previously proposed legislation to establish a "strategic sovereign Bitcoin reserve" (RESBit). Holding 5% of foreign exchange reserves (international reserves) in Bitcoin, the Central Bank of Brazil will use advanced monitoring systems, blockchain technology, and artificial intelligence to monitor transactions and be responsible for custody.

  • Bitpanda receives broker-dealer license from Dubai Virtual Assets Authority

    Bitpanda, headquartered in Vienna, has obtained a broker-dealer license from the Dubai Virtual Asset Regulatory Authority (VARA).

  • US artificial intelligence startup Yutori raises $15 million

    Yutori, a startup based in San Francisco, has raised $15 million for the development of an artificial intelligence personal assistant.

  • Meme incubation platform Coresky completes $15 million Series A financing

    Meme incubation platform Coresky announced the completion of a $15 million Series A financing round, led by Tido Capital, with WAGMi Ventures, Copilot Venture Studio, Web3 Vision Fund, and Parallel Ventures participating. The valuation information has not been disclosed, and the company's total financing to date has reached $21 million.

  • Vest Labs Completes $5 Million Seed Round of Financing, with Amber Group, QCP Capital and Other Investors

    Vest Labs, a financial infrastructure company based on real-time risk pricing, has announced the completion of a $5 million seed round financing, with participation from Jane Street, Amber Group, Selini Capital, QCP Capital, and Big Brain Holdings. The new funds will be used to support its construction of a real-time, verifiable risk pricing model based on zero-knowledge proofs to enhance financial market transparency and efficiency, and will also launch a perpetual futures trading platform supporting Arbitrum, Solana, Base, and other L2 solutions.

  • Digital asset high-frequency trading company ABEX completes new round of financing of US$6 million

    ABEX, a digital asset high-frequency trading company based in London, United Kingdom, announced the completion of a $6 million financing round, led by MMC Ventures. The new funds are intended to be used for the launch of derivative trading and algorithmic execution solutions to improve the transaction execution efficiency of centralized and decentralized financial venues. It is reported that the company is registered with the Financial Conduct Authority (FCA) in the United Kingdom, allowing it to engage in cryptocurrency trading activities.

  • The market value of BSC ecosystem meme coin BUBB hit a record high of US$35 million, with a 24-hour increase of 516%.

    On March 21st, according to GMGN market information, the BSC ecosystem meme token BUBB reached a market value of 35 million USD in a short time, hitting a historic high, and is currently at 31.3 million USD, with a 24-hour increase of 516% and a 24-hour trading volume of 41.7 million USD.

  • Decentralized identity management platform Via Science completes $28 million Series B financing, led by Bosch Ventures

    decentralized identity management platform Via Science has completed a $28 million Series B financing round, led by Bosch Ventures, with participation from BMW i Ventures, MassMutual Ventures, Sentinel Global, and Westly Group. It is reported that Via Science's decentralized, zero-trust architecture has been tested by the US Department of Defense and, unlike any other Web3 technology, its combination of end-to-end post-quantum encryption can ensure access and privacy for the authorizer.

  • Cointime精选 ·

    Market Dynamics and Risks of Liquid Staking Derivatives

    Exploring the pricing, liquidity and collateral dynamics of liquid staking tokens (LST's)