Treasury
Concept
The treasury is a cornerstone of the Frosty.casino platform, serving as the central repository for all platform funds. It handles both incoming and outgoing funds, managing losses from bets and disbursing winnings.
The benefits of having a centralized treasury are evident:
Consolidated Fund Management: By centralizing funds in one place rather than dispersing them across various game smart contracts, we simplify fund management and tracking.
Scalability and Flexibility: The treasuryβs architecture is designed for future expansion and improvement, allowing for functionality extensions such as profit sharing. This would be challenging to implement with a decentralized system interacting with multiple game contracts.
Architectural Hierarchy: The treasury smart contract is positioned at the top of the system hierarchy. All other smart contracts interact with the treasury through Cross Program Invocations, with the treasury controlling which contracts can access and release funds.
The treasury is divided into three specialized smart contracts, each with distinct features and functions:
1. Main Treasury
Purpose: The main treasury is responsible for handling winnings and is initially seeded with funds. It ensures that winnings are paid out to players and that a portion of losses is collected.
Core Functions:
Payout winnings to players
Receive and manage player losses
Control access and permissions
Allow the platform to withdraw profits
2. Profit Sharing Treasury
Purpose: This treasury focuses on profit sharing rather than direct gambling operations. It accumulates a portion of the profits from each game and facilitates staking and reward distribution among $CHIP token holders.
Core Functions:
Receive a share of player losses
Manage $CHIP token staking and un-staking
Distribute staking rewards derived from platform profits
3. Jackpot Treasury
Purpose: Directly integrated with the gambling module, the jackpot treasury collects a small portion of profits from each game. It uniquely triggers jackpot payouts based on gameplay.
Core Functions:
Receive a portion of player losses
Disburse jackpot winnings to players
Last updated