Since schelling is a contract, when transferring COR to it the 'Token._transferToContract(...)' function will be used - it expects the receiving contract to implement the receiveToken function (and it fails in unpredictable ways if that function is not available - see issue 119 ).
It could work only if all of the COR transfers to schelling contract are made using only the Token.transferFromByModule(..) function (since it bypasses _transferToContract(...) ). But this looks kind of fragile and inconsistent.
Also, the schelling.transferEvent(...) function does not handle the case if/when the schelling contract's balance is being decreased, so potentially the rewards variable could become bigger than the balanceOf(schelling) and the newSchellingRound(...) function will fail forever until the contract is replaced.
Since
schellingis a contract, when transferring COR to it the 'Token._transferToContract(...)' function will be used - it expects the receiving contract to implement thereceiveTokenfunction (and it fails in unpredictable ways if that function is not available - see issue 119 ).It could work only if all of the COR transfers to
schellingcontract are made using only theToken.transferFromByModule(..)function (since it bypasses_transferToContract(...)). But this looks kind of fragile and inconsistent.Also, the
schelling.transferEvent(...)function does not handle the case if/when theschellingcontract's balance is being decreased, so potentially therewardsvariable could become bigger than thebalanceOf(schelling)and thenewSchellingRound(...)function will fail forever until the contract is replaced.