logo

APEXIA

Learning and development of smart contract

In the Apexia project, our smart contracts automate transactions and ensure transparency by securely executing predefined agreements. These contracts eliminate the need for intermediaries, reducing costs and enhancing efficiency. With robust security features, our smart contracts provide trust and reliability for all participants in the network.

image
test

ApexiaToken

0x4114Fe782fAb89c41855
a230d4582b82F6885237

The ApexiaToken contract is an ERC20 token implementation with minting and burning capabilities, built using OpenZeppelin libraries. It employs role-based access control. Tokens can be minted to increase supply or burned to reduce it. The contract ensures security by restricting these actions to authorized roles, and its deployment requires specifying addresses for both the admin and the minter. ApexiaToken integrates seamlessly into the Apexia ecosystem, facilitating efficient token management.

PriceBalancer

0xde16646549C2680C14
c671e90bf7Df6FA69647e6

The Main Pool contract acts as the backbone of the Apexia system, responsible for managing token operations and pool balances. Its core functionalities include::

1- Token Minting and Burning

  • ◦ Tokens are minted when a user purchases a package, with the minted amount determined by the current token price.
  • ◦ Tokens are burned when users exchange their APX tokens for USDT, with the equivalent USDT amount transferred to the user's wallet.

2- Package Purchase

  • ◦ The contract maintains multiple investment packages with varying prices.
  • ◦ Users can purchase these packages with USDT, receive APX tokens, and become eligible to participate in other reward pools.
  • ◦ The APX tokens minted during the purchase are directly transferred to the user'swallet, and the balances of the associated pools are updated.
  • ◦ Registration: Users must purchase at least one package to register and participate in rewards.
  • ◦ After each package purchase, the token price is recalculated, affecting all future buying and selling transactions.

3- Selling APX Tokens

  • ◦ Users can sell their APX tokens back to the Main Pool for USDT.
  • ◦ The contract calculates the equivalent USDT amount based on the current token price, burns the APX tokens, and transfers USDT to the user's wallet.
  • ◦ After the transaction, the token price is recalculated.
This pool supports three main pools: MatchingBonusPool, OwnersPool, and BalancerPool and manages funds across three sub-pools.

OwnersPool

0x46a122B50E7fAEC5b0cFc
526EC9494D9a68A5011

The OwnersPool contract distributes USDT to predefined owners based on their shares. Admins set owners and shares. Owners can withdraw their allocated funds using withdrawal, which updates balances before transfer. Key functionality:
  • ◦ Reserved exclusively for owner members, this pool accumulates a percentage of tokens from each package purchase.
  • ◦ Membership is immutable and must be set at the contract's deployment.

BalancerPool

0x110B1EE769ba9D0a1A2
FAeCe4be3924D1F30Ed8C

The BalancerPool contract manages user balances and token withdrawals. Admins can allocate tokens to users, ensuring they exist in the main pool. Users can withdraw their tokens, which transfers a portion to the main and mint the users new APX tokens. Key functionality:
  • ◦ Allows the admin to allocate a portion of its balance to users who have purchased at least one package
  • ◦ Users can withdraw their allocated tokens from this pool During withdrawal:• New APX tokens are minted and transferred to the user's wallet. • The token price is updated accordingly.

MatchingBonusPool

0x31DC822976b227273E81c
B2cA5f3CE5A8aA1Ab7c

The MatchingBonusPool allocates its balance to users, and when users withdraw their tokens, new tokens are minted for them, which also updates the token price. If the pool balance is not fully allocated within a specific time frame, any remaining balance will be divided equally among the four reward pools. Admins have the ability to manage the allocation of reward pool addresses, and the system ensures that the pool's balance is always distributed efficiently to users and reward pools. Key functionality:
  • ◦ Operates similarly to the Balancer Pool with focuses on allocating USDT to users.
  • ◦ Admins can allocate USDT to eligible users, who can then withdraw the allocated amounts.
  • ◦ Time-Sensitive Allocation: If the allocated balance is not fully distributed within a set timeframe, the surplus is redistributed equally among four reward pools:• RewardPool10• RewardPool20• RewardPool30• RewardPool40

RewardPool10

0x61aF22426930e5Af3631
7C7dd420A9Da1314080c

The RewardPool10 is one of the Matching bonus reward pools. The contract acts similarly to the Matching Bonus Pool, with the key difference being that any surplus in this pool is transferred back to the Matching Bonus Pool rather than being allocated elsewhere. Similar to the Matching bonus pool allocates its balance to users, and when users withdraw their tokens, the USDT will be transferred to the user’s wallet and a portion directed to the main pool to adjust the token price in that pool. Key functionality:

Allocation:

  • ◦ The admin can allocate a portion of the pool’s balance to users who have purchased at least one package.
  • ◦ Allocation is restricted to eligible users only.

Time-Sensitive Allocation:

  • ◦ Like the Matching Bonus Pool, these pools follow a time-sensitive allocation mechanism.
  • ◦ If the allocated balance is not fully distributed within the specified timeframe, the remaining balance is transferred back to the Matching Bonus Pool. This creates a continuous cycle of redistribution.

User Withdrawals:

  • ◦ Users can withdraw their allocated USDT tokens from the reward pools.
  • ◦ During the withdrawal process:• The USDT tokens are transferred to the user’s wallet.• The token price is updated to reflect the new balance.

RewardPool20

0x58Dd54C2c5C2A06259A
3631CA8A7a4C268021980

The RewardPool20 is one of the Matching bonus reward’s pool. The contract acts exactly like the RewardPool10

RewardPool30

0x1a886351C6aE96330E9
5aC77a726A4dD5f91eD4d

The RewardPool30 is one of the Matching bonus reward’s pool. The contract acts exactly like the RewardPool10.

RewardPool40

0x624cc7188aBDD3E83BC
21ef8A826D2c3875F6fC5

The RewardPool40 is one of the Matching bonus reward’s pool. The contract acts exactly like the RewardPool10.