The project is entering the DeFi world.
}
function loadTrinityPlayer(targetWrapper, theme,extras=””) {
cleanupPlayer(targetWrapper); // Always clean first ✅
targetWrapper.classList.add(‘played’);
// Create script
const scriptEl = document.createElement(“script”);
scriptEl.setAttribute(“fetchpriority”, “high”);
scriptEl.setAttribute(“charset”, “UTF-8”);
const scriptURL = new URL(`https://trinitymedia.ai/player/trinity/2900019254/?themeAppearance=${theme}${extras}`);
scriptURL.searchParams.set(“pageURL”, window.location.href);
scriptEl.src = scriptURL.toString();
// Insert player
const placeholder = targetWrapper.querySelector(“.add-before-this”);
placeholder.parentNode.insertBefore(scriptEl, placeholder.nextSibling);
}
function getTheme() {
return document.body.classList.contains(“dark”) ? “dark” : “light”;
}
// Initial Load for Desktop
if (window.innerWidth > 768) {
const desktopBtn = document.getElementById(“desktopPlayBtn”);
if (desktopBtn) {
desktopBtn.addEventListener(“click”, function () {
const desktopWrapper = document.querySelector(“.desktop-player-wrapper.trinity-player-iframe-wrapper”);
if (desktopWrapper) loadTrinityPlayer(desktopWrapper, getTheme(),’&autoplay=1′);
});
}
}
// Mobile Button Click
const mobileBtn = document.getElementById(“mobilePlayBtn”);
if (mobileBtn) {
mobileBtn.addEventListener(“click”, function () {
const mobileWrapper = document.querySelector(“.mobile-player-wrapper.trinity-player-iframe-wrapper”);
if (mobileWrapper) loadTrinityPlayer(mobileWrapper, getTheme(),’&autoplay=1′);
});
}
function reInitButton(container,html){
container.innerHTML = ” + html;
}
// Theme switcher
const destroyButton = document.getElementById(“checkbox”);
if (destroyButton) {
destroyButton.addEventListener(“click”, () => {
setTimeout(() => {
const theme = getTheme();
if (window.innerWidth > 768) {
const desktopWrapper = document.querySelector(“.desktop-player-wrapper.trinity-player-iframe-wrapper”);
if(desktopWrapper.classList.contains(‘played’)){
loadTrinityPlayer(desktopWrapper, theme,’&autoplay=1′);
}else{
reInitButton(desktopWrapper,’‘)
const desktopBtn = document.getElementById(“desktopPlayBtn”);
if (desktopBtn) {
desktopBtn.addEventListener(“click”, function () {
const desktopWrapper = document.querySelector(“.desktop-player-wrapper.trinity-player-iframe-wrapper”);
if (desktopWrapper) loadTrinityPlayer(desktopWrapper,theme,’&autoplay=1’);
});
}
}
} else {
const mobileWrapper = document.querySelector(“.mobile-player-wrapper.trinity-player-iframe-wrapper”);
if(mobileWrapper.classList.contains(‘played’)){
loadTrinityPlayer(mobileWrapper, theme,’&autoplay=1′);
}else{
const mobileBtn = document.getElementById(“mobilePlayBtn”);
if (mobileBtn) {
mobileBtn.addEventListener(“click”, function () {
const mobileWrapper = document.querySelector(“.mobile-player-wrapper.trinity-player-iframe-wrapper”);
if (mobileWrapper) loadTrinityPlayer(mobileWrapper,theme,’&autoplay=1′);
});
}
}
}
}, 100);
});
}
})();
Just a few weeks after announcing the launch of new features aiming to establish Pi Network’s name in the DeFi ecosystem, the team has provided further details on how the DEX and AMM will operate.
Both products have begun testing on Pi Testnet, and the team categorized them as one of their most ambitious updates to date.
Pi’s DEX and AMM
The project’s decentralized exchange will allow users to trade tokens directly on-chain, which removes the necessity for intermediaries. It’s designed to work similarly to other leading DeFi solutions like Uniswap or PancakeSwap by utilizing on-chain mechanisms such as order books and liquidity pools to enable fully transparent peer-to-peer trading.
According to the Pi Network Core Team, this is a crucial step for the project’s evolving ecosystem, which continues to build its core financial infrastructure before full mainnet migration.
At the heart of the DEX is the Pi automated market maker (AMM). It’s a system that automatically adjusts token prices based on supply and demand in each liquidity pool. It uses an algorithmic formula to determine value, which enables instant swaps and ensures users can always trade without waiting for traditional order matching.
The Pi Wallet will now act as a central control hub for all these DeFi-related operations. Pioneers will be able to gain access to four essential features from the wallet: swap, exchange, liquidity pools, and manage tokens.
The new update also sees the integration of liquidity provision, which allows users to deposit tokens into liquidity pools to support trading pairs and receive a 0.3% fee on every transaction executed within those pools. They can withdraw liquidity at any time, while the withdrawal amount is adjusted according to the pool’s live token ratio.
You may also like:
Growing Beyond
The team said its primary goal for the DeFi-focused products is to expand beyond the initial targets of providing education and innovation. By introducing these complex DeFi concepts within a controlled testnet environment, the project aims to empower its substantial user base to explore DeFi safely before the open mainnet launch.
If all goes to plan, the Pi DEX and AMM could become the cornerstones of the overall Pi Network financial ecosystem as they can position it not just as a social mining experiment but as a self-sustaining decentralized economy built by and for its global community of Pioneers, the video concluded.
Binance Free $600 (CryptoPotato Exclusive): Use this link to register a new account and receive $600 exclusive welcome offer on Binance (full details).
LIMITED OFFER for CryptoPotato readers at Bybit: Use this link to register and open a $500 FREE position on any coin!