> financial applications have been built on top of Ethereum that all share the same database and users can move from application to application, keeping their data (and their login credentials stored in their wallet) as they go. Does anyone have examples of this in the wild? I often hear data portability listed as one of the great benefits, but I don’t have a grasp on what that actually means. In my mind, the data ne…
For example if you have Ether, you can use a decentralized exchange (e.g. Uniswap) to swap it to stablecoins like USDC and DAI, deposit that USDC and DAI into a collateralized lending market (e.g. Compound), then deposit your deposit tickets into a stable pair exchange (e.g. Curve) to earn maker fees when others trade against your liquidity, while ALSO earning interest fees that accrue to the underlying. This is possible because these contracts are all able to share data about token balances with each other.
On a side note, DAI is actually a great example to illustrate this kind of data sharing, because behind the scenes, DAI is itself a synthetic asset backed by yet other assets. DAI backing even includes derivative assets that themselves represent claims on liquidity denominated in yet other assets in external contracts (e.g. UNIV2WBTCETH). The tangled web of assets backed by other assets is insane, honestly, but it's all made possible by contracts sharing data with each other.
As a second example, you could take some bitcoin, bridge it onto Ethereum (using e.g. the REN network), and deposit and earn interest on it on a collateralized lending platform. These actions all require data about ETH balances and token balances to be portable across dApps, and in this case even portability across the Bitcoin and Ethereum networks.
A non-monetary example of data portability within Ethereum is the Ethereum Name Service. Like DNS, the name database is public and can be queried by other dApps. As a bonus, names in ENS also follow the ERC-721 token standard which provides a standard way to share data about who owns which names, so it's theoretically possible to write contracts that themselves write derivatives on name ownership, for example to give someone a collateralized loan backed by the value of their ENS name, or to have a contract that owns an ENS name but that requires a majority DAO vote in order to manage the name or transfer ownership.
In summary, for the most part dApps are purposely written in such a way that they can be easily integrated with other dApps using open standards and without asking permission, which is why the space sometimes gets a "money legos" moniker.
The data structures that allow these apps to pass data between each other are defined by the ERC-20 and ERC-721 token standards, which list standard method interfaces for smart contracts to store and query each others' token balances, and I believe were officiated as standards by the Ethereum Foundation. These standards are currently widely supported across all Ethereum smart contracts that involve tokens.