They make up a balanced account with Heaven, as our old cellarer used to call his ciphering, as fair Isaac the Jew keeps with his debtors, and like him, give out very little, and take very large credit for doing so; reckoning, doubtless, on their own behalf the sevenfold usary which the blessed text hath promised to charitable loans . . . these honest fellows balance a good deed with one not quite so laudable; as a crown given to a begging friar with a hundred byzants taken from a fat abbot, or a wench kissed in the greenwood with the relief of a poor widow . . . The merry men of the forest set off the building of a cottage with the burning of a castle - the thatching of a choir against the robbing of a church - the setting free of a poor prisoner against the murder of a proud sheriff . . . Gentle theives they are, in short, and courteous robbers; but it is ever the luckiest to meet with them when they are at the worst . . . then they have some compunction, and are for making up matters with Heaven. But when they have struck an even balance, Heaven help them with whom they next open the account!
[pp343-4 of the 1995 Wordsworth edition]
The interesting thing is that up to this point the outlaws of the forest have been the good guys and yet Wamba's insight shows that really they just happen to be on the side of "good" when we meet them in the narrative. In reality they are operating on the same principles that the bad guys are. This passage and the way the black knight, revealed later to be Richard the Lion Heart, is portrayed leave the observant reader unsettled. Ivanhoe is not the simple swashbuckling tale of good versus evil, it is more the story of two virtuous people navigating a treacherous world where one side is little better than another. If anything there is something karmic rather than Christian about the way one good deed done selflessly leads inexorably to another. But in the way Scott exposes the human tendency to "trade with Heaven" he is spot on.
In the finale when Ivanhoe takes the part of Rebecca's champion in trial by combat he is wounded and exhausted, barely able to stand, and totally outmatched by his opponent. Yet ultimately the vindication that Rebecca needs does come, and not from Ivanhoe's strength, which is already spent. I think it fair to say that for Scott, those who justify themselves are ultimately found wanting, some coming to very sticky ends, and it is only those who give no thought to such accounts but do the right thing anyway who experience Heaven's reward.