DeFi protocols are autonomous programs encoded into smart contracts either on Ethereum or a similar blockchain ecosystem.