https://github.com/casweeney/cairo-synthentix-staking
This is an implementation of Synthetix staking rewards contract in Cairo lang.
https://github.com/casweeney/cairo-synthentix-staking
cairo cairo-lang cairolang staking staking-contract staking-rewards starknet synthetix
Last synced: 4 months ago
JSON representation
This is an implementation of Synthetix staking rewards contract in Cairo lang.
- Host: GitHub
- URL: https://github.com/casweeney/cairo-synthentix-staking
- Owner: casweeney
- Created: 2024-10-14T15:50:14.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-25T22:13:57.000Z (7 months ago)
- Last Synced: 2024-11-25T23:22:37.050Z (7 months ago)
- Topics: cairo, cairo-lang, cairolang, staking, staking-contract, staking-rewards, starknet, synthetix
- Language: Cairo
- Homepage:
- Size: 54.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Synthetix Staking Contract
This repo contains the implementation of Synthetix staking rewards contract in Cairo lang.## Challenges
The unit & integration test for this contract was done with manipulated block_timestamp because at the time of writing this contract, `get_block_timestamp()` function on Starknet test, returns `0` and most of the functions depended on that.A confirmation test was done onchain, the contract was deployed on Starknet Sepolia and was tested via https://sepolia.voyager.online. Everything works fine as expected.
See interactions: https://sepolia.voyager.online/contract/0x06c9df27d399ec8c9d417aaee3a591aea21e41d0d4661252007327cd3dee22a5
Staking token contract: 0x227e1a8c4ee85feccab767c584c0b46f5c4062e97a9219a91ec75c86ce0a840
Reward token contract: 0x702d2721fdcb98fae346bf1398e0702b27c8ccc97e75e632ff93653ece67253
Staking contract: 0x6c9df27d399ec8c9d417aaee3a591aea21e41d0d4661252007327cd3dee22a5## Deployment
`deploy-r-t`: deploys the reward token using: `npm run deploy-r-t`
`deploy-s-t`: deploys the staking token using: `npm run deploy-s-t`
`deploy`: deploys the Staking contract using: `npm run deploy`