Decentralized Finance And Governance: Designing Automated Market Makers And Voting Systems