It wasn't a treaty, so your reference to constitutionality was flat out wrong. And as you read the agreement received nearly unanimous votes of both Houses. The money Iran received came from unfreezing Iranian assets, their money.