-
Starts: November 06, 2025 Noon UTC
-
Ends: November 13, 2025 Noon UTC
-
nSLOC: 193
This smart contract implements a tournament betting vault using the ERC4626 tokenized vault standard. It allows users to deposit an ERC20 asset to bet on a team, and at the end of the tournament, winners share the pool based on the value of their deposits.
Overview Participants can deposit tokens into the vault before the tournament begins, selecting a team to bet on. After the tournament ends and the winning team is set by the contract owner, users who bet on the correct team can withdraw their share of the total pooled assets.
The vault is fully ERC4626-compliant, enabling integrations with DeFi protocols and front-end tools that understand tokenized vaults.
Actors:
owner : Only the owner can set the winner after the event ends.
Users : Users have to send in asset to the contract (deposit + participation fee).
users should not be able to deposit once the event starts.
Users should only join events only after they have made deposit.
├── src
│ ├── briTechToken.sol
│ └── briVault.sol
Compatibilities: Blockchains: - Ethereum/Any EVM Tokens: - ERC20
git clone https://github.com/CodeHawks-Contests/2025-11-brivault.git
forge install OpenZeppelin/openzeppelin-contracts
forge install vectorized/solady
forge buildForge testNo known Issues