The repairing of a broken Solidity smart contract project
Functional
https://testnet.snowtrace.io/address/0xc190ea9803f93c2e0f9c82f68cc6dbad053e8928#code
https://testnet.snowtrace.io/tx/0x79f618676769cd977516ae691d02d8f0f20cb02c725968a139e05b770984e4fb
https://testnet.snowtrace.io/tx/0x262c9e37377755d8c153aee5b788888a5f719c13c102020c2b45233676c747d3
https://testnet.snowtrace.io/tx/0xeb66902924525ee105df412967196144dd5f2969acce415ca89618aa5eae415b
https://testnet.snowtrace.io/tx/0x65bebc0a973f5a471ebf4e6653402b5acf74282ca506c8fb08905794551b71c6
https://testnet.snowtrace.io/address/0x55de80bafa027222dff69090c6b9bfc4bbdad90b#code
https://testnet.snowtrace.io/tx/0x9732b57edc74424f3687b3bbd3c3a91af447365f3cc0abf39009f8f8b402917c https://testnet.snowtrace.io/tx/0x88faacfe26caa0da82f82fc140aa4ac3ff40fccf1f3335c76b46363d1047ab30
https://testnet.snowtrace.io/address/0xd11ee576a8c4c5a27cc833cae4fb5030f27f3673
- Use lowest privilege accessibility function modifiers
- Do not modify contract state with modifier
- Use global variable vs local variable naming conventions
- Do not introduce irrelevant branching
- Only one contract per Solidity file
- Consider LP / rebase token as staking receipt
- Minimal deposit amount (i.e. 1e16 for 0.01 of 18 decimal token)
- Unimplemented inherited functions (StakingRewards)
- Missing reentrancy protections
- Unimplemented locking timestamp
- Missing checks
- Locking timestamp setter exposed to user
- viewLockingTimeStamp() should accept an user address
- Locking timestamp attack @ stakeTransferWithBalance
- Unimplemented / Partially implemented lost token recovery
- Pause contract (Unprotected Public & External functions)