How does Russia have so much foreign exchange reserves? Source

Russia is under U.S. sanctions. How does Russia have so much foreign exchange reserves?
russia uses its oil revenue to setup russia stabilization fund in 2004. The money in that fund is used to pay for national budget deficit. The foreign exchange reserve of Bank of Russia is not affected by the US led sanctions.