Overcoming trust limits

There is currently a problem in the way transitive transfers and trust limits are implemented. Essentially the ability of a user to accept Circles from people they trust depends on them holding their own Circles. A user will only accept foreign Circles if they hold a larger amount of their own. However - it is possible that Circles leave the web of trust via regular ERC20 transfers. This means that there can be situations where all of the Circles of a person are held by an external account not part of the web of trust. This means there is no way to transfer those Circles to the user and therefore there is also no way to transfer additional (foreign) Circles to that user.

However - there is a way to fix this. The trick is that we can always use the erc20 transfer to send Circles to a specific user. To accomplish that we need a simple helper contract. This contract has a few functions:
a) it registers on creation as an organizational wallet
b) it allows anyone to make it trust any Circles account
c) it implements a transfer function - the arguments of the transfer function contain an array of Tokens and amounts and a receiver. The transfer function will check that the receiver trusts (simply check whether “limits” >1 - not using the sendlimit) all the tokens and if it does it will transfer all the tokens to the user via the erc20 transfer, emitting the same event as the hub “transferThrough”.

To use this alternative transfer a user will need to bundle 2 transactions together.

  1. a regular transfer trough that transfers CRC to the forwarder contract. For the regular pathfinder can be used but in such a way that the pathfinder pretends that the forwarder contract is an orga that exactly only trusts all the user that the final user trusts.
  2. The transfer function of the forwarder as described in c)

https://www.figma.com/file/ePCCvws4C4p5YJ2r7oY5ti/Circles-forwarder-contract?node-id=0%3A1&t=Pu3YXMsYasYvWhF1-1