Refactor and make reward conditions cleaner (#55)
* Fix reward check conditions and add attestation precondition * Refactor to redunce number of for loops
* Fix reward check conditions and add attestation precondition * Refactor to redunce number of for loops