Bringing external data/blokchains to Safenet

As we all know, we need some interaction of safenet with external world. For Example MAID OMNI to SNT is such an example, where our safnetwork could easily perform automatic conversion from OMNI to SNT. This is called crosschain/crossproject aproach.

I have previously suggested to implement not only compute layer, but plugin layer, that will enable external plugins to run and bring such external data from other blockchains or clearnet to the safenetwork.

Safe network has a huge advantage of cheap native storage compared to other blockchain project, so it is a natural place where such external data could be gathered and mixed and allow other projects to benefit from that.

Safe network has solved decentralization already, so bringing computation layer, plugins, oracles etc on top of it should be super easy compared to what was already done.

I would like to show an example of what I was talking about, when I was talking about plugins. Chainlink is a project, that made it to 18billion market cap from 180 million market cap during last 2 years. And it in fact does what I proposed for plugin system. They called it Oracles.

And such oracles process external data, like price ticker of some stocks, or Bitcoin transactions, or any external data processing. They have adapters on top of it, that allow data processing, etc.

So my suggestion is, to look into chainlink oracle implementation and in my humble oppinion we should have such system on Maidsafe.

If creating such custom system is too complicated, we could at least implement a single native plugin, that would allow calling chainlink api. With Chainlink plugin native to safenetwork, safenetwork would simply clone whole chainlink blockchain in real time. With that, there would be native trusted decentralized external source of data for whole safenetwork. It would be super easy to create an exchange, since we would know all price tickers. We would be able to call for example ETH transactions via Chainlink Oracles. This Is How Chainlink Oracles Work on Ethereum | by Alex Roan | The Startup | Medium

Simply implementing native Chainlink plugin would bring us insane amount of options.


This may be true but we have no pull requests for such things. So simple is going to be relative. I see each of these things as requiring deep thinking and delicate design to ensure they are done correctly. So yes I believe likely simple in comparison to what we have done, but perhaps not simple in their own right. I don’t know really but I reckon we will soon, at least I hope so.


The reason I think it is relatively simple is, that oracle/plugin implementation can reuse current consensus algorithm. The problem with decentralized oracles is, they can attack be sending wrong data. But Safenet has solved this already. There are elders. And we can simply make Elders oracles/plugins executors.

Since oracles/plugins can run in any language and the protocol is only data structure of request/response there is 0 danger for Elders. Elders can have a right to run such oracles/plugins, but those plugins will not run on the same machine where the Elder vault is. They can simply configure their vault software do to API calls to their other computers running either on local or remote location. Avery elder could decide which plugins he would like to run if any. Every plugin call would be paid directly in safecoins, so for elders it could be very nice income source.

The other cool feature of safenetwrok is, that it has decentralized file system. This means, we can use simple file on safentwork to hold a map of all Elders that are currently online and ready to excecute plugin call for specific plugin_id. So for simplicity, when client wants to run an oracle/plugin call, clients just sends pluginid, reguestData. His section picks random X elders from that file associated to that pluginID. That file contains all elders from all sections from whole network, not only elders from a single section. Once section picks random X elders, it askes them to execute that call. Once they return result, it checks whether the result from all elders is same.(Or in acceptable range defined by plugin) and sings all the results with a key owned by section and return the result to do client. Section may or may not store that signed result in public data. Client can trust such data and publish it for others. This way everyone can be sure it is a result of oracle computation, because it is signed by section.

In case elders do not return any answer or deliver different answer than others, they can be banned for some time from doing calls for that plugin_id.

This simple mechanics allows clients to pay for external data they need, publish it and let others work with it. Network does not need to know anything about plugins or what they do. It just picks random X plugins, signs the results and temporarilly bans elders from doing plugin calls if they do not behave as expected.

Clients will instantly have an option do grab any data, copy bitcoin blockchain, publish ETH transaction, do atomic swap on uniswap, etc. Price tickers for any trading pair woul be available instantly. It would be possible to create syntetic tokens, like syntetic gold token, syntetic USD, etc and trade them for other crypto directly from the network. Not talking about option so send, receive emails from clearnet or anonymously access clearnet apis via oracles(anonymous VPN)


You might find these recent comments by Vitalik of interest all about Oracles and how the base protocol layer can support a “broader set of applications” (also touches on how Chainlink is pretty complex).

Not sure it can just “simply” leverage SN consensus. This kind of stuff will have to be built around and on top of SN if it is practical/possible, but all the incentives to secure it will have to be carefully considered. Then some agreement by all the SN stakeholders would have to be reached to which ways to take it. Still a long way to go to get to what your glimpsing the future of… luckily lots of different paths have been started down already so do not have to start from absolute scratch.

Once we get to beta and listed on a major exchange or two + marketing of the network getting it off to a good start, then there will be a lot of money and developers looking to do all sorts of things on SN.

I also expect once the token price get’s going there will be plenty of funding for more teams at Maidsafe to do more projects expanding and building on the network.

We can always implement ETH plugin, chainlink plugin and reuse price tickers from their consensus. Price tickers are realtime problem, quite complex. But we need general plugins/oracles for general data processing. And if there is some specific problem, that our general oracles can’t solve easily, we can reuse those who do it correctly. So in My oppionion chainlink plugin and EHT plugin that will grab data from those blockchains solves the problem of price oracles.

We have epic long threads on the likelyhood of that and ways to mitigate… the evidence as far as I can see is telling me it is not going to happen. FATF. SNT is a pure privacy coin.
Hope I am wrong. Not worth debating anymore though…

1 Like

I think we can do way better. Polkadot has gone with Webassembly for smart contracts for example. Smart move IMO.

The data is everything. Smart contract is one form of immutable data.

The only risk of Maidsafe is “Is it really launching or not”

The price, value whatever, they will automatically follow. The data is currency and information. And SNT is native data token. What resource is more important than this?

Decentralised Execution Layer also sometimes referred to as “layer 2” sits over the top of the data. Smart Contracts are just the programs that run on that future yet to be designed layer.

Sure, sounds reasonable. You need a market to discover price though. Chicken and egg.

Smartt contracs are just simple logic/computation on actual data already stored in Safenetwork. But I am talking about bringing external, trusted data, signed by network. If some radnom person uploads anything to Safe Network, how do we know we can trust him he uploaded correct data? But with plugins/oracles we have a safenetwork signature on those results, so evryone can trust that those data are 100% correct. And once you have such external data, you can run some logic via smart contracts on top of it. But without such trusted external source, smart contracts has not much to do. The power of smarcontracts is when crosschain/crossplatform logic is possible. And plugins/oracles bring such option.

Let people independently add their signature if they validate the data themselves. Basically like Bitcoin ‘confirmations’, how many people have successfully verified it to be true as seen by original source, but then we also need to know if they really verified it or just spamming fake confirmations.

1 Like

This is the problem why you can’t let people do it. Bitcoin solves this problem by POW, so the most powerful wins the vote. On safenetwork we have elders, they solve this problem. That is why I said it is easy, because once we have Elders we can trust them and reuse their voting for anything again and again. They can’t attack easily, since they can easily lose a lot. Other networks use POS system, where such voters need to own coins first, so they are invested and do not want to lose their coins value by acting bad. But Pos is very vulnerable to rich guy attack. Our Elders are very unique and reusing them for any kind of consensus is an easy solution to very hard problem.


Your suggesting that the elders would provide (or at least vote on the credibility of) some data stream whose source is external to the network i.e. Oracle data. If elders vote incorrectly as part of SN consensus they are just booted out from being an elder, they do not actually lose any SNT or have some other financial loss and the security comes from it being very hard for an attacker to coordinate whole sections of nodes they control together (AFAIK?).
We will only get increasing confidence over time that this is enough once we get past the testnets and onto the Canary nets/release where real value is up for grabs. Whether that consensus mechanism can also translate to securing other things like oracle data where the only penalty for lying is being booted out remains to be researched or as is more common in DeFi: some project will just try it with a few hundred million and see if it disappears or not.



Yes. Losing option to support that plugin again is financtial loss too, since they earn on such calls. Losing elder status is finantial loss either.

If it does not work for plugins, I am not sure how a network itself can work. Also, my suggestion is, that we should connect all elder from all sections together to a single pool of plugin operators and pick randomly subset on each call.

Trust on such data will be always based on plugin trust itself. For example plugin grabbing eth blockchain that will be supported by thousand of elders is way more trusted than some custom made plugin for grabing some shitcoin chain operated by few elders. Each such response can have information that it was called on X oracles our of Y available. And users can decide, whether those X out of Y are good enough.
Plugin calls from client can have additional parameter, number of plugins to be run on. If client is willing to pay more, he can pay even 100 paralel calls, or only 1. It all depends on him and the price he is willing to pay for such call. Trust of that data will depend on how many paralel calls was done from how many available.


@Antifragile only slightly off-topic but if I remember right you have troubles with KYC/AML and I just learned that as long as you have live Oracle price feeds to an exchange then you can trade “Synthetics” or tokens that represent a security and I guess that isn’t covered by SEC or other agencies that require KYC/AML.

Just thought it was worth sharing. Anyone have thoughts on that? I think the more we circumvent the system the better off we’ll be.


Check Haven protocol. It is amazing project using monero tech and is doing exactly this. They created anonymous syntetic stable coins and they grab price of stablecoins from chainlink. They have XHV token, that can be used to mint xUSD that conversion is using those price feed from chainlink. Once you have xUSD you can anonymously exchange it to other syntetic tokens, like xEUR or xAU which is synteric gold. They introduced this just a week ago, it is very fresh. Everything you exchange is a transaction like on monero, anonymous. They are integrating thorchain for atomic swaps. That will allow them to trade their anonymous syntetic tokens with other blockchains. With this you don’t need to care about kyc or aml.

I have a fundamental problem with KYC. The simple fact that I have to send some random company my personal documents is a disaster. Not mentioning sending them my source of money. Random people have access to my identity and they can do whatever they want with it. If government wants KYC, then they should give us private keys that we can use to sign some data and prove we are someone with public key X and when there is a trouble, government can find out who is owning X. Their kyc policy is just foricng us to give our personal documents to potential criminals.


Pretty sweet but is there a, what’s it called (blanking on the name) like a treasury that holds the actual assets in the amounts that are being traded synthetically?

What I mean is what’s to stop what is basically paper trading an infinite amount of synthetic bitcoin, or any other asset?

I’m sure there’s a good answer and I’ve only skimmed it so far but I love the idea.

A DEX on Safe Network that allows for synthetic trading and atomic swaps, or an NFT marketplace, NFT currency baskets, e-commerce with multi-sig escrow and decentralized arbitration desk, network wide shopping cart, all being anonymous and no intermediaries will be so so powerful and that will fundamentally change the game.


Syntethic assets are usually backed by collateral and the amount od collateral is changed dynamically.

Haven protocol solved it in different way. When you convert XHV to xUSD it destroys XHV and created appropriate amount of xUSD. Since it has access to actual exchange rates via Chainlink, it should give you 22 xUSD for 1 XHV at current rate. When you convert it back, it will destroy xUSD and mint XHV. So this means, minting assets requires people to buy XHV on exchange and destroy it. So this makes XHV more rare when assets amount is increasing. On the other hand, during general bear market price of XHV should go down with other cryptos and as a result people shoull be able to mint more XHV from their stable coins. So the coin supply is changing a lot with price movement. It is highly leveraged to jump fast on bull market and it shold be leveraged on bear market to downside. But since this platform allows anonymous stable coins in general bear market, that downside potential should be compensated by inflow of bears searching for decentralized stable coins. So XHV token should be very volatile and stable coins should do the exact opposite.

I personaly love this concept and I have invested a lot into it last days.


I actually went and bought some XHV without even doing any real research, just because you mentioned it. Are there different wallets for this coin? Can you recommend one?