Added market basic dynamic trading equation.
Basic market traiding functions and frameworks.
Refactor resource trading into two seperate steps
1. from -> intrinsic value through amount integral
2. to <- get the transaction amount through a inverse of amount integral