I think you may be misunderstanding the proposal in 719, let me know if the following helps.
Assumptions:
- The contract the user is interacting cannot act on behalf of the user outside of the contract except in ways the user has explicitly allowed (via things like
.approveon a token). - The signing device has the ability to query the blockchain trustlessly, either via a proof based light client or a state bearing client.
Process:
- An untrusted web application provides a DSL like the following to the attached signing device:
Supply {data[0,64] as number / (data[64,64] as contract).decimals() as number} {(data[64,64] as contract).symbol()} (data[64,64] as address) to Aave for lending in exchange for yield.
- The signing device hashes the provided DSL and makes a contract call
validatedDslHash(hashOfProvidedDsl)If the AAVE contract returnsfalse, the signer errors and terminates the signing process. - The signing device queries the contract provided as the second parameter asking for the
decimalsandsymbol, and then presents the following to the user:Supply 1 USDC (0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48) to Aave for lending in exchange for yield.
- The user signs the transaction, which then gets posted to the blockchain for inclusion.
Note here that the DSL is processed on the signing device, not on the blockchain, so no need to do anything with Solidity other than writing the validateDslHash function, which can just be something like:
function validateDslHash(bytes32 hash) {
if (hash == 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef) return true
if (hash == 0xcafebabecafebabecafebabecafebabecafebabe) return true
return false
}
This design does require that the signing device has the ability to execute transactions against the blockchain. You can remove this requirement by constraining the DSL so it can only operate on the provided parameters, it cannot do things like resolve contract code. This limits the utility, but still makes it better than just rendering 712 transactions in the signing tool.
This proposal does require writing solidity code for constructing a complete DSL, but it would give you rich DSL completion without the signing device needing access to the blockchain.
For SAFE transactions (and multicall, other contract wallets, etc.), the DSL renderer just needs to be recursive, which is a fairly minor engineering lift in the grand scheme of things. Certainly more complicated than only doing a single layer DSL renderer, but it is far from impossible.
Regarding a âfake USDCâ, for something like Uniswap, this is certainly a concern. Luckily, we can punt this problem to Uniswap to solve. They could choose to only show addresses, not symbols, or they could choose to include warning text. Either way, it is strictly equal to or better than a 712 based approach which has essentially the same constraints.