Wrap Contracts: Foundations and Ramifications