Coinbase says it has an agreement to end an SEC lawsuit over allegedly trading unregistered securities.