https://github.com/d3portillo/cr-contracts
CodeRiots Smart Contracts
https://github.com/d3portillo/cr-contracts
Last synced: 22 days ago
JSON representation
CodeRiots Smart Contracts
- Host: GitHub
- URL: https://github.com/d3portillo/cr-contracts
- Owner: D3Portillo
- Created: 2025-08-24T22:04:56.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2025-08-29T21:28:54.000Z (about 1 month ago)
- Last Synced: 2025-09-12T10:51:01.653Z (25 days ago)
- Language: Sway
- Homepage: https://coderiots.com
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Code Riots Sway Smart Contracts
A simple implementation of a decentralized betting platform using Sway smart contracts.
# Logic chips:
- Contract is initializable (owner = house)
- owner can start a challenge (time to be live, fees to be taken)
- owner can cancel a challenge (anyone can withdraw their assets - no fees taken)
- owner can finalize a challenge (in case time's up before - pick winner and fees are TAKEN)
- backers can deposit for their favorite riots
- backers can withdraw their deposits (if challenge is canceled)
- backers can claim rewards (deposits + earned, if challenge is successful)
- backers can see the total TVL delegated to a riot
- backers can see the global accumulated TVL
- riots are off-chain hosted and have a consistent id across all challenges
- fails when not initialized
- we can see total BKRs