How use routing mark with 2 wan

I have used the distance 2 for ppp-out1 because in my first config of the Mikrotik that was more simple (without the logic to use the failover on usb 3g) the two wan are all in dhcp with automatic creation of gateway, so to make work with priority of the ethernet wan I had to put distance 2 to the ppp-out1 gw.
Now I implemented a logic for the failover that check the two line and manage the switch of internet only if I have more than 20 ping loss to a gateway, and also if the second wan is connected for 20 ping.
That is why I need to have two ip (1.1.1.1 and 1.0.0.1) to ping for each wan interface. With the ping answer I decide where swith the intertet for clients.
Behind the wan, I have 3 lan all routed in a tunnel ipsec, so the outgoing public IP for client is the IP of the main building internet where is terminated the tunnel ipsec.
The check for gateways (1.1.1.1 and 1.0.0.0) is made from the mikrotik that can surf internet without go to the tunnel.

Sorry for the long explain, but I think that it was great to know.

I tried what you asked me.
The ping to 1.0.0.1 works fine if I detach the wan cable in ether1. It works also with mangle active…