Platform: Code4rena
Start Date: 29/04/2022
Pot Size: $22,000 USDC
Total HM: 6
Participants: 40
Period: 3 days
Judge: Justin Goro
Total Solo HM: 2
Id: 114
League: ETH
Rank: 27/40
Findings: 1
Award: $62.05
🌟 Selected for report: 0
🚀 Solo Findings: 0
62.0542 USDC - $62.05
[NC - 01] - Fetch decimal from underlying asset
Decimals is defined as "Number of decimals the shares (inhereted ERC20) will have. Same as underlying asset to ensure sane exchange rates for shares", and is passed as an argument in the constructor. It could easily be fetched directly from the underlying asset, avoiding a potential mistake during deployment.
#0 - PierrickGT
2022-05-03T22:54:18Z
Yes we could do this but since in our deploy script we set the decimals of the Ticket contract the same way, it's best to keep the same mechanism and have the tokens decimals clearly defined in the deploy script. https://github.com/pooltogether/v4-mainnet/blob/17c711a499b8fcbe9db487e0bd8e478836c6b0f4/deploy/v1.0.1/mainnet.ts#L94
#1 - gititGoro
2022-05-14T04:11:45Z
It should be noted that decimals is not a mandatory ERC20 field, either. It's a convention.