Libp2p protocols can be divided into 2 layers:
- Transport layer protocols, that actively use peer address to discover network and establish connection;
- Application layer protocols, that is used to exchange actual payload once the connection is active.
To contribute to libp2p stack or build your own, kindly check developing a transport layer protocol and also the list of best practices.