first prototype: coin dependence

also fixed casting logic errors which were affecting the other
dependencies