The market cap of stablecoins topped $311 billion this week as traders sought shelter from crypto market volatility.